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

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

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

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

public class V1CustomResourceSubresourcesFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1CustomResourceSubresourcesFluent {

    private V1CustomResourceSubresourceScaleBuilder scale;
    private Object status;

    public V1CustomResourceSubresourcesFluentImpl() { 
    }


    public V1CustomResourceSubresourcesFluentImpl(V1CustomResourceSubresources instance) { 
        this.withScale(instance.getScale());

        this.withStatus(instance.getStatus());

    }


    
/**
 * This method has been deprecated, please use method buildScale instead.
 * @return The buildable object.
 */
@Deprecated public V1CustomResourceSubresourceScale getScale() {
        return this.scale!=null?this.scale.build():null;
    }

    public V1CustomResourceSubresourceScale buildScale() {
        return this.scale!=null?this.scale.build():null;
    }

    public A withScale(V1CustomResourceSubresourceScale scale) {
        _visitables.get("scale").remove(this.scale);
        if (scale!=null){ this.scale= new V1CustomResourceSubresourceScaleBuilder(scale); _visitables.get("scale").add(this.scale);} return (A) this;
    }

    public Boolean hasScale() {
        return this.scale != null;
    }

    public V1CustomResourceSubresourcesFluent.ScaleNested withNewScale() {
        return new ScaleNestedImpl();
    }

    public V1CustomResourceSubresourcesFluent.ScaleNested withNewScaleLike(V1CustomResourceSubresourceScale item) {
        return new ScaleNestedImpl(item);
    }

    public V1CustomResourceSubresourcesFluent.ScaleNested editScale() {
        return withNewScaleLike(getScale());
    }

    public V1CustomResourceSubresourcesFluent.ScaleNested editOrNewScale() {
        return withNewScaleLike(getScale() != null ? getScale(): new V1CustomResourceSubresourceScaleBuilder().build());
    }

    public V1CustomResourceSubresourcesFluent.ScaleNested editOrNewScaleLike(V1CustomResourceSubresourceScale item) {
        return withNewScaleLike(getScale() != null ? getScale(): item);
    }

    public Object getStatus() {
        return this.status;
    }

    public A withStatus(Object status) {
        this.status=status; return (A) this;
    }

    public Boolean hasStatus() {
        return this.status != null;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        V1CustomResourceSubresourcesFluentImpl that = (V1CustomResourceSubresourcesFluentImpl) o;
        if (scale != null ? !scale.equals(that.scale) :that.scale != null) return false;
        if (status != null &&status != this ? !status.equals(that.status) :that.status != null &&status != this ) return false;

        return true;
    }

    public int hashCode() {
        return java.util.Objects.hash(scale,  status,  super.hashCode());
    }

    public class ScaleNestedImpl extends V1CustomResourceSubresourceScaleFluentImpl> implements V1CustomResourceSubresourcesFluent.ScaleNested,io.kubernetes.client.fluent.Nested {
        private final V1CustomResourceSubresourceScaleBuilder builder;

        ScaleNestedImpl(V1CustomResourceSubresourceScale item) {
            this.builder = new V1CustomResourceSubresourceScaleBuilder(this, item);
        }

        ScaleNestedImpl() {
            this.builder = new V1CustomResourceSubresourceScaleBuilder(this);
        }

        public N and() {
             return (N) V1CustomResourceSubresourcesFluentImpl.this.withScale(builder.build());
        }

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


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy