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

annotations.me.snowdrop.istio.api.model.v1.broker.ServiceClassFluentImpl Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import me.snowdrop.istio.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import javax.validation.Valid;
import me.snowdrop.istio.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class ServiceClassFluentImpl> extends me.snowdrop.istio.api.builder.BaseFluent implements ServiceClassFluent{

    private DeploymentBuilder deployment;
    private CatalogEntryBuilder entry;

    public ServiceClassFluentImpl(){
    }
    public ServiceClassFluentImpl(ServiceClass instance){
            this.withDeployment(instance.getDeployment()); 
            this.withEntry(instance.getEntry()); 
    }

    
/**
 * This method has been deprecated, please use method buildDeployment instead.
 */
@Deprecated public Deployment getDeployment(){
            return this.deployment!=null?this.deployment.build():null;
    }

    public Deployment buildDeployment(){
            return this.deployment!=null?this.deployment.build():null;
    }

    public A withDeployment(Deployment deployment){
            _visitables.remove(this.deployment);
            if (deployment!=null){ this.deployment= new DeploymentBuilder(deployment); _visitables.add(this.deployment);} return (A) this;
    }

    public Boolean hasDeployment(){
            return this.deployment != null;
    }

    public A withNewDeployment(String instance){
            return (A)withDeployment(new Deployment(instance));
    }

    public ServiceClassFluent.DeploymentNested withNewDeployment(){
            return new DeploymentNestedImpl();
    }

    public ServiceClassFluent.DeploymentNested withNewDeploymentLike(Deployment item){
            return new DeploymentNestedImpl(item);
    }

    public ServiceClassFluent.DeploymentNested editDeployment(){
            return withNewDeploymentLike(getDeployment());
    }

    public ServiceClassFluent.DeploymentNested editOrNewDeployment(){
            return withNewDeploymentLike(getDeployment() != null ? getDeployment(): new DeploymentBuilder().build());
    }

    public ServiceClassFluent.DeploymentNested editOrNewDeploymentLike(Deployment item){
            return withNewDeploymentLike(getDeployment() != null ? getDeployment(): item);
    }

    
/**
 * This method has been deprecated, please use method buildEntry instead.
 */
@Deprecated public CatalogEntry getEntry(){
            return this.entry!=null?this.entry.build():null;
    }

    public CatalogEntry buildEntry(){
            return this.entry!=null?this.entry.build():null;
    }

    public A withEntry(CatalogEntry entry){
            _visitables.remove(this.entry);
            if (entry!=null){ this.entry= new CatalogEntryBuilder(entry); _visitables.add(this.entry);} return (A) this;
    }

    public Boolean hasEntry(){
            return this.entry != null;
    }

    public A withNewEntry(String description,String id,String name){
            return (A)withEntry(new CatalogEntry(description, id, name));
    }

    public ServiceClassFluent.EntryNested withNewEntry(){
            return new EntryNestedImpl();
    }

    public ServiceClassFluent.EntryNested withNewEntryLike(CatalogEntry item){
            return new EntryNestedImpl(item);
    }

    public ServiceClassFluent.EntryNested editEntry(){
            return withNewEntryLike(getEntry());
    }

    public ServiceClassFluent.EntryNested editOrNewEntry(){
            return withNewEntryLike(getEntry() != null ? getEntry(): new CatalogEntryBuilder().build());
    }

    public ServiceClassFluent.EntryNested editOrNewEntryLike(CatalogEntry item){
            return withNewEntryLike(getEntry() != null ? getEntry(): item);
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            ServiceClassFluentImpl that = (ServiceClassFluentImpl) o;
            if (deployment != null ? !deployment.equals(that.deployment) :that.deployment != null) return false;
            if (entry != null ? !entry.equals(that.entry) :that.entry != null) return false;
            return true;
    }


    public class DeploymentNestedImpl extends DeploymentFluentImpl> implements ServiceClassFluent.DeploymentNested,me.snowdrop.istio.api.builder.Nested{

            private final DeploymentBuilder builder;
    
            DeploymentNestedImpl(Deployment item){
                    this.builder = new DeploymentBuilder(this, item);
            }
            DeploymentNestedImpl(){
                    this.builder = new DeploymentBuilder(this);
            }
    
    public N and(){
            return (N) ServiceClassFluentImpl.this.withDeployment(builder.build());
    }
    public N endDeployment(){
            return and();
    }

}
    public class EntryNestedImpl extends CatalogEntryFluentImpl> implements ServiceClassFluent.EntryNested,me.snowdrop.istio.api.builder.Nested{

            private final CatalogEntryBuilder builder;
    
            EntryNestedImpl(CatalogEntry item){
                    this.builder = new CatalogEntryBuilder(this, item);
            }
            EntryNestedImpl(){
                    this.builder = new CatalogEntryBuilder(this);
            }
    
    public N and(){
            return (N) ServiceClassFluentImpl.this.withEntry(builder.build());
    }
    public N endEntry(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy