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

me.snowdrop.istio.api.model.v1.mixer.PreconditionResultFluentImpl Maven / Gradle / Ivy

package me.snowdrop.istio.api.model.v1.mixer;

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Boolean;
import me.snowdrop.istio.api.model.Status;
import java.lang.Integer;
import javax.validation.Valid;
import me.snowdrop.istio.api.model.StatusFluentImpl;
import java.lang.Long;
import java.lang.Object;
import me.snowdrop.istio.api.model.StatusBuilder;

public class PreconditionResultFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements PreconditionResultFluent{

    private CompressedAttributesBuilder attributes;
    private ReferencedAttributesBuilder referencedAttributes;
    private StatusBuilder status;
    private Long validDuration;
    private Integer validUseCount;

    public PreconditionResultFluentImpl(){
    }
    public PreconditionResultFluentImpl(PreconditionResult instance){
            this.withAttributes(instance.getAttributes()); 
            this.withReferencedAttributes(instance.getReferencedAttributes()); 
            this.withStatus(instance.getStatus()); 
            this.withValidDuration(instance.getValidDuration()); 
            this.withValidUseCount(instance.getValidUseCount()); 
    }

    
/**
 * This method has been deprecated, please use method buildAttributes instead.
 */
@Deprecated public CompressedAttributes getAttributes(){
            return this.attributes!=null?this.attributes.build():null;
    }

    public CompressedAttributes buildAttributes(){
            return this.attributes!=null?this.attributes.build():null;
    }

    public A withAttributes(CompressedAttributes attributes){
            _visitables.remove(this.attributes);
            if (attributes!=null){ this.attributes= new CompressedAttributesBuilder(attributes); _visitables.add(this.attributes);} return (A) this;
    }

    public Boolean hasAttributes(){
            return this.attributes != null;
    }

    public PreconditionResultFluent.AttributesNested withNewAttributes(){
            return new AttributesNestedImpl();
    }

    public PreconditionResultFluent.AttributesNested withNewAttributesLike(CompressedAttributes item){
            return new AttributesNestedImpl(item);
    }

    public PreconditionResultFluent.AttributesNested editAttributes(){
            return withNewAttributesLike(getAttributes());
    }

    public PreconditionResultFluent.AttributesNested editOrNewAttributes(){
            return withNewAttributesLike(getAttributes() != null ? getAttributes(): new CompressedAttributesBuilder().build());
    }

    public PreconditionResultFluent.AttributesNested editOrNewAttributesLike(CompressedAttributes item){
            return withNewAttributesLike(getAttributes() != null ? getAttributes(): item);
    }

    
/**
 * This method has been deprecated, please use method buildReferencedAttributes instead.
 */
@Deprecated public ReferencedAttributes getReferencedAttributes(){
            return this.referencedAttributes!=null?this.referencedAttributes.build():null;
    }

    public ReferencedAttributes buildReferencedAttributes(){
            return this.referencedAttributes!=null?this.referencedAttributes.build():null;
    }

    public A withReferencedAttributes(ReferencedAttributes referencedAttributes){
            _visitables.remove(this.referencedAttributes);
            if (referencedAttributes!=null){ this.referencedAttributes= new ReferencedAttributesBuilder(referencedAttributes); _visitables.add(this.referencedAttributes);} return (A) this;
    }

    public Boolean hasReferencedAttributes(){
            return this.referencedAttributes != null;
    }

    public PreconditionResultFluent.ReferencedAttributesNested withNewReferencedAttributes(){
            return new ReferencedAttributesNestedImpl();
    }

    public PreconditionResultFluent.ReferencedAttributesNested withNewReferencedAttributesLike(ReferencedAttributes item){
            return new ReferencedAttributesNestedImpl(item);
    }

    public PreconditionResultFluent.ReferencedAttributesNested editReferencedAttributes(){
            return withNewReferencedAttributesLike(getReferencedAttributes());
    }

    public PreconditionResultFluent.ReferencedAttributesNested editOrNewReferencedAttributes(){
            return withNewReferencedAttributesLike(getReferencedAttributes() != null ? getReferencedAttributes(): new ReferencedAttributesBuilder().build());
    }

    public PreconditionResultFluent.ReferencedAttributesNested editOrNewReferencedAttributesLike(ReferencedAttributes item){
            return withNewReferencedAttributesLike(getReferencedAttributes() != null ? getReferencedAttributes(): item);
    }

    
/**
 * This method has been deprecated, please use method buildStatus instead.
 */
@Deprecated public me.snowdrop.istio.api.model.Status getStatus(){
            return this.status!=null?this.status.build():null;
    }

    public me.snowdrop.istio.api.model.Status buildStatus(){
            return this.status!=null?this.status.build():null;
    }

    public A withStatus(me.snowdrop.istio.api.model.Status status){
            _visitables.remove(this.status);
            if (status!=null){ this.status= new StatusBuilder(status); _visitables.add(this.status);} return (A) this;
    }

    public Boolean hasStatus(){
            return this.status != null;
    }

    public PreconditionResultFluent.IstioStatusNested withNewIstioStatus(){
            return new IstioStatusNestedImpl();
    }

    public PreconditionResultFluent.IstioStatusNested withNewStatusLike(me.snowdrop.istio.api.model.Status item){
            return new IstioStatusNestedImpl(item);
    }

    public PreconditionResultFluent.IstioStatusNested editIstioStatus(){
            return withNewStatusLike(getStatus());
    }

    public PreconditionResultFluent.IstioStatusNested editOrNewStatus(){
            return withNewStatusLike(getStatus() != null ? getStatus(): new StatusBuilder().build());
    }

    public PreconditionResultFluent.IstioStatusNested editOrNewStatusLike(me.snowdrop.istio.api.model.Status item){
            return withNewStatusLike(getStatus() != null ? getStatus(): item);
    }

    public Long getValidDuration(){
            return this.validDuration;
    }

    public A withValidDuration(Long validDuration){
            this.validDuration=validDuration; return (A) this;
    }

    public Boolean hasValidDuration(){
            return this.validDuration != null;
    }

    public A withNewValidDuration(String arg1){
            return (A)withValidDuration(new Long(arg1));
    }

    public A withNewValidDuration(long arg1){
            return (A)withValidDuration(new Long(arg1));
    }

    public Integer getValidUseCount(){
            return this.validUseCount;
    }

    public A withValidUseCount(Integer validUseCount){
            this.validUseCount=validUseCount; return (A) this;
    }

    public Boolean hasValidUseCount(){
            return this.validUseCount != null;
    }

    public A withNewValidUseCount(int arg1){
            return (A)withValidUseCount(new Integer(arg1));
    }

    public A withNewValidUseCount(String arg1){
            return (A)withValidUseCount(new Integer(arg1));
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            PreconditionResultFluentImpl that = (PreconditionResultFluentImpl) o;
            if (attributes != null ? !attributes.equals(that.attributes) :that.attributes != null) return false;
            if (referencedAttributes != null ? !referencedAttributes.equals(that.referencedAttributes) :that.referencedAttributes != null) return false;
            if (status != null ? !status.equals(that.status) :that.status != null) return false;
            if (validDuration != null ? !validDuration.equals(that.validDuration) :that.validDuration != null) return false;
            if (validUseCount != null ? !validUseCount.equals(that.validUseCount) :that.validUseCount != null) return false;
            return true;
    }


    public class AttributesNestedImpl extends CompressedAttributesFluentImpl> implements PreconditionResultFluent.AttributesNested,io.fabric8.kubernetes.api.builder.Nested{

            private final CompressedAttributesBuilder builder;
    
            AttributesNestedImpl(CompressedAttributes item){
                    this.builder = new CompressedAttributesBuilder(this, item);
            }
            AttributesNestedImpl(){
                    this.builder = new CompressedAttributesBuilder(this);
            }
    
    public N and(){
            return (N) PreconditionResultFluentImpl.this.withAttributes(builder.build());
    }
    public N endAttributes(){
            return and();
    }

}
    public class ReferencedAttributesNestedImpl extends ReferencedAttributesFluentImpl> implements PreconditionResultFluent.ReferencedAttributesNested,io.fabric8.kubernetes.api.builder.Nested{

            private final ReferencedAttributesBuilder builder;
    
            ReferencedAttributesNestedImpl(ReferencedAttributes item){
                    this.builder = new ReferencedAttributesBuilder(this, item);
            }
            ReferencedAttributesNestedImpl(){
                    this.builder = new ReferencedAttributesBuilder(this);
            }
    
    public N and(){
            return (N) PreconditionResultFluentImpl.this.withReferencedAttributes(builder.build());
    }
    public N endReferencedAttributes(){
            return and();
    }

}
    public class IstioStatusNestedImpl extends StatusFluentImpl> implements PreconditionResultFluent.IstioStatusNested,io.fabric8.kubernetes.api.builder.Nested{

            private final StatusBuilder builder;
    
            IstioStatusNestedImpl(me.snowdrop.istio.api.model.Status item){
                    this.builder = new StatusBuilder(this, item);
            }
            IstioStatusNestedImpl(){
                    this.builder = new StatusBuilder(this);
            }
    
    public N and(){
            return (N) PreconditionResultFluentImpl.this.withStatus(builder.build());
    }
    public N endIstioStatus(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy