/*
 * 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 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;

/**
 * Controls how the autoscaler computes recommended resources. The resource policy may be used to set constraints on the recommendations for individual containers. If not specified, the autoscaler computes recommended resources for all containers in the pod, without additional constraints.
 */
@ApiModel(description = "Controls how the autoscaler computes recommended resources. The resource policy may be used to set constraints on the recommendations for individual containers. If not specified, the autoscaler computes recommended resources for all containers in the pod, without additional constraints.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-02T17:31:04.907Z[Etc/UTC]")
public class V1VerticalPodAutoscalerSpecResourcePolicy {
  public static final String SERIALIZED_NAME_CONTAINER_POLICIES = "containerPolicies";
  @SerializedName(SERIALIZED_NAME_CONTAINER_POLICIES)
  private List<V1VerticalPodAutoscalerSpecResourcePolicyContainerPolicies> containerPolicies = null;


  public V1VerticalPodAutoscalerSpecResourcePolicy containerPolicies(List<V1VerticalPodAutoscalerSpecResourcePolicyContainerPolicies> containerPolicies) {

    this.containerPolicies = containerPolicies;
    return this;
  }

  public V1VerticalPodAutoscalerSpecResourcePolicy addContainerPoliciesItem(V1VerticalPodAutoscalerSpecResourcePolicyContainerPolicies containerPoliciesItem) {
    if (this.containerPolicies == null) {
      this.containerPolicies = new ArrayList<>();
    }
    this.containerPolicies.add(containerPoliciesItem);
    return this;
  }

   /**
   * Per-container resource policies.
   * @return containerPolicies
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Per-container resource policies.")

  public List<V1VerticalPodAutoscalerSpecResourcePolicyContainerPolicies> getContainerPolicies() {
    return containerPolicies;
  }


  public void setContainerPolicies(List<V1VerticalPodAutoscalerSpecResourcePolicyContainerPolicies> containerPolicies) {
    this.containerPolicies = containerPolicies;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1VerticalPodAutoscalerSpecResourcePolicy v1VerticalPodAutoscalerSpecResourcePolicy = (V1VerticalPodAutoscalerSpecResourcePolicy) o;
    return Objects.equals(this.containerPolicies, v1VerticalPodAutoscalerSpecResourcePolicy.containerPolicies);
  }

  @Override
  public int hashCode() {
    return Objects.hash(containerPolicies);
  }


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

}

