All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.kubernetes.client.openapi.models.V2beta2MetricStatusFluentImpl Maven / Gradle / Ivy

There is a newer version: 22.0.0
Show newest version
package io.kubernetes.client.openapi.models;

import java.lang.StringBuilder;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Boolean;
import java.lang.StringBuffer;
import java.lang.Object;

public class V2beta2MetricStatusFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V2beta2MetricStatusFluent {

    private V2beta2ContainerResourceMetricStatusBuilder containerResource;
    private V2beta2ExternalMetricStatusBuilder external;
    private V2beta2ObjectMetricStatusBuilder _object;
    private V2beta2PodsMetricStatusBuilder pods;
    private V2beta2ResourceMetricStatusBuilder resource;
    private String type;

    public V2beta2MetricStatusFluentImpl() { 
    }


    public V2beta2MetricStatusFluentImpl(V2beta2MetricStatus instance) { 
        this.withContainerResource(instance.getContainerResource());

        this.withExternal(instance.getExternal());

        this.withObject(instance.getObject());

        this.withPods(instance.getPods());

        this.withResource(instance.getResource());

        this.withType(instance.getType());

    }


    
/**
 * This method has been deprecated, please use method buildContainerResource instead.
 * @return The buildable object.
 */
@Deprecated public V2beta2ContainerResourceMetricStatus getContainerResource() {
        return this.containerResource!=null?this.containerResource.build():null;
    }

    public V2beta2ContainerResourceMetricStatus buildContainerResource() {
        return this.containerResource!=null?this.containerResource.build():null;
    }

    public A withContainerResource(V2beta2ContainerResourceMetricStatus containerResource) {
        _visitables.get("containerResource").remove(this.containerResource);
        if (containerResource!=null){ this.containerResource= new V2beta2ContainerResourceMetricStatusBuilder(containerResource); _visitables.get("containerResource").add(this.containerResource);} return (A) this;
    }

    public Boolean hasContainerResource() {
        return this.containerResource != null;
    }

    public V2beta2MetricStatusFluent.ContainerResourceNested withNewContainerResource() {
        return new ContainerResourceNestedImpl();
    }

    public V2beta2MetricStatusFluent.ContainerResourceNested withNewContainerResourceLike(V2beta2ContainerResourceMetricStatus item) {
        return new ContainerResourceNestedImpl(item);
    }

    public V2beta2MetricStatusFluent.ContainerResourceNested editContainerResource() {
        return withNewContainerResourceLike(getContainerResource());
    }

    public V2beta2MetricStatusFluent.ContainerResourceNested editOrNewContainerResource() {
        return withNewContainerResourceLike(getContainerResource() != null ? getContainerResource(): new V2beta2ContainerResourceMetricStatusBuilder().build());
    }

    public V2beta2MetricStatusFluent.ContainerResourceNested editOrNewContainerResourceLike(V2beta2ContainerResourceMetricStatus item) {
        return withNewContainerResourceLike(getContainerResource() != null ? getContainerResource(): item);
    }

    
/**
 * This method has been deprecated, please use method buildExternal instead.
 * @return The buildable object.
 */
@Deprecated public V2beta2ExternalMetricStatus getExternal() {
        return this.external!=null?this.external.build():null;
    }

    public V2beta2ExternalMetricStatus buildExternal() {
        return this.external!=null?this.external.build():null;
    }

    public A withExternal(V2beta2ExternalMetricStatus external) {
        _visitables.get("external").remove(this.external);
        if (external!=null){ this.external= new V2beta2ExternalMetricStatusBuilder(external); _visitables.get("external").add(this.external);} return (A) this;
    }

    public Boolean hasExternal() {
        return this.external != null;
    }

    public V2beta2MetricStatusFluent.ExternalNested withNewExternal() {
        return new ExternalNestedImpl();
    }

    public V2beta2MetricStatusFluent.ExternalNested withNewExternalLike(V2beta2ExternalMetricStatus item) {
        return new ExternalNestedImpl(item);
    }

    public V2beta2MetricStatusFluent.ExternalNested editExternal() {
        return withNewExternalLike(getExternal());
    }

    public V2beta2MetricStatusFluent.ExternalNested editOrNewExternal() {
        return withNewExternalLike(getExternal() != null ? getExternal(): new V2beta2ExternalMetricStatusBuilder().build());
    }

    public V2beta2MetricStatusFluent.ExternalNested editOrNewExternalLike(V2beta2ExternalMetricStatus item) {
        return withNewExternalLike(getExternal() != null ? getExternal(): item);
    }

    
/**
 * This method has been deprecated, please use method buildObject instead.
 * @return The buildable object.
 */
@Deprecated public V2beta2ObjectMetricStatus getObject() {
        return this._object!=null?this._object.build():null;
    }

    public V2beta2ObjectMetricStatus buildObject() {
        return this._object!=null?this._object.build():null;
    }

    public A withObject(V2beta2ObjectMetricStatus _object) {
        _visitables.get("_object").remove(this._object);
        if (_object!=null){ this._object= new V2beta2ObjectMetricStatusBuilder(_object); _visitables.get("_object").add(this._object);} return (A) this;
    }

    public Boolean hasObject() {
        return this._object != null;
    }

    public V2beta2MetricStatusFluent.ObjectNested withNewObject() {
        return new ObjectNestedImpl();
    }

    public V2beta2MetricStatusFluent.ObjectNested withNewObjectLike(V2beta2ObjectMetricStatus item) {
        return new ObjectNestedImpl(item);
    }

    public V2beta2MetricStatusFluent.ObjectNested editObject() {
        return withNewObjectLike(getObject());
    }

    public V2beta2MetricStatusFluent.ObjectNested editOrNewObject() {
        return withNewObjectLike(getObject() != null ? getObject(): new V2beta2ObjectMetricStatusBuilder().build());
    }

    public V2beta2MetricStatusFluent.ObjectNested editOrNewObjectLike(V2beta2ObjectMetricStatus item) {
        return withNewObjectLike(getObject() != null ? getObject(): item);
    }

    
/**
 * This method has been deprecated, please use method buildPods instead.
 * @return The buildable object.
 */
@Deprecated public V2beta2PodsMetricStatus getPods() {
        return this.pods!=null?this.pods.build():null;
    }

    public V2beta2PodsMetricStatus buildPods() {
        return this.pods!=null?this.pods.build():null;
    }

    public A withPods(V2beta2PodsMetricStatus pods) {
        _visitables.get("pods").remove(this.pods);
        if (pods!=null){ this.pods= new V2beta2PodsMetricStatusBuilder(pods); _visitables.get("pods").add(this.pods);} return (A) this;
    }

    public Boolean hasPods() {
        return this.pods != null;
    }

    public V2beta2MetricStatusFluent.PodsNested withNewPods() {
        return new PodsNestedImpl();
    }

    public V2beta2MetricStatusFluent.PodsNested withNewPodsLike(V2beta2PodsMetricStatus item) {
        return new PodsNestedImpl(item);
    }

    public V2beta2MetricStatusFluent.PodsNested editPods() {
        return withNewPodsLike(getPods());
    }

    public V2beta2MetricStatusFluent.PodsNested editOrNewPods() {
        return withNewPodsLike(getPods() != null ? getPods(): new V2beta2PodsMetricStatusBuilder().build());
    }

    public V2beta2MetricStatusFluent.PodsNested editOrNewPodsLike(V2beta2PodsMetricStatus item) {
        return withNewPodsLike(getPods() != null ? getPods(): item);
    }

    
/**
 * This method has been deprecated, please use method buildResource instead.
 * @return The buildable object.
 */
@Deprecated public V2beta2ResourceMetricStatus getResource() {
        return this.resource!=null?this.resource.build():null;
    }

    public V2beta2ResourceMetricStatus buildResource() {
        return this.resource!=null?this.resource.build():null;
    }

    public A withResource(V2beta2ResourceMetricStatus resource) {
        _visitables.get("resource").remove(this.resource);
        if (resource!=null){ this.resource= new V2beta2ResourceMetricStatusBuilder(resource); _visitables.get("resource").add(this.resource);} return (A) this;
    }

    public Boolean hasResource() {
        return this.resource != null;
    }

    public V2beta2MetricStatusFluent.ResourceNested withNewResource() {
        return new ResourceNestedImpl();
    }

    public V2beta2MetricStatusFluent.ResourceNested withNewResourceLike(V2beta2ResourceMetricStatus item) {
        return new ResourceNestedImpl(item);
    }

    public V2beta2MetricStatusFluent.ResourceNested editResource() {
        return withNewResourceLike(getResource());
    }

    public V2beta2MetricStatusFluent.ResourceNested editOrNewResource() {
        return withNewResourceLike(getResource() != null ? getResource(): new V2beta2ResourceMetricStatusBuilder().build());
    }

    public V2beta2MetricStatusFluent.ResourceNested editOrNewResourceLike(V2beta2ResourceMetricStatus item) {
        return withNewResourceLike(getResource() != null ? getResource(): item);
    }

    public String getType() {
        return this.type;
    }

    public A withType(String type) {
        this.type=type; return (A) this;
    }

    public Boolean hasType() {
        return this.type != null;
    }

    public A withNewType(String arg1) {
        return (A)withType(new String(arg1));
    }

    public A withNewType(StringBuilder arg1) {
        return (A)withType(new String(arg1));
    }

    public A withNewType(StringBuffer arg1) {
        return (A)withType(new String(arg1));
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        V2beta2MetricStatusFluentImpl that = (V2beta2MetricStatusFluentImpl) o;
        if (containerResource != null ? !containerResource.equals(that.containerResource) :that.containerResource != null) return false;
        if (external != null ? !external.equals(that.external) :that.external != null) return false;
        if (_object != null ? !_object.equals(that._object) :that._object != null) return false;
        if (pods != null ? !pods.equals(that.pods) :that.pods != null) return false;
        if (resource != null ? !resource.equals(that.resource) :that.resource != null) return false;
        if (type != null ? !type.equals(that.type) :that.type != null) return false;
        return true;
    }

    public int hashCode() {
        return java.util.Objects.hash(containerResource,  external,  _object,  pods,  resource,  type,  super.hashCode());
    }

    public class ContainerResourceNestedImpl extends V2beta2ContainerResourceMetricStatusFluentImpl> implements V2beta2MetricStatusFluent.ContainerResourceNested,io.kubernetes.client.fluent.Nested {
        private final V2beta2ContainerResourceMetricStatusBuilder builder;

        ContainerResourceNestedImpl(V2beta2ContainerResourceMetricStatus item) {
            this.builder = new V2beta2ContainerResourceMetricStatusBuilder(this, item);
        }

        ContainerResourceNestedImpl() {
            this.builder = new V2beta2ContainerResourceMetricStatusBuilder(this);
        }

        public N and() {
             return (N) V2beta2MetricStatusFluentImpl.this.withContainerResource(builder.build());
        }

        public N endContainerResource() {
             return and();
        }
    }


    public class ExternalNestedImpl extends V2beta2ExternalMetricStatusFluentImpl> implements V2beta2MetricStatusFluent.ExternalNested,io.kubernetes.client.fluent.Nested {
        private final V2beta2ExternalMetricStatusBuilder builder;

        ExternalNestedImpl(V2beta2ExternalMetricStatus item) {
            this.builder = new V2beta2ExternalMetricStatusBuilder(this, item);
        }

        ExternalNestedImpl() {
            this.builder = new V2beta2ExternalMetricStatusBuilder(this);
        }

        public N and() {
             return (N) V2beta2MetricStatusFluentImpl.this.withExternal(builder.build());
        }

        public N endExternal() {
             return and();
        }
    }


    public class ObjectNestedImpl extends V2beta2ObjectMetricStatusFluentImpl> implements V2beta2MetricStatusFluent.ObjectNested,io.kubernetes.client.fluent.Nested {
        private final V2beta2ObjectMetricStatusBuilder builder;

        ObjectNestedImpl(V2beta2ObjectMetricStatus item) {
            this.builder = new V2beta2ObjectMetricStatusBuilder(this, item);
        }

        ObjectNestedImpl() {
            this.builder = new V2beta2ObjectMetricStatusBuilder(this);
        }

        public N and() {
             return (N) V2beta2MetricStatusFluentImpl.this.withObject(builder.build());
        }

        public N endObject() {
             return and();
        }
    }


    public class PodsNestedImpl extends V2beta2PodsMetricStatusFluentImpl> implements V2beta2MetricStatusFluent.PodsNested,io.kubernetes.client.fluent.Nested {
        private final V2beta2PodsMetricStatusBuilder builder;

        PodsNestedImpl(V2beta2PodsMetricStatus item) {
            this.builder = new V2beta2PodsMetricStatusBuilder(this, item);
        }

        PodsNestedImpl() {
            this.builder = new V2beta2PodsMetricStatusBuilder(this);
        }

        public N and() {
             return (N) V2beta2MetricStatusFluentImpl.this.withPods(builder.build());
        }

        public N endPods() {
             return and();
        }
    }


    public class ResourceNestedImpl extends V2beta2ResourceMetricStatusFluentImpl> implements V2beta2MetricStatusFluent.ResourceNested,io.kubernetes.client.fluent.Nested {
        private final V2beta2ResourceMetricStatusBuilder builder;

        ResourceNestedImpl(V2beta2ResourceMetricStatus item) {
            this.builder = new V2beta2ResourceMetricStatusBuilder(this, item);
        }

        ResourceNestedImpl() {
            this.builder = new V2beta2ResourceMetricStatusBuilder(this);
        }

        public N and() {
             return (N) V2beta2MetricStatusFluentImpl.this.withResource(builder.build());
        }

        public N endResource() {
             return and();
        }
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy