package io.delphiplatform.api.v3.model;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Objects;

/**
 * Health check response body
 */
public class HealthCheckResponseBody {

    @JsonProperty("api_version")
    private String apiVersion;

    @JsonProperty("environment")
    private String environment;

    @JsonProperty("bigtable_instance_id")
    private String bigtableInstanceId;

    @JsonProperty("postgres_cluster_id")
    private String postgresClusterId;

    @JsonProperty("revision")
    private String revision;

    @JsonProperty("status")
    private String status;


    public HealthCheckResponseBody bigtableInstanceId(String bigtableInstanceId) {
        this.bigtableInstanceId = bigtableInstanceId;
        return this;
    }

    public String getBigtableInstanceId() {
        return bigtableInstanceId;
    }

    public void setBigtableInstanceId(String bigtableInstanceId) {
        this.bigtableInstanceId = bigtableInstanceId;
    }

    public HealthCheckResponseBody postgresClusterId(String postgresClusterId) {
        this.postgresClusterId = postgresClusterId;
        return this;
    }

    public String getPostgresClusterId() {
        return postgresClusterId;
    }

    public void setPostgresClusterId(String postgresClusterId) {
        this.postgresClusterId = postgresClusterId;
    }

    public HealthCheckResponseBody revision(String revision) {
        this.revision = revision;
        return this;
    }

    public String getRevision() {
        return revision;
    }

    public void setRevision(String revision) {
        this.revision = revision;
    }

    public HealthCheckResponseBody apiVersion(String apiVersion) {
        this.apiVersion = apiVersion;
        return this;
    }

    /**
     * Get apiVersion
     *
     * @return apiVersion
     */
    public String getApiVersion() {
        return apiVersion;
    }

    public void setApiVersion(String apiVersion) {
        this.apiVersion = apiVersion;
    }

    public HealthCheckResponseBody environment(String environment) {
        this.environment = environment;
        return this;
    }

    /**
     * Get environment
     *
     * @return environment
     */
    public String getEnvironment() {
        return environment;
    }

    public void setEnvironment(String environment) {
        this.environment = environment;
    }

    public HealthCheckResponseBody status(String status) {
        this.status = status;
        return this;
    }

    /**
     * Get status
     *
     * @return status
     */
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        HealthCheckResponseBody healthCheckResponseBody = (HealthCheckResponseBody) o;
        return Objects.equals(this.apiVersion, healthCheckResponseBody.apiVersion) &&
            Objects.equals(this.environment, healthCheckResponseBody.environment) &&
            Objects.equals(this.bigtableInstanceId, healthCheckResponseBody.bigtableInstanceId) &&
            Objects.equals(this.postgresClusterId, healthCheckResponseBody.postgresClusterId) &&
            Objects.equals(this.revision, healthCheckResponseBody.revision) &&
            Objects.equals(this.status, healthCheckResponseBody.status);
    }

    @Override
    public int hashCode() {
        return Objects.hash(apiVersion, environment, status);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class HealthCheckResponseBody {\n");

        sb.append("    apiVersion: ").append(toIndentedString(apiVersion)).append("\n");
        sb.append("    environment: ").append(toIndentedString(environment)).append("\n");
        sb.append("    bigtableInstanceId: ").append(toIndentedString(bigtableInstanceId)).append("\n");
        sb.append("    postgresClusterId: ").append(toIndentedString(postgresClusterId)).append("\n");
        sb.append("    revision: ").append(toIndentedString(revision)).append("\n");
        sb.append("    status: ").append(toIndentedString(status)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces (except the first line).
     */
    private String toIndentedString(Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }
}
