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

annotations.me.snowdrop.servicecatalog.api.model.ServiceBindingStatusFluentImpl Maven / Gradle / Ivy

The newest version!
package me.snowdrop.servicecatalog.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.StringBuilder;
import io.fabric8.kubernetes.api.builder.Nested;
import java.util.ArrayList;
import java.lang.String;
import io.fabric8.kubernetes.api.builder.Predicate;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.List;
import java.lang.Boolean;
import java.lang.StringBuffer;
import javax.validation.Valid;
import java.lang.Long;
import java.util.Collection;
import java.lang.Object;

public class ServiceBindingStatusFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements ServiceBindingStatusFluent{

    private Boolean asyncOpInProgress;
    private List conditions;
    private String currentOperation;
    private ServiceBindingPropertiesStateBuilder externalProperties;
    private ServiceBindingPropertiesStateBuilder inProgressProperties;
    private String lastOperation;
    private String operationStartTime;
    private Boolean orphanMitigationInProgress;
    private Long reconciledGeneration;
    private String unbindStatus;

    public ServiceBindingStatusFluentImpl(){
    }
    public ServiceBindingStatusFluentImpl(ServiceBindingStatus instance){
            this.withAsyncOpInProgress(instance.getAsyncOpInProgress()); 
            this.withConditions(instance.getConditions()); 
            this.withCurrentOperation(instance.getCurrentOperation()); 
            this.withExternalProperties(instance.getExternalProperties()); 
            this.withInProgressProperties(instance.getInProgressProperties()); 
            this.withLastOperation(instance.getLastOperation()); 
            this.withOperationStartTime(instance.getOperationStartTime()); 
            this.withOrphanMitigationInProgress(instance.getOrphanMitigationInProgress()); 
            this.withReconciledGeneration(instance.getReconciledGeneration()); 
            this.withUnbindStatus(instance.getUnbindStatus()); 
    }

    public Boolean isAsyncOpInProgress(){
            return this.asyncOpInProgress;
    }

    public A withAsyncOpInProgress(Boolean asyncOpInProgress){
            this.asyncOpInProgress=asyncOpInProgress; return (A) this;
    }

    public Boolean hasAsyncOpInProgress(){
            return this.asyncOpInProgress != null;
    }

    public A withNewAsyncOpInProgress(String arg1){
            return (A)withAsyncOpInProgress(new Boolean(arg1));
    }

    public A withNewAsyncOpInProgress(boolean arg1){
            return (A)withAsyncOpInProgress(new Boolean(arg1));
    }

    public A addToConditions(int index,ServiceBindingCondition item){
            if (this.conditions == null) {this.conditions = new ArrayList();}
            ServiceBindingConditionBuilder builder = new ServiceBindingConditionBuilder(item);_visitables.get("conditions").add(index >= 0 ? index : _visitables.get("conditions").size(), builder);this.conditions.add(index >= 0 ? index : conditions.size(), builder); return (A)this;
    }

    public A setToConditions(int index,ServiceBindingCondition item){
            if (this.conditions == null) {this.conditions = new ArrayList();}
            ServiceBindingConditionBuilder builder = new ServiceBindingConditionBuilder(item);
            if (index < 0 || index >= _visitables.get("conditions").size()) { _visitables.get("conditions").add(builder); } else { _visitables.get("conditions").set(index, builder);}
            if (index < 0 || index >= conditions.size()) { conditions.add(builder); } else { conditions.set(index, builder);}
             return (A)this;
    }

    public A addToConditions(ServiceBindingCondition... items){
            if (this.conditions == null) {this.conditions = new ArrayList();}
            for (ServiceBindingCondition item : items) {ServiceBindingConditionBuilder builder = new ServiceBindingConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this;
    }

    public A addAllToConditions(Collection items){
            if (this.conditions == null) {this.conditions = new ArrayList();}
            for (ServiceBindingCondition item : items) {ServiceBindingConditionBuilder builder = new ServiceBindingConditionBuilder(item);_visitables.get("conditions").add(builder);this.conditions.add(builder);} return (A)this;
    }

    public A removeFromConditions(ServiceBindingCondition... items){
            for (ServiceBindingCondition item : items) {ServiceBindingConditionBuilder builder = new ServiceBindingConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this;
    }

    public A removeAllFromConditions(Collection items){
            for (ServiceBindingCondition item : items) {ServiceBindingConditionBuilder builder = new ServiceBindingConditionBuilder(item);_visitables.get("conditions").remove(builder);if (this.conditions != null) {this.conditions.remove(builder);}} return (A)this;
    }

    
/**
 * This method has been deprecated, please use method buildConditions instead.
 * @return The buildable object.
 */
@Deprecated public List getConditions(){
            return build(conditions);
    }

    public List buildConditions(){
            return build(conditions);
    }

    public ServiceBindingCondition buildCondition(int index){
            return this.conditions.get(index).build();
    }

    public ServiceBindingCondition buildFirstCondition(){
            return this.conditions.get(0).build();
    }

    public ServiceBindingCondition buildLastCondition(){
            return this.conditions.get(conditions.size() - 1).build();
    }

    public ServiceBindingCondition buildMatchingCondition(io.fabric8.kubernetes.api.builder.Predicate predicate){
            for (ServiceBindingConditionBuilder item: conditions) { if(predicate.apply(item)){return item.build();} } return null;
    }

    public Boolean hasMatchingCondition(io.fabric8.kubernetes.api.builder.Predicate predicate){
            for (ServiceBindingConditionBuilder item: conditions) { if(predicate.apply(item)){return true;} } return false;
    }

    public A withConditions(List conditions){
            if (this.conditions != null) { _visitables.get("conditions").removeAll(this.conditions);}
            if (conditions != null) {this.conditions = new ArrayList(); for (ServiceBindingCondition item : conditions){this.addToConditions(item);}} else { this.conditions = null;} return (A) this;
    }

    public A withConditions(ServiceBindingCondition... conditions){
            if (this.conditions != null) {this.conditions.clear();}
            if (conditions != null) {for (ServiceBindingCondition item :conditions){ this.addToConditions(item);}} return (A) this;
    }

    public Boolean hasConditions(){
            return conditions != null && !conditions.isEmpty();
    }

    public A addNewCondition(String lastTransitionTime,String message,String reason,String status,String type){
            return (A)addToConditions(new ServiceBindingCondition(lastTransitionTime, message, reason, status, type));
    }

    public ServiceBindingStatusFluent.ConditionsNested addNewCondition(){
            return new ConditionsNestedImpl();
    }

    public ServiceBindingStatusFluent.ConditionsNested addNewConditionLike(ServiceBindingCondition item){
            return new ConditionsNestedImpl(-1, item);
    }

    public ServiceBindingStatusFluent.ConditionsNested setNewConditionLike(int index,ServiceBindingCondition item){
            return new ConditionsNestedImpl(index, item);
    }

    public ServiceBindingStatusFluent.ConditionsNested editCondition(int index){
            if (conditions.size() <= index) throw new RuntimeException("Can't edit conditions. Index exceeds size.");
            return setNewConditionLike(index, buildCondition(index));
    }

    public ServiceBindingStatusFluent.ConditionsNested editFirstCondition(){
            if (conditions.size() == 0) throw new RuntimeException("Can't edit first conditions. The list is empty.");
            return setNewConditionLike(0, buildCondition(0));
    }

    public ServiceBindingStatusFluent.ConditionsNested editLastCondition(){
            int index = conditions.size() - 1;
            if (index < 0) throw new RuntimeException("Can't edit last conditions. The list is empty.");
            return setNewConditionLike(index, buildCondition(index));
    }

    public ServiceBindingStatusFluent.ConditionsNested editMatchingCondition(io.fabric8.kubernetes.api.builder.Predicate predicate){
            int index = -1;
            for (int i=0;i withNewExternalProperties(){
            return new ExternalPropertiesNestedImpl();
    }

    public ServiceBindingStatusFluent.ExternalPropertiesNested withNewExternalPropertiesLike(ServiceBindingPropertiesState item){
            return new ExternalPropertiesNestedImpl(item);
    }

    public ServiceBindingStatusFluent.ExternalPropertiesNested editExternalProperties(){
            return withNewExternalPropertiesLike(getExternalProperties());
    }

    public ServiceBindingStatusFluent.ExternalPropertiesNested editOrNewExternalProperties(){
            return withNewExternalPropertiesLike(getExternalProperties() != null ? getExternalProperties(): new ServiceBindingPropertiesStateBuilder().build());
    }

    public ServiceBindingStatusFluent.ExternalPropertiesNested editOrNewExternalPropertiesLike(ServiceBindingPropertiesState item){
            return withNewExternalPropertiesLike(getExternalProperties() != null ? getExternalProperties(): item);
    }

    
/**
 * This method has been deprecated, please use method buildInProgressProperties instead.
 * @return The buildable object.
 */
@Deprecated public ServiceBindingPropertiesState getInProgressProperties(){
            return this.inProgressProperties!=null?this.inProgressProperties.build():null;
    }

    public ServiceBindingPropertiesState buildInProgressProperties(){
            return this.inProgressProperties!=null?this.inProgressProperties.build():null;
    }

    public A withInProgressProperties(ServiceBindingPropertiesState inProgressProperties){
            _visitables.get("inProgressProperties").remove(this.inProgressProperties);
            if (inProgressProperties!=null){ this.inProgressProperties= new ServiceBindingPropertiesStateBuilder(inProgressProperties); _visitables.get("inProgressProperties").add(this.inProgressProperties);} return (A) this;
    }

    public Boolean hasInProgressProperties(){
            return this.inProgressProperties != null;
    }

    public ServiceBindingStatusFluent.InProgressPropertiesNested withNewInProgressProperties(){
            return new InProgressPropertiesNestedImpl();
    }

    public ServiceBindingStatusFluent.InProgressPropertiesNested withNewInProgressPropertiesLike(ServiceBindingPropertiesState item){
            return new InProgressPropertiesNestedImpl(item);
    }

    public ServiceBindingStatusFluent.InProgressPropertiesNested editInProgressProperties(){
            return withNewInProgressPropertiesLike(getInProgressProperties());
    }

    public ServiceBindingStatusFluent.InProgressPropertiesNested editOrNewInProgressProperties(){
            return withNewInProgressPropertiesLike(getInProgressProperties() != null ? getInProgressProperties(): new ServiceBindingPropertiesStateBuilder().build());
    }

    public ServiceBindingStatusFluent.InProgressPropertiesNested editOrNewInProgressPropertiesLike(ServiceBindingPropertiesState item){
            return withNewInProgressPropertiesLike(getInProgressProperties() != null ? getInProgressProperties(): item);
    }

    public String getLastOperation(){
            return this.lastOperation;
    }

    public A withLastOperation(String lastOperation){
            this.lastOperation=lastOperation; return (A) this;
    }

    public Boolean hasLastOperation(){
            return this.lastOperation != null;
    }

    public A withNewLastOperation(String arg1){
            return (A)withLastOperation(new String(arg1));
    }

    public A withNewLastOperation(StringBuilder arg1){
            return (A)withLastOperation(new String(arg1));
    }

    public A withNewLastOperation(StringBuffer arg1){
            return (A)withLastOperation(new String(arg1));
    }

    public String getOperationStartTime(){
            return this.operationStartTime;
    }

    public A withOperationStartTime(String operationStartTime){
            this.operationStartTime=operationStartTime; return (A) this;
    }

    public Boolean hasOperationStartTime(){
            return this.operationStartTime != null;
    }

    public A withNewOperationStartTime(String arg1){
            return (A)withOperationStartTime(new String(arg1));
    }

    public A withNewOperationStartTime(StringBuilder arg1){
            return (A)withOperationStartTime(new String(arg1));
    }

    public A withNewOperationStartTime(StringBuffer arg1){
            return (A)withOperationStartTime(new String(arg1));
    }

    public Boolean isOrphanMitigationInProgress(){
            return this.orphanMitigationInProgress;
    }

    public A withOrphanMitigationInProgress(Boolean orphanMitigationInProgress){
            this.orphanMitigationInProgress=orphanMitigationInProgress; return (A) this;
    }

    public Boolean hasOrphanMitigationInProgress(){
            return this.orphanMitigationInProgress != null;
    }

    public A withNewOrphanMitigationInProgress(String arg1){
            return (A)withOrphanMitigationInProgress(new Boolean(arg1));
    }

    public A withNewOrphanMitigationInProgress(boolean arg1){
            return (A)withOrphanMitigationInProgress(new Boolean(arg1));
    }

    public Long getReconciledGeneration(){
            return this.reconciledGeneration;
    }

    public A withReconciledGeneration(Long reconciledGeneration){
            this.reconciledGeneration=reconciledGeneration; return (A) this;
    }

    public Boolean hasReconciledGeneration(){
            return this.reconciledGeneration != null;
    }

    public String getUnbindStatus(){
            return this.unbindStatus;
    }

    public A withUnbindStatus(String unbindStatus){
            this.unbindStatus=unbindStatus; return (A) this;
    }

    public Boolean hasUnbindStatus(){
            return this.unbindStatus != null;
    }

    public A withNewUnbindStatus(String arg1){
            return (A)withUnbindStatus(new String(arg1));
    }

    public A withNewUnbindStatus(StringBuilder arg1){
            return (A)withUnbindStatus(new String(arg1));
    }

    public A withNewUnbindStatus(StringBuffer arg1){
            return (A)withUnbindStatus(new String(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;
            ServiceBindingStatusFluentImpl that = (ServiceBindingStatusFluentImpl) o;
            if (asyncOpInProgress != null ? !asyncOpInProgress.equals(that.asyncOpInProgress) :that.asyncOpInProgress != null) return false;
            if (conditions != null ? !conditions.equals(that.conditions) :that.conditions != null) return false;
            if (currentOperation != null ? !currentOperation.equals(that.currentOperation) :that.currentOperation != null) return false;
            if (externalProperties != null ? !externalProperties.equals(that.externalProperties) :that.externalProperties != null) return false;
            if (inProgressProperties != null ? !inProgressProperties.equals(that.inProgressProperties) :that.inProgressProperties != null) return false;
            if (lastOperation != null ? !lastOperation.equals(that.lastOperation) :that.lastOperation != null) return false;
            if (operationStartTime != null ? !operationStartTime.equals(that.operationStartTime) :that.operationStartTime != null) return false;
            if (orphanMitigationInProgress != null ? !orphanMitigationInProgress.equals(that.orphanMitigationInProgress) :that.orphanMitigationInProgress != null) return false;
            if (reconciledGeneration != null ? !reconciledGeneration.equals(that.reconciledGeneration) :that.reconciledGeneration != null) return false;
            if (unbindStatus != null ? !unbindStatus.equals(that.unbindStatus) :that.unbindStatus != null) return false;
            return true;
    }


    public class ConditionsNestedImpl extends ServiceBindingConditionFluentImpl> implements ServiceBindingStatusFluent.ConditionsNested,io.fabric8.kubernetes.api.builder.Nested{

            private final ServiceBindingConditionBuilder builder;
        private final int index;
    
            ConditionsNestedImpl(int index,ServiceBindingCondition item){
                    this.index = index;
                    this.builder = new ServiceBindingConditionBuilder(this, item);
            }
            ConditionsNestedImpl(){
                    this.index = -1;
                    this.builder = new ServiceBindingConditionBuilder(this);
            }
    
    public N and(){
            return (N) ServiceBindingStatusFluentImpl.this.setToConditions(index, builder.build());
    }
    public N endCondition(){
            return and();
    }

}
    public class ExternalPropertiesNestedImpl extends ServiceBindingPropertiesStateFluentImpl> implements ServiceBindingStatusFluent.ExternalPropertiesNested,io.fabric8.kubernetes.api.builder.Nested{

            private final ServiceBindingPropertiesStateBuilder builder;
    
            ExternalPropertiesNestedImpl(ServiceBindingPropertiesState item){
                    this.builder = new ServiceBindingPropertiesStateBuilder(this, item);
            }
            ExternalPropertiesNestedImpl(){
                    this.builder = new ServiceBindingPropertiesStateBuilder(this);
            }
    
    public N and(){
            return (N) ServiceBindingStatusFluentImpl.this.withExternalProperties(builder.build());
    }
    public N endExternalProperties(){
            return and();
    }

}
    public class InProgressPropertiesNestedImpl extends ServiceBindingPropertiesStateFluentImpl> implements ServiceBindingStatusFluent.InProgressPropertiesNested,io.fabric8.kubernetes.api.builder.Nested{

            private final ServiceBindingPropertiesStateBuilder builder;
    
            InProgressPropertiesNestedImpl(ServiceBindingPropertiesState item){
                    this.builder = new ServiceBindingPropertiesStateBuilder(this, item);
            }
            InProgressPropertiesNestedImpl(){
                    this.builder = new ServiceBindingPropertiesStateBuilder(this);
            }
    
    public N and(){
            return (N) ServiceBindingStatusFluentImpl.this.withInProgressProperties(builder.build());
    }
    public N endInProgressProperties(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy