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

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

    private String strategy;
    private V1WebhookConversionBuilder webhook;

    public V1CustomResourceConversionFluentImpl() { 
    }


    public V1CustomResourceConversionFluentImpl(V1CustomResourceConversion instance) { 
        this.withStrategy(instance.getStrategy());

        this.withWebhook(instance.getWebhook());

    }


    public String getStrategy() {
        return this.strategy;
    }

    public A withStrategy(String strategy) {
        this.strategy=strategy; return (A) this;
    }

    public Boolean hasStrategy() {
        return this.strategy != null;
    }

    public A withNewStrategy(String arg1) {
        return (A)withStrategy(new String(arg1));
    }

    public A withNewStrategy(StringBuilder arg1) {
        return (A)withStrategy(new String(arg1));
    }

    public A withNewStrategy(StringBuffer arg1) {
        return (A)withStrategy(new String(arg1));
    }

    
/**
 * This method has been deprecated, please use method buildWebhook instead.
 * @return The buildable object.
 */
@Deprecated public V1WebhookConversion getWebhook() {
        return this.webhook!=null?this.webhook.build():null;
    }

    public V1WebhookConversion buildWebhook() {
        return this.webhook!=null?this.webhook.build():null;
    }

    public A withWebhook(V1WebhookConversion webhook) {
        _visitables.get("webhook").remove(this.webhook);
        if (webhook!=null){ this.webhook= new V1WebhookConversionBuilder(webhook); _visitables.get("webhook").add(this.webhook);} return (A) this;
    }

    public Boolean hasWebhook() {
        return this.webhook != null;
    }

    public V1CustomResourceConversionFluent.WebhookNested withNewWebhook() {
        return new WebhookNestedImpl();
    }

    public V1CustomResourceConversionFluent.WebhookNested withNewWebhookLike(V1WebhookConversion item) {
        return new WebhookNestedImpl(item);
    }

    public V1CustomResourceConversionFluent.WebhookNested editWebhook() {
        return withNewWebhookLike(getWebhook());
    }

    public V1CustomResourceConversionFluent.WebhookNested editOrNewWebhook() {
        return withNewWebhookLike(getWebhook() != null ? getWebhook(): new V1WebhookConversionBuilder().build());
    }

    public V1CustomResourceConversionFluent.WebhookNested editOrNewWebhookLike(V1WebhookConversion item) {
        return withNewWebhookLike(getWebhook() != null ? getWebhook(): item);
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        V1CustomResourceConversionFluentImpl that = (V1CustomResourceConversionFluentImpl) o;
        if (strategy != null ? !strategy.equals(that.strategy) :that.strategy != null) return false;
        if (webhook != null ? !webhook.equals(that.webhook) :that.webhook != null) return false;
        return true;
    }

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

    public class WebhookNestedImpl extends V1WebhookConversionFluentImpl> implements V1CustomResourceConversionFluent.WebhookNested,io.kubernetes.client.fluent.Nested {
        private final V1WebhookConversionBuilder builder;

        WebhookNestedImpl(V1WebhookConversion item) {
            this.builder = new V1WebhookConversionBuilder(this, item);
        }

        WebhookNestedImpl() {
            this.builder = new V1WebhookConversionBuilder(this);
        }

        public N and() {
             return (N) V1CustomResourceConversionFluentImpl.this.withWebhook(builder.build());
        }

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


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy