io.kubernetes.client.openapi.models.V2beta1ResourceMetricSourceFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.openapi.models;
import java.lang.Integer;
import java.lang.StringBuffer;
import java.lang.StringBuilder;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.BaseFluent;
import io.kubernetes.client.custom.Quantity;
import java.lang.Object;
import java.lang.String;
import java.lang.Boolean;
public class V2beta1ResourceMetricSourceFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V2beta1ResourceMetricSourceFluent {
private String name;
private Integer targetAverageUtilization;
private Quantity targetAverageValue;
public V2beta1ResourceMetricSourceFluentImpl() {
}
public V2beta1ResourceMetricSourceFluentImpl(V2beta1ResourceMetricSource instance) {
this.withName(instance.getName());
this.withTargetAverageUtilization(instance.getTargetAverageUtilization());
this.withTargetAverageValue(instance.getTargetAverageValue());
}
public String getName() {
return this.name;
}
public A withName(String name) {
this.name=name; return (A) this;
}
public Boolean hasName() {
return this.name != null;
}
public A withNewName(String arg1) {
return (A)withName(new String(arg1));
}
public A withNewName(StringBuilder arg1) {
return (A)withName(new String(arg1));
}
public A withNewName(StringBuffer arg1) {
return (A)withName(new String(arg1));
}
public Integer getTargetAverageUtilization() {
return this.targetAverageUtilization;
}
public A withTargetAverageUtilization(Integer targetAverageUtilization) {
this.targetAverageUtilization=targetAverageUtilization; return (A) this;
}
public Boolean hasTargetAverageUtilization() {
return this.targetAverageUtilization != null;
}
public Quantity getTargetAverageValue() {
return this.targetAverageValue;
}
public A withTargetAverageValue(Quantity targetAverageValue) {
this.targetAverageValue=targetAverageValue; return (A) this;
}
public Boolean hasTargetAverageValue() {
return this.targetAverageValue != null;
}
public A withNewTargetAverageValue(final String value) {
return (A)withTargetAverageValue(new Quantity(value));
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
V2beta1ResourceMetricSourceFluentImpl that = (V2beta1ResourceMetricSourceFluentImpl) o;
if (name != null ? !name.equals(that.name) :that.name != null) return false;
if (targetAverageUtilization != null ? !targetAverageUtilization.equals(that.targetAverageUtilization) :that.targetAverageUtilization != null) return false;
if (targetAverageValue != null ? !targetAverageValue.equals(that.targetAverageValue) :that.targetAverageValue != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(name, targetAverageUtilization, targetAverageValue, super.hashCode());
}
}