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

io.kubernetes.client.openapi.models.V2beta2ResourceMetricStatusFluentImpl 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.StringBuffer;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class V2beta2ResourceMetricStatusFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V2beta2ResourceMetricStatusFluent {

    private V2beta2MetricValueStatusBuilder current;
    private String name;

    public V2beta2ResourceMetricStatusFluentImpl() { 
    }


    public V2beta2ResourceMetricStatusFluentImpl(V2beta2ResourceMetricStatus instance) { 
        this.withCurrent(instance.getCurrent());

        this.withName(instance.getName());

    }


    
/**
 * This method has been deprecated, please use method buildCurrent instead.
 * @return The buildable object.
 */
@Deprecated public V2beta2MetricValueStatus getCurrent() {
        return this.current!=null?this.current.build():null;
    }

    public V2beta2MetricValueStatus buildCurrent() {
        return this.current!=null?this.current.build():null;
    }

    public A withCurrent(V2beta2MetricValueStatus current) {
        _visitables.get("current").remove(this.current);
        if (current!=null){ this.current= new V2beta2MetricValueStatusBuilder(current); _visitables.get("current").add(this.current);} return (A) this;
    }

    public Boolean hasCurrent() {
        return this.current != null;
    }

    public V2beta2ResourceMetricStatusFluent.CurrentNested withNewCurrent() {
        return new CurrentNestedImpl();
    }

    public V2beta2ResourceMetricStatusFluent.CurrentNested withNewCurrentLike(V2beta2MetricValueStatus item) {
        return new CurrentNestedImpl(item);
    }

    public V2beta2ResourceMetricStatusFluent.CurrentNested editCurrent() {
        return withNewCurrentLike(getCurrent());
    }

    public V2beta2ResourceMetricStatusFluent.CurrentNested editOrNewCurrent() {
        return withNewCurrentLike(getCurrent() != null ? getCurrent(): new V2beta2MetricValueStatusBuilder().build());
    }

    public V2beta2ResourceMetricStatusFluent.CurrentNested editOrNewCurrentLike(V2beta2MetricValueStatus item) {
        return withNewCurrentLike(getCurrent() != null ? getCurrent(): item);
    }

    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 boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        V2beta2ResourceMetricStatusFluentImpl that = (V2beta2ResourceMetricStatusFluentImpl) o;
        if (current != null ? !current.equals(that.current) :that.current != null) return false;
        if (name != null ? !name.equals(that.name) :that.name != null) return false;
        return true;
    }

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

    public class CurrentNestedImpl extends V2beta2MetricValueStatusFluentImpl> implements V2beta2ResourceMetricStatusFluent.CurrentNested,io.kubernetes.client.fluent.Nested {
        private final V2beta2MetricValueStatusBuilder builder;

        CurrentNestedImpl(V2beta2MetricValueStatus item) {
            this.builder = new V2beta2MetricValueStatusBuilder(this, item);
        }

        CurrentNestedImpl() {
            this.builder = new V2beta2MetricValueStatusBuilder(this);
        }

        public N and() {
             return (N) V2beta2ResourceMetricStatusFluentImpl.this.withCurrent(builder.build());
        }

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


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy