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

annotations.io.alauda.kubernetes.api.model.DeleteOptionsFluentImpl Maven / Gradle / Ivy

There is a newer version: 0.2.12
Show newest version
package io.alauda.kubernetes.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.alauda.kubernetes.api.builder.Nested;
import java.lang.String;
import javax.validation.constraints.NotNull;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Long;
import java.lang.Object;
import java.lang.Boolean;

public class DeleteOptionsFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements DeleteOptionsFluent{

    private String propagationPolicy;
    private String apiVersion;
    private Long gracePeriodSeconds;
    private String kind;
    private Boolean orphanDependents;
    private PreconditionsBuilder preconditions;

    public DeleteOptionsFluentImpl(){
    }
    public DeleteOptionsFluentImpl(DeleteOptions instance){
            this.withPropagationPolicy(instance.getPropagationPolicy()); 
            this.withApiVersion(instance.getApiVersion()); 
            this.withGracePeriodSeconds(instance.getGracePeriodSeconds()); 
            this.withKind(instance.getKind()); 
            this.withOrphanDependents(instance.getOrphanDependents()); 
            this.withPreconditions(instance.getPreconditions()); 
    }

    public String getPropagationPolicy(){
            return this.propagationPolicy;
    }

    public A withPropagationPolicy(String propagationPolicy){
            this.propagationPolicy=propagationPolicy; return (A) this;
    }

    public Boolean hasPropagationPolicy(){
            return this.propagationPolicy!=null;
    }

    public String getApiVersion(){
            return this.apiVersion;
    }

    public A withApiVersion(String apiVersion){
            this.apiVersion=apiVersion; return (A) this;
    }

    public Boolean hasApiVersion(){
            return this.apiVersion!=null;
    }

    public Long getGracePeriodSeconds(){
            return this.gracePeriodSeconds;
    }

    public A withGracePeriodSeconds(Long gracePeriodSeconds){
            this.gracePeriodSeconds=gracePeriodSeconds; return (A) this;
    }

    public Boolean hasGracePeriodSeconds(){
            return this.gracePeriodSeconds!=null;
    }

    public String getKind(){
            return this.kind;
    }

    public A withKind(String kind){
            this.kind=kind; return (A) this;
    }

    public Boolean hasKind(){
            return this.kind!=null;
    }

    public Boolean isOrphanDependents(){
            return this.orphanDependents;
    }

    public A withOrphanDependents(Boolean orphanDependents){
            this.orphanDependents=orphanDependents; return (A) this;
    }

    public Boolean hasOrphanDependents(){
            return this.orphanDependents!=null;
    }

    
/**
 * This method has been deprecated, please use method buildPreconditions instead.
 */
@Deprecated public Preconditions getPreconditions(){
            return this.preconditions!=null?this.preconditions.build():null;
    }

    public Preconditions buildPreconditions(){
            return this.preconditions!=null?this.preconditions.build():null;
    }

    public A withPreconditions(Preconditions preconditions){
            _visitables.remove(this.preconditions);
            if (preconditions!=null){ this.preconditions= new PreconditionsBuilder(preconditions); _visitables.add(this.preconditions);} return (A) this;
    }

    public Boolean hasPreconditions(){
            return this.preconditions!=null;
    }

    public DeleteOptionsFluent.PreconditionsNested withNewPreconditions(){
            return new PreconditionsNestedImpl();
    }

    public DeleteOptionsFluent.PreconditionsNested withNewPreconditionsLike(Preconditions item){
            return new PreconditionsNestedImpl(item);
    }

    public DeleteOptionsFluent.PreconditionsNested editPreconditions(){
            return withNewPreconditionsLike(getPreconditions());
    }

    public DeleteOptionsFluent.PreconditionsNested editOrNewPreconditions(){
            return withNewPreconditionsLike(getPreconditions() != null ? getPreconditions(): new PreconditionsBuilder().build());
    }

    public DeleteOptionsFluent.PreconditionsNested editOrNewPreconditionsLike(Preconditions item){
            return withNewPreconditionsLike(getPreconditions() != null ? getPreconditions(): item);
    }

    public A withNewPreconditions(String uid){
            return (A)withPreconditions(new Preconditions(uid));
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            DeleteOptionsFluentImpl that = (DeleteOptionsFluentImpl) o;
            if (propagationPolicy != null ? !propagationPolicy.equals(that.propagationPolicy) :that.propagationPolicy != null) return false;
            if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != null) return false;
            if (gracePeriodSeconds != null ? !gracePeriodSeconds.equals(that.gracePeriodSeconds) :that.gracePeriodSeconds != null) return false;
            if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
            if (orphanDependents != null ? !orphanDependents.equals(that.orphanDependents) :that.orphanDependents != null) return false;
            if (preconditions != null ? !preconditions.equals(that.preconditions) :that.preconditions != null) return false;
            return true;
    }


    public class PreconditionsNestedImpl extends PreconditionsFluentImpl> implements DeleteOptionsFluent.PreconditionsNested,io.alauda.kubernetes.api.builder.Nested{

            private final PreconditionsBuilder builder;
    
            PreconditionsNestedImpl(Preconditions item){
                    this.builder = new PreconditionsBuilder(this, item);
            }
            PreconditionsNestedImpl(){
                    this.builder = new PreconditionsBuilder(this);
            }
    
    public N and(){
            return (N) DeleteOptionsFluentImpl.this.withPreconditions(builder.build());
    }
    public N endPreconditions(){
            return and();
    }

}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy