/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.13.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.cloudera.api.swagger.model;

import java.util.Objects;
import java.util.Arrays;
import com.cloudera.api.swagger.model.ApiConfigStalenessStatus;
import com.cloudera.api.swagger.model.ApiHealthSummary;
import com.cloudera.api.swagger.model.ApiMapEntry;
import com.cloudera.api.swagger.model.ApiService;
import com.cloudera.api.swagger.model.ApiServiceRef;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
 * ApiDataContext is the persistent storage/services context exported by the base cluster to be consumed by the compute cluster.
 */
@Schema(description = "ApiDataContext is the persistent storage/services context exported by the base cluster to be consumed by the compute cluster.")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-05-19T08:29:59.033Z[Etc/UTC]")

public class ApiDataContext {
  @SerializedName("name")
  private String name = null;

  @SerializedName("displayName")
  private String displayName = null;

  @SerializedName("nameservice")
  private String nameservice = null;

  @SerializedName("createdTime")
  private String createdTime = null;

  @SerializedName("lastModifiedTime")
  private String lastModifiedTime = null;

  @SerializedName("services")
  private List<ApiServiceRef> services = null;

  @SerializedName("servicesDetails")
  private List<ApiService> servicesDetails = null;

  @SerializedName("supportedServiceTypes")
  private List<String> supportedServiceTypes = null;

  @SerializedName("allowedClusterVersions")
  private List<ApiMapEntry> allowedClusterVersions = null;

  @SerializedName("configStalenessStatus")
  private ApiConfigStalenessStatus configStalenessStatus = null;

  @SerializedName("clientConfigStalenessStatus")
  private ApiConfigStalenessStatus clientConfigStalenessStatus = null;

  @SerializedName("healthSummary")
  private ApiHealthSummary healthSummary = null;

  public ApiDataContext name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @Schema(description = "")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public ApiDataContext displayName(String displayName) {
    this.displayName = displayName;
    return this;
  }

   /**
   * Get displayName
   * @return displayName
  **/
  @Schema(description = "")
  public String getDisplayName() {
    return displayName;
  }

  public void setDisplayName(String displayName) {
    this.displayName = displayName;
  }

  public ApiDataContext nameservice(String nameservice) {
    this.nameservice = nameservice;
    return this;
  }

   /**
   * Get nameservice
   * @return nameservice
  **/
  @Schema(description = "")
  public String getNameservice() {
    return nameservice;
  }

  public void setNameservice(String nameservice) {
    this.nameservice = nameservice;
  }

  public ApiDataContext createdTime(String createdTime) {
    this.createdTime = createdTime;
    return this;
  }

   /**
   * Get createdTime
   * @return createdTime
  **/
  @Schema(description = "")
  public String getCreatedTime() {
    return createdTime;
  }

  public void setCreatedTime(String createdTime) {
    this.createdTime = createdTime;
  }

  public ApiDataContext lastModifiedTime(String lastModifiedTime) {
    this.lastModifiedTime = lastModifiedTime;
    return this;
  }

   /**
   * Get lastModifiedTime
   * @return lastModifiedTime
  **/
  @Schema(description = "")
  public String getLastModifiedTime() {
    return lastModifiedTime;
  }

  public void setLastModifiedTime(String lastModifiedTime) {
    this.lastModifiedTime = lastModifiedTime;
  }

  public ApiDataContext services(List<ApiServiceRef> services) {
    this.services = services;
    return this;
  }

  public ApiDataContext addServicesItem(ApiServiceRef servicesItem) {
    if (this.services == null) {
      this.services = new ArrayList<>();
    }
    this.services.add(servicesItem);
    return this;
  }

   /**
   * Get services
   * @return services
  **/
  @Schema(description = "")
  public List<ApiServiceRef> getServices() {
    return services;
  }

  public void setServices(List<ApiServiceRef> services) {
    this.services = services;
  }

  public ApiDataContext servicesDetails(List<ApiService> servicesDetails) {
    this.servicesDetails = servicesDetails;
    return this;
  }

  public ApiDataContext addServicesDetailsItem(ApiService servicesDetailsItem) {
    if (this.servicesDetails == null) {
      this.servicesDetails = new ArrayList<>();
    }
    this.servicesDetails.add(servicesDetailsItem);
    return this;
  }

   /**
   * Get servicesDetails
   * @return servicesDetails
  **/
  @Schema(description = "")
  public List<ApiService> getServicesDetails() {
    return servicesDetails;
  }

  public void setServicesDetails(List<ApiService> servicesDetails) {
    this.servicesDetails = servicesDetails;
  }

  public ApiDataContext supportedServiceTypes(List<String> supportedServiceTypes) {
    this.supportedServiceTypes = supportedServiceTypes;
    return this;
  }

  public ApiDataContext addSupportedServiceTypesItem(String supportedServiceTypesItem) {
    if (this.supportedServiceTypes == null) {
      this.supportedServiceTypes = new ArrayList<>();
    }
    this.supportedServiceTypes.add(supportedServiceTypesItem);
    return this;
  }

   /**
   * Get supportedServiceTypes
   * @return supportedServiceTypes
  **/
  @Schema(description = "")
  public List<String> getSupportedServiceTypes() {
    return supportedServiceTypes;
  }

  public void setSupportedServiceTypes(List<String> supportedServiceTypes) {
    this.supportedServiceTypes = supportedServiceTypes;
  }

  public ApiDataContext allowedClusterVersions(List<ApiMapEntry> allowedClusterVersions) {
    this.allowedClusterVersions = allowedClusterVersions;
    return this;
  }

  public ApiDataContext addAllowedClusterVersionsItem(ApiMapEntry allowedClusterVersionsItem) {
    if (this.allowedClusterVersions == null) {
      this.allowedClusterVersions = new ArrayList<>();
    }
    this.allowedClusterVersions.add(allowedClusterVersionsItem);
    return this;
  }

   /**
   * Get allowedClusterVersions
   * @return allowedClusterVersions
  **/
  @Schema(description = "")
  public List<ApiMapEntry> getAllowedClusterVersions() {
    return allowedClusterVersions;
  }

  public void setAllowedClusterVersions(List<ApiMapEntry> allowedClusterVersions) {
    this.allowedClusterVersions = allowedClusterVersions;
  }

  public ApiDataContext configStalenessStatus(ApiConfigStalenessStatus configStalenessStatus) {
    this.configStalenessStatus = configStalenessStatus;
    return this;
  }

   /**
   * Get configStalenessStatus
   * @return configStalenessStatus
  **/
  @Schema(description = "")
  public ApiConfigStalenessStatus getConfigStalenessStatus() {
    return configStalenessStatus;
  }

  public void setConfigStalenessStatus(ApiConfigStalenessStatus configStalenessStatus) {
    this.configStalenessStatus = configStalenessStatus;
  }

  public ApiDataContext clientConfigStalenessStatus(ApiConfigStalenessStatus clientConfigStalenessStatus) {
    this.clientConfigStalenessStatus = clientConfigStalenessStatus;
    return this;
  }

   /**
   * Get clientConfigStalenessStatus
   * @return clientConfigStalenessStatus
  **/
  @Schema(description = "")
  public ApiConfigStalenessStatus getClientConfigStalenessStatus() {
    return clientConfigStalenessStatus;
  }

  public void setClientConfigStalenessStatus(ApiConfigStalenessStatus clientConfigStalenessStatus) {
    this.clientConfigStalenessStatus = clientConfigStalenessStatus;
  }

  public ApiDataContext healthSummary(ApiHealthSummary healthSummary) {
    this.healthSummary = healthSummary;
    return this;
  }

   /**
   * Get healthSummary
   * @return healthSummary
  **/
  @Schema(description = "")
  public ApiHealthSummary getHealthSummary() {
    return healthSummary;
  }

  public void setHealthSummary(ApiHealthSummary healthSummary) {
    this.healthSummary = healthSummary;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiDataContext apiDataContext = (ApiDataContext) o;
    return Objects.equals(this.name, apiDataContext.name) &&
        Objects.equals(this.displayName, apiDataContext.displayName) &&
        Objects.equals(this.nameservice, apiDataContext.nameservice) &&
        Objects.equals(this.createdTime, apiDataContext.createdTime) &&
        Objects.equals(this.lastModifiedTime, apiDataContext.lastModifiedTime) &&
        Objects.equals(this.services, apiDataContext.services) &&
        Objects.equals(this.servicesDetails, apiDataContext.servicesDetails) &&
        Objects.equals(this.supportedServiceTypes, apiDataContext.supportedServiceTypes) &&
        Objects.equals(this.allowedClusterVersions, apiDataContext.allowedClusterVersions) &&
        Objects.equals(this.configStalenessStatus, apiDataContext.configStalenessStatus) &&
        Objects.equals(this.clientConfigStalenessStatus, apiDataContext.clientConfigStalenessStatus) &&
        Objects.equals(this.healthSummary, apiDataContext.healthSummary);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, displayName, nameservice, createdTime, lastModifiedTime, services, servicesDetails, supportedServiceTypes, allowedClusterVersions, configStalenessStatus, clientConfigStalenessStatus, healthSummary);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiDataContext {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    displayName: ").append(toIndentedString(displayName)).append("\n");
    sb.append("    nameservice: ").append(toIndentedString(nameservice)).append("\n");
    sb.append("    createdTime: ").append(toIndentedString(createdTime)).append("\n");
    sb.append("    lastModifiedTime: ").append(toIndentedString(lastModifiedTime)).append("\n");
    sb.append("    services: ").append(toIndentedString(services)).append("\n");
    sb.append("    servicesDetails: ").append(toIndentedString(servicesDetails)).append("\n");
    sb.append("    supportedServiceTypes: ").append(toIndentedString(supportedServiceTypes)).append("\n");
    sb.append("    allowedClusterVersions: ").append(toIndentedString(allowedClusterVersions)).append("\n");
    sb.append("    configStalenessStatus: ").append(toIndentedString(configStalenessStatus)).append("\n");
    sb.append("    clientConfigStalenessStatus: ").append(toIndentedString(clientConfigStalenessStatus)).append("\n");
    sb.append("    healthSummary: ").append(toIndentedString(healthSummary)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
