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

io.kubernetes.client.models.V1APIResourceBuilder Maven / Gradle / Ivy

package io.kubernetes.client.models;

import io.kubernetes.client.fluent.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

public class V1APIResourceBuilder extends V1APIResourceFluentImpl implements VisitableBuilder{

    V1APIResourceFluent fluent;
    Boolean validationEnabled;

    public V1APIResourceBuilder(){
            this(true);
    }
    public V1APIResourceBuilder(Boolean validationEnabled){
            this(new V1APIResource(), validationEnabled);
    }
    public V1APIResourceBuilder(V1APIResourceFluent fluent){
            this(fluent, true);
    }
    public V1APIResourceBuilder(V1APIResourceFluent fluent,Boolean validationEnabled){
            this(fluent, new V1APIResource(), validationEnabled);
    }
    public V1APIResourceBuilder(V1APIResourceFluent fluent,V1APIResource instance){
            this(fluent, instance, true);
    }
    public V1APIResourceBuilder(V1APIResourceFluent fluent,V1APIResource instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withCategories(instance.getCategories());

            fluent.withGroup(instance.getGroup());

            fluent.withKind(instance.getKind());

            fluent.withName(instance.getName());

            fluent.withNamespaced(instance.isNamespaced());

            fluent.withShortNames(instance.getShortNames());

            fluent.withSingularName(instance.getSingularName());

            fluent.withVerbs(instance.getVerbs());

            fluent.withVersion(instance.getVersion());

            this.validationEnabled = validationEnabled; 
    }
    public V1APIResourceBuilder(V1APIResource instance){
            this(instance,true);
    }
    public V1APIResourceBuilder(V1APIResource instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withCategories(instance.getCategories());

            this.withGroup(instance.getGroup());

            this.withKind(instance.getKind());

            this.withName(instance.getName());

            this.withNamespaced(instance.isNamespaced());

            this.withShortNames(instance.getShortNames());

            this.withSingularName(instance.getSingularName());

            this.withVerbs(instance.getVerbs());

            this.withVersion(instance.getVersion());

            this.validationEnabled = validationEnabled; 
    }

    public V1APIResource build(){
            V1APIResource buildable = new V1APIResource();
            buildable.setCategories(fluent.getCategories());
            buildable.setGroup(fluent.getGroup());
            buildable.setKind(fluent.getKind());
            buildable.setName(fluent.getName());
            buildable.setNamespaced(fluent.isNamespaced());
            buildable.setShortNames(fluent.getShortNames());
            buildable.setSingularName(fluent.getSingularName());
            buildable.setVerbs(fluent.getVerbs());
            buildable.setVersion(fluent.getVersion());
            return buildable;
    }

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

            if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
            return true;
    }




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy