me.snowdrop.istio.adapter.stackdriver.MetricInfoFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.adapter.stackdriver;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class MetricInfoFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements me.snowdrop.istio.adapter.stackdriver.MetricInfoFluent{
private me.snowdrop.istio.adapter.stackdriver.BucketsDefinitionBuilder buckets;
private MetricKind kind;
private String metricType;
private ValueType value;
public MetricInfoFluentImpl(){
}
public MetricInfoFluentImpl(me.snowdrop.istio.adapter.stackdriver.MetricInfo instance){
this.withBuckets(instance.getBuckets());
this.withKind(instance.getKind());
this.withMetricType(instance.getMetricType());
this.withValue(instance.getValue());
}
/**
* This method has been deprecated, please use method buildBuckets instead.
* @return The buildable object.
*/
@Deprecated public me.snowdrop.istio.adapter.stackdriver.BucketsDefinition getBuckets(){
return this.buckets!=null?this.buckets.build():null;
}
public me.snowdrop.istio.adapter.stackdriver.BucketsDefinition buildBuckets(){
return this.buckets!=null?this.buckets.build():null;
}
public A withBuckets(me.snowdrop.istio.adapter.stackdriver.BucketsDefinition buckets){
_visitables.remove(this.buckets);
if (buckets!=null){ this.buckets= new me.snowdrop.istio.adapter.stackdriver.BucketsDefinitionBuilder(buckets); _visitables.add(this.buckets);} return (A) this;
}
public Boolean hasBuckets(){
return this.buckets != null;
}
public MetricInfoFluent.BucketsNested withNewBuckets(){
return new BucketsNestedImpl();
}
public MetricInfoFluent.BucketsNested withNewBucketsLike(me.snowdrop.istio.adapter.stackdriver.BucketsDefinition item){
return new BucketsNestedImpl(item);
}
public MetricInfoFluent.BucketsNested editBuckets(){
return withNewBucketsLike(getBuckets());
}
public MetricInfoFluent.BucketsNested editOrNewBuckets(){
return withNewBucketsLike(getBuckets() != null ? getBuckets(): new me.snowdrop.istio.adapter.stackdriver.BucketsDefinitionBuilder().build());
}
public MetricInfoFluent.BucketsNested editOrNewBucketsLike(me.snowdrop.istio.adapter.stackdriver.BucketsDefinition item){
return withNewBucketsLike(getBuckets() != null ? getBuckets(): item);
}
public MetricKind getKind(){
return this.kind;
}
public A withKind(MetricKind kind){
this.kind=kind; return (A) this;
}
public Boolean hasKind(){
return this.kind != null;
}
public String getMetricType(){
return this.metricType;
}
public A withMetricType(String metricType){
this.metricType=metricType; return (A) this;
}
public Boolean hasMetricType(){
return this.metricType != null;
}
public ValueType getValue(){
return this.value;
}
public A withValue(ValueType value){
this.value=value; return (A) this;
}
public Boolean hasValue(){
return this.value != null;
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
MetricInfoFluentImpl that = (MetricInfoFluentImpl) o;
if (buckets != null ? !buckets.equals(that.buckets) :that.buckets != null) return false;
if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
if (metricType != null ? !metricType.equals(that.metricType) :that.metricType != null) return false;
if (value != null ? !value.equals(that.value) :that.value != null) return false;
return true;
}
public class BucketsNestedImpl extends me.snowdrop.istio.adapter.stackdriver.BucketsDefinitionFluentImpl> implements MetricInfoFluent.BucketsNested,io.fabric8.kubernetes.api.builder.Nested{
private final me.snowdrop.istio.adapter.stackdriver.BucketsDefinitionBuilder builder;
BucketsNestedImpl(me.snowdrop.istio.adapter.stackdriver.BucketsDefinition item){
this.builder = new me.snowdrop.istio.adapter.stackdriver.BucketsDefinitionBuilder(this, item);
}
BucketsNestedImpl(){
this.builder = new me.snowdrop.istio.adapter.stackdriver.BucketsDefinitionBuilder(this);
}
public N and(){
return (N) MetricInfoFluentImpl.this.withBuckets(builder.build());
}
public N endBuckets(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy