/*
 * Kubernetes
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1.21.1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package io.kubernetes.autoscaling.models;

import io.kubernetes.client.openapi.models.V1DeploymentSpec;
import io.kubernetes.client.openapi.models.V1LabelSelector;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;

/**
 * Specification of the behavior of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
 */
@ApiModel(description = "Specification of the behavior of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-02T17:31:04.907Z[Etc/UTC]")
public class V1VerticalPodAutoscalerSpec {
  public static final String SERIALIZED_NAME_RECOMMENDERS = "recommenders";
  @SerializedName(SERIALIZED_NAME_RECOMMENDERS)
  private List<V1VerticalPodAutoscalerSpecRecommenders> recommenders = null;

  public static final String SERIALIZED_NAME_RESOURCE_POLICY = "resourcePolicy";
  @SerializedName(SERIALIZED_NAME_RESOURCE_POLICY)
  private V1VerticalPodAutoscalerSpecResourcePolicy resourcePolicy;

  public static final String SERIALIZED_NAME_SELECTOR = "selector";
  @SerializedName("selector")
  private V1LabelSelector selector;

  public static final String SERIALIZED_NAME_TARGET_REF = "targetRef";
  @SerializedName(SERIALIZED_NAME_TARGET_REF)
  private V1beta2VerticalPodAutoscalerSpecTargetRef targetRef;

  public static final String SERIALIZED_NAME_UPDATE_POLICY = "updatePolicy";
  @SerializedName(SERIALIZED_NAME_UPDATE_POLICY)
  private V1VerticalPodAutoscalerSpecUpdatePolicy updatePolicy;


  public V1VerticalPodAutoscalerSpec recommenders(List<V1VerticalPodAutoscalerSpecRecommenders> recommenders) {

    this.recommenders = recommenders;
    return this;
  }

  public V1VerticalPodAutoscalerSpec addRecommendersItem(V1VerticalPodAutoscalerSpecRecommenders recommendersItem) {
    if (this.recommenders == null) {
      this.recommenders = new ArrayList<>();
    }
    this.recommenders.add(recommendersItem);
    return this;
  }

   /**
   * Recommender responsible for generating recommendation for this object. List should be empty (then the default recommender will generate the recommendation) or contain exactly one recommender.
   * @return recommenders
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Recommender responsible for generating recommendation for this object. List should be empty (then the default recommender will generate the recommendation) or contain exactly one recommender.")

  public List<V1VerticalPodAutoscalerSpecRecommenders> getRecommenders() {
    return recommenders;
  }


  public void setRecommenders(List<V1VerticalPodAutoscalerSpecRecommenders> recommenders) {
    this.recommenders = recommenders;
  }


  public V1VerticalPodAutoscalerSpec resourcePolicy(V1VerticalPodAutoscalerSpecResourcePolicy resourcePolicy) {

    this.resourcePolicy = resourcePolicy;
    return this;
  }

   /**
   * Get resourcePolicy
   * @return resourcePolicy
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public V1VerticalPodAutoscalerSpecResourcePolicy getResourcePolicy() {
    return resourcePolicy;
  }


  public void setResourcePolicy(V1VerticalPodAutoscalerSpecResourcePolicy resourcePolicy) {
    this.resourcePolicy = resourcePolicy;
  }

  public V1VerticalPodAutoscalerSpec selector(V1LabelSelector selector) {
    this.selector = selector;
    return this;
  }

  public V1LabelSelector getSelector() {
    return this.selector;
  }

  public void setSelector(V1LabelSelector selector) {
    this.selector = selector;
  }

  public V1VerticalPodAutoscalerSpec targetRef(V1beta2VerticalPodAutoscalerSpecTargetRef targetRef) {

    this.targetRef = targetRef;
    return this;
  }

   /**
   * Get targetRef
   * @return targetRef
  **/
  @ApiModelProperty(required = true, value = "")

  public V1beta2VerticalPodAutoscalerSpecTargetRef getTargetRef() {
    return targetRef;
  }


  public void setTargetRef(V1beta2VerticalPodAutoscalerSpecTargetRef targetRef) {
    this.targetRef = targetRef;
  }


  public V1VerticalPodAutoscalerSpec updatePolicy(V1VerticalPodAutoscalerSpecUpdatePolicy updatePolicy) {

    this.updatePolicy = updatePolicy;
    return this;
  }

   /**
   * Get updatePolicy
   * @return updatePolicy
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public V1VerticalPodAutoscalerSpecUpdatePolicy getUpdatePolicy() {
    return updatePolicy;
  }


  public void setUpdatePolicy(V1VerticalPodAutoscalerSpecUpdatePolicy updatePolicy) {
    this.updatePolicy = updatePolicy;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1VerticalPodAutoscalerSpec v1VerticalPodAutoscalerSpec = (V1VerticalPodAutoscalerSpec) o;
    return Objects.equals(this.recommenders, v1VerticalPodAutoscalerSpec.recommenders) &&
        Objects.equals(this.resourcePolicy, v1VerticalPodAutoscalerSpec.resourcePolicy) &&
        Objects.equals(this.targetRef, v1VerticalPodAutoscalerSpec.targetRef) &&
        Objects.equals(this.updatePolicy, v1VerticalPodAutoscalerSpec.updatePolicy);
  }

  @Override
  public int hashCode() {
    return Objects.hash(recommenders, resourcePolicy, targetRef, updatePolicy);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1VerticalPodAutoscalerSpec {\n");
    sb.append("    recommenders: ").append(toIndentedString(recommenders)).append("\n");
    sb.append("    resourcePolicy: ").append(toIndentedString(resourcePolicy)).append("\n");
    sb.append("    targetRef: ").append(toIndentedString(targetRef)).append("\n");
    sb.append("    updatePolicy: ").append(toIndentedString(updatePolicy)).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    ");
  }

}

