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

annotations.io.fabric8.knative.dev.duck.v1beta1.DeliverySpecFluentImpl Maven / Gradle / Ivy

package io.fabric8.knative.dev.duck.v1beta1;

import io.fabric8.knative.duck.v1.Destination;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.StringBuilder;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Integer;
import java.lang.StringBuffer;
import java.lang.Deprecated;
import io.fabric8.knative.duck.v1.DestinationBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import io.fabric8.knative.duck.v1.DestinationFluentImpl;
import java.lang.Boolean;

public class DeliverySpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements DeliverySpecFluent{

    private String backoffDelay;
    private String backoffPolicy;
    private DestinationBuilder deadLetterSink;
    private Integer retry;

    public DeliverySpecFluentImpl(){
    }
    public DeliverySpecFluentImpl(DeliverySpec instance){
            this.withBackoffDelay(instance.getBackoffDelay()); 
            this.withBackoffPolicy(instance.getBackoffPolicy()); 
            this.withDeadLetterSink(instance.getDeadLetterSink()); 
            this.withRetry(instance.getRetry()); 
    }

    public String getBackoffDelay(){
            return this.backoffDelay;
    }

    public A withBackoffDelay(String backoffDelay){
            this.backoffDelay=backoffDelay; return (A) this;
    }

    public Boolean hasBackoffDelay(){
            return this.backoffDelay != null;
    }

    public A withNewBackoffDelay(String arg1){
            return (A)withBackoffDelay(new String(arg1));
    }

    public A withNewBackoffDelay(StringBuilder arg1){
            return (A)withBackoffDelay(new String(arg1));
    }

    public A withNewBackoffDelay(StringBuffer arg1){
            return (A)withBackoffDelay(new String(arg1));
    }

    public String getBackoffPolicy(){
            return this.backoffPolicy;
    }

    public A withBackoffPolicy(String backoffPolicy){
            this.backoffPolicy=backoffPolicy; return (A) this;
    }

    public Boolean hasBackoffPolicy(){
            return this.backoffPolicy != null;
    }

    public A withNewBackoffPolicy(String arg1){
            return (A)withBackoffPolicy(new String(arg1));
    }

    public A withNewBackoffPolicy(StringBuilder arg1){
            return (A)withBackoffPolicy(new String(arg1));
    }

    public A withNewBackoffPolicy(StringBuffer arg1){
            return (A)withBackoffPolicy(new String(arg1));
    }

    
/**
 * This method has been deprecated, please use method buildDeadLetterSink instead.
 * @return The buildable object.
 */
@java.lang.Deprecated public Destination getDeadLetterSink(){
            return this.deadLetterSink!=null?this.deadLetterSink.build():null;
    }

    public Destination buildDeadLetterSink(){
            return this.deadLetterSink!=null?this.deadLetterSink.build():null;
    }

    public A withDeadLetterSink(Destination deadLetterSink){
            _visitables.get("deadLetterSink").remove(this.deadLetterSink);
            if (deadLetterSink!=null){ this.deadLetterSink= new DestinationBuilder(deadLetterSink); _visitables.get("deadLetterSink").add(this.deadLetterSink);} return (A) this;
    }

    public Boolean hasDeadLetterSink(){
            return this.deadLetterSink != null;
    }

    public DeliverySpecFluent.DeadLetterSinkNested withNewDeadLetterSink(){
            return new DeadLetterSinkNestedImpl();
    }

    public DeliverySpecFluent.DeadLetterSinkNested withNewDeadLetterSinkLike(Destination item){
            return new DeadLetterSinkNestedImpl(item);
    }

    public DeliverySpecFluent.DeadLetterSinkNested editDeadLetterSink(){
            return withNewDeadLetterSinkLike(getDeadLetterSink());
    }

    public DeliverySpecFluent.DeadLetterSinkNested editOrNewDeadLetterSink(){
            return withNewDeadLetterSinkLike(getDeadLetterSink() != null ? getDeadLetterSink(): new DestinationBuilder().build());
    }

    public DeliverySpecFluent.DeadLetterSinkNested editOrNewDeadLetterSinkLike(Destination item){
            return withNewDeadLetterSinkLike(getDeadLetterSink() != null ? getDeadLetterSink(): item);
    }

    public Integer getRetry(){
            return this.retry;
    }

    public A withRetry(Integer retry){
            this.retry=retry; return (A) this;
    }

    public Boolean hasRetry(){
            return this.retry != null;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            DeliverySpecFluentImpl that = (DeliverySpecFluentImpl) o;
            if (backoffDelay != null ? !backoffDelay.equals(that.backoffDelay) :that.backoffDelay != null) return false;
            if (backoffPolicy != null ? !backoffPolicy.equals(that.backoffPolicy) :that.backoffPolicy != null) return false;
            if (deadLetterSink != null ? !deadLetterSink.equals(that.deadLetterSink) :that.deadLetterSink != null) return false;
            if (retry != null ? !retry.equals(that.retry) :that.retry != null) return false;
            return true;
    }


    public class DeadLetterSinkNestedImpl extends DestinationFluentImpl> implements DeliverySpecFluent.DeadLetterSinkNested,io.fabric8.kubernetes.api.builder.Nested{

            private final DestinationBuilder builder;
    
            DeadLetterSinkNestedImpl(Destination item){
                    this.builder = new DestinationBuilder(this, item);
            }
            DeadLetterSinkNestedImpl(){
                    this.builder = new DestinationBuilder(this);
            }
    
    public N and(){
            return (N) DeliverySpecFluentImpl.this.withDeadLetterSink(builder.build());
    }
    public N endDeadLetterSink(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy