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

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

package io.kubernetes.client.models;

import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.lang.Deprecated;
import java.lang.Byte;
import io.kubernetes.client.fluent.BaseFluent;
import java.util.Collection;
import java.lang.Object;
import java.util.List;
import java.lang.Boolean;

public class V1beta1WebhookClientConfigFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta1WebhookClientConfigFluent{

    private List caBundle;
    private AdmissionregistrationV1beta1ServiceReferenceBuilder service;
    private String url;

    public V1beta1WebhookClientConfigFluentImpl(){
    }
    public V1beta1WebhookClientConfigFluentImpl(V1beta1WebhookClientConfig instance){
            this.withCaBundle(instance.getCaBundle());

            this.withService(instance.getService());

            this.withUrl(instance.getUrl());

    }

    public A withCaBundle(byte... caBundle){
            this.caBundle.clear(); if (caBundle != null) {for (byte item :caBundle){ this.addToCaBundle(item);}} return (A) this;
    }

    public byte[] getCaBundle(){
            byte[] result = new byte[caBundle.size()];
int index=0;
for (byte item : caBundle) {
    result[index++]=item;
}
return result;

    }

    public A addToCaBundle(int index,Byte item){
            if (this.caBundle == null) {this.caBundle = null;}
            this.caBundle.add(index, item);
            return (A)this;
    }

    public A setToCaBundle(int index,Byte item){
            this.caBundle.set(index, item); return (A)this;
    }

    public A addToCaBundle(Byte... items){
            for (Byte item : items) {this.caBundle.add(item);} return (A)this;
    }

    public A addAllToCaBundle(Collection items){
            for (Byte item : items) {this.caBundle.add(item);} return (A)this;
    }

    public A removeFromCaBundle(Byte... items){
            for (Byte item : items) {if (this.caBundle!= null){ this.caBundle.remove(item);}} return (A)this;
    }

    public A removeAllFromCaBundle(Collection items){
            for (Byte item : items) {if (this.caBundle!= null){ this.caBundle.remove(item);}} return (A)this;
    }

    public Boolean hasCaBundle(){
            return caBundle != null && !caBundle.isEmpty();
    }

    public A addNewCaBundle(byte arg1){
            return (A)addToCaBundle(new Byte(arg1));
    }

    public A addNewCaBundle(String arg1){
            return (A)addToCaBundle(new Byte(arg1));
    }

    
/**
 * This method has been deprecated, please use method buildService instead.
 */
@Deprecated public AdmissionregistrationV1beta1ServiceReference getService(){
            return this.service!=null?this.service.build():null;
    }

    public AdmissionregistrationV1beta1ServiceReference buildService(){
            return this.service!=null?this.service.build():null;
    }

    public A withService(AdmissionregistrationV1beta1ServiceReference service){
            _visitables.remove(this.service);
            if (service!=null){ this.service= new AdmissionregistrationV1beta1ServiceReferenceBuilder(service); _visitables.add(this.service);} return (A) this;
    }

    public Boolean hasService(){
            return this.service != null;
    }

    public V1beta1WebhookClientConfigFluent.ServiceNested withNewService(){
            return new ServiceNestedImpl();
    }

    public V1beta1WebhookClientConfigFluent.ServiceNested withNewServiceLike(AdmissionregistrationV1beta1ServiceReference item){
            return new ServiceNestedImpl(item);
    }

    public V1beta1WebhookClientConfigFluent.ServiceNested editService(){
            return withNewServiceLike(getService());
    }

    public V1beta1WebhookClientConfigFluent.ServiceNested editOrNewService(){
            return withNewServiceLike(getService() != null ? getService(): new AdmissionregistrationV1beta1ServiceReferenceBuilder().build());
    }

    public V1beta1WebhookClientConfigFluent.ServiceNested editOrNewServiceLike(AdmissionregistrationV1beta1ServiceReference item){
            return withNewServiceLike(getService() != null ? getService(): item);
    }

    public String getUrl(){
            return this.url;
    }

    public A withUrl(String url){
            this.url=url; return (A) this;
    }

    public Boolean hasUrl(){
            return this.url != null;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            V1beta1WebhookClientConfigFluentImpl that = (V1beta1WebhookClientConfigFluentImpl) o;
            if (caBundle != null ? !caBundle.equals(that.caBundle) :that.caBundle != null) return false;
            if (service != null ? !service.equals(that.service) :that.service != null) return false;
            if (url != null ? !url.equals(that.url) :that.url != null) return false;
            return true;
    }


    public class ServiceNestedImpl extends AdmissionregistrationV1beta1ServiceReferenceFluentImpl> implements V1beta1WebhookClientConfigFluent.ServiceNested,io.kubernetes.client.fluent.Nested{

            private final AdmissionregistrationV1beta1ServiceReferenceBuilder builder;
    
            ServiceNestedImpl(AdmissionregistrationV1beta1ServiceReference item){
                    this.builder = new AdmissionregistrationV1beta1ServiceReferenceBuilder(this, item);
            }
            ServiceNestedImpl(){
                    this.builder = new AdmissionregistrationV1beta1ServiceReferenceBuilder(this);
            }
    
    public N and(){
            return (N) V1beta1WebhookClientConfigFluentImpl.this.withService(builder.build());
    }
    public N endService(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy