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

io.kubernetes.client.openapi.models.V1RuntimeClassFluentImpl 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 V1RuntimeClassFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1RuntimeClassFluent {

    private String apiVersion;
    private String handler;
    private String kind;
    private V1ObjectMetaBuilder metadata;
    private V1OverheadBuilder overhead;
    private V1SchedulingBuilder scheduling;

    public V1RuntimeClassFluentImpl() { 
    }


    public V1RuntimeClassFluentImpl(V1RuntimeClass instance) { 
        this.withApiVersion(instance.getApiVersion());

        this.withHandler(instance.getHandler());

        this.withKind(instance.getKind());

        this.withMetadata(instance.getMetadata());

        this.withOverhead(instance.getOverhead());

        this.withScheduling(instance.getScheduling());

    }


    public String getApiVersion() {
        return this.apiVersion;
    }

    public A withApiVersion(String apiVersion) {
        this.apiVersion=apiVersion; return (A) this;
    }

    public Boolean hasApiVersion() {
        return this.apiVersion != null;
    }

    public A withNewApiVersion(String arg1) {
        return (A)withApiVersion(new String(arg1));
    }

    public A withNewApiVersion(StringBuilder arg1) {
        return (A)withApiVersion(new String(arg1));
    }

    public A withNewApiVersion(StringBuffer arg1) {
        return (A)withApiVersion(new String(arg1));
    }

    public String getHandler() {
        return this.handler;
    }

    public A withHandler(String handler) {
        this.handler=handler; return (A) this;
    }

    public Boolean hasHandler() {
        return this.handler != null;
    }

    public A withNewHandler(String arg1) {
        return (A)withHandler(new String(arg1));
    }

    public A withNewHandler(StringBuilder arg1) {
        return (A)withHandler(new String(arg1));
    }

    public A withNewHandler(StringBuffer arg1) {
        return (A)withHandler(new String(arg1));
    }

    public String getKind() {
        return this.kind;
    }

    public A withKind(String kind) {
        this.kind=kind; return (A) this;
    }

    public Boolean hasKind() {
        return this.kind != null;
    }

    public A withNewKind(String arg1) {
        return (A)withKind(new String(arg1));
    }

    public A withNewKind(StringBuilder arg1) {
        return (A)withKind(new String(arg1));
    }

    public A withNewKind(StringBuffer arg1) {
        return (A)withKind(new String(arg1));
    }

    
/**
 * This method has been deprecated, please use method buildMetadata instead.
 * @return The buildable object.
 */
@Deprecated public V1ObjectMeta getMetadata() {
        return this.metadata!=null?this.metadata.build():null;
    }

    public V1ObjectMeta buildMetadata() {
        return this.metadata!=null?this.metadata.build():null;
    }

    public A withMetadata(V1ObjectMeta metadata) {
        _visitables.get("metadata").remove(this.metadata);
        if (metadata!=null){ this.metadata= new V1ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} return (A) this;
    }

    public Boolean hasMetadata() {
        return this.metadata != null;
    }

    public V1RuntimeClassFluent.MetadataNested withNewMetadata() {
        return new MetadataNestedImpl();
    }

    public V1RuntimeClassFluent.MetadataNested withNewMetadataLike(V1ObjectMeta item) {
        return new MetadataNestedImpl(item);
    }

    public V1RuntimeClassFluent.MetadataNested editMetadata() {
        return withNewMetadataLike(getMetadata());
    }

    public V1RuntimeClassFluent.MetadataNested editOrNewMetadata() {
        return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ObjectMetaBuilder().build());
    }

    public V1RuntimeClassFluent.MetadataNested editOrNewMetadataLike(V1ObjectMeta item) {
        return withNewMetadataLike(getMetadata() != null ? getMetadata(): item);
    }

    
/**
 * This method has been deprecated, please use method buildOverhead instead.
 * @return The buildable object.
 */
@Deprecated public V1Overhead getOverhead() {
        return this.overhead!=null?this.overhead.build():null;
    }

    public V1Overhead buildOverhead() {
        return this.overhead!=null?this.overhead.build():null;
    }

    public A withOverhead(V1Overhead overhead) {
        _visitables.get("overhead").remove(this.overhead);
        if (overhead!=null){ this.overhead= new V1OverheadBuilder(overhead); _visitables.get("overhead").add(this.overhead);} return (A) this;
    }

    public Boolean hasOverhead() {
        return this.overhead != null;
    }

    public V1RuntimeClassFluent.OverheadNested withNewOverhead() {
        return new OverheadNestedImpl();
    }

    public V1RuntimeClassFluent.OverheadNested withNewOverheadLike(V1Overhead item) {
        return new OverheadNestedImpl(item);
    }

    public V1RuntimeClassFluent.OverheadNested editOverhead() {
        return withNewOverheadLike(getOverhead());
    }

    public V1RuntimeClassFluent.OverheadNested editOrNewOverhead() {
        return withNewOverheadLike(getOverhead() != null ? getOverhead(): new V1OverheadBuilder().build());
    }

    public V1RuntimeClassFluent.OverheadNested editOrNewOverheadLike(V1Overhead item) {
        return withNewOverheadLike(getOverhead() != null ? getOverhead(): item);
    }

    
/**
 * This method has been deprecated, please use method buildScheduling instead.
 * @return The buildable object.
 */
@Deprecated public V1Scheduling getScheduling() {
        return this.scheduling!=null?this.scheduling.build():null;
    }

    public V1Scheduling buildScheduling() {
        return this.scheduling!=null?this.scheduling.build():null;
    }

    public A withScheduling(V1Scheduling scheduling) {
        _visitables.get("scheduling").remove(this.scheduling);
        if (scheduling!=null){ this.scheduling= new V1SchedulingBuilder(scheduling); _visitables.get("scheduling").add(this.scheduling);} return (A) this;
    }

    public Boolean hasScheduling() {
        return this.scheduling != null;
    }

    public V1RuntimeClassFluent.SchedulingNested withNewScheduling() {
        return new SchedulingNestedImpl();
    }

    public V1RuntimeClassFluent.SchedulingNested withNewSchedulingLike(V1Scheduling item) {
        return new SchedulingNestedImpl(item);
    }

    public V1RuntimeClassFluent.SchedulingNested editScheduling() {
        return withNewSchedulingLike(getScheduling());
    }

    public V1RuntimeClassFluent.SchedulingNested editOrNewScheduling() {
        return withNewSchedulingLike(getScheduling() != null ? getScheduling(): new V1SchedulingBuilder().build());
    }

    public V1RuntimeClassFluent.SchedulingNested editOrNewSchedulingLike(V1Scheduling item) {
        return withNewSchedulingLike(getScheduling() != null ? getScheduling(): item);
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        V1RuntimeClassFluentImpl that = (V1RuntimeClassFluentImpl) o;
        if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != null) return false;
        if (handler != null ? !handler.equals(that.handler) :that.handler != null) return false;
        if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
        if (metadata != null ? !metadata.equals(that.metadata) :that.metadata != null) return false;
        if (overhead != null ? !overhead.equals(that.overhead) :that.overhead != null) return false;
        if (scheduling != null ? !scheduling.equals(that.scheduling) :that.scheduling != null) return false;
        return true;
    }

    public int hashCode() {
        return java.util.Objects.hash(apiVersion,  handler,  kind,  metadata,  overhead,  scheduling,  super.hashCode());
    }

    public class MetadataNestedImpl extends V1ObjectMetaFluentImpl> implements V1RuntimeClassFluent.MetadataNested,io.kubernetes.client.fluent.Nested {
        private final V1ObjectMetaBuilder builder;

        MetadataNestedImpl(V1ObjectMeta item) {
            this.builder = new V1ObjectMetaBuilder(this, item);
        }

        MetadataNestedImpl() {
            this.builder = new V1ObjectMetaBuilder(this);
        }

        public N and() {
             return (N) V1RuntimeClassFluentImpl.this.withMetadata(builder.build());
        }

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


    public class OverheadNestedImpl extends V1OverheadFluentImpl> implements V1RuntimeClassFluent.OverheadNested,io.kubernetes.client.fluent.Nested {
        private final V1OverheadBuilder builder;

        OverheadNestedImpl(V1Overhead item) {
            this.builder = new V1OverheadBuilder(this, item);
        }

        OverheadNestedImpl() {
            this.builder = new V1OverheadBuilder(this);
        }

        public N and() {
             return (N) V1RuntimeClassFluentImpl.this.withOverhead(builder.build());
        }

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


    public class SchedulingNestedImpl extends V1SchedulingFluentImpl> implements V1RuntimeClassFluent.SchedulingNested,io.kubernetes.client.fluent.Nested {
        private final V1SchedulingBuilder builder;

        SchedulingNestedImpl(V1Scheduling item) {
            this.builder = new V1SchedulingBuilder(this, item);
        }

        SchedulingNestedImpl() {
            this.builder = new V1SchedulingBuilder(this);
        }

        public N and() {
             return (N) V1RuntimeClassFluentImpl.this.withScheduling(builder.build());
        }

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


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy