io.alauda.kubernetes.api.model.ServiceStatusFluentImpl Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.alauda.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class ServiceStatusFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements ServiceStatusFluent{
private LoadBalancerStatusBuilder loadBalancer;
public ServiceStatusFluentImpl(){
}
public ServiceStatusFluentImpl(ServiceStatus instance){
this.withLoadBalancer(instance.getLoadBalancer());
}
/**
* This method has been deprecated, please use method buildLoadBalancer instead.
*/
@Deprecated public LoadBalancerStatus getLoadBalancer(){
return this.loadBalancer!=null?this.loadBalancer.build():null;
}
public LoadBalancerStatus buildLoadBalancer(){
return this.loadBalancer!=null?this.loadBalancer.build():null;
}
public A withLoadBalancer(LoadBalancerStatus loadBalancer){
_visitables.remove(this.loadBalancer);
if (loadBalancer!=null){ this.loadBalancer= new LoadBalancerStatusBuilder(loadBalancer); _visitables.add(this.loadBalancer);} return (A) this;
}
public Boolean hasLoadBalancer(){
return this.loadBalancer!=null;
}
public ServiceStatusFluent.LoadBalancerNested withNewLoadBalancer(){
return new LoadBalancerNestedImpl();
}
public ServiceStatusFluent.LoadBalancerNested withNewLoadBalancerLike(LoadBalancerStatus item){
return new LoadBalancerNestedImpl(item);
}
public ServiceStatusFluent.LoadBalancerNested editLoadBalancer(){
return withNewLoadBalancerLike(getLoadBalancer());
}
public ServiceStatusFluent.LoadBalancerNested editOrNewLoadBalancer(){
return withNewLoadBalancerLike(getLoadBalancer() != null ? getLoadBalancer(): new LoadBalancerStatusBuilder().build());
}
public ServiceStatusFluent.LoadBalancerNested editOrNewLoadBalancerLike(LoadBalancerStatus item){
return withNewLoadBalancerLike(getLoadBalancer() != null ? getLoadBalancer(): 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;
ServiceStatusFluentImpl that = (ServiceStatusFluentImpl) o;
if (loadBalancer != null ? !loadBalancer.equals(that.loadBalancer) :that.loadBalancer != null) return false;
return true;
}
public class LoadBalancerNestedImpl extends LoadBalancerStatusFluentImpl> implements ServiceStatusFluent.LoadBalancerNested,io.alauda.kubernetes.api.builder.Nested{
private final LoadBalancerStatusBuilder builder;
LoadBalancerNestedImpl(LoadBalancerStatus item){
this.builder = new LoadBalancerStatusBuilder(this, item);
}
LoadBalancerNestedImpl(){
this.builder = new LoadBalancerStatusBuilder(this);
}
public N and(){
return (N) ServiceStatusFluentImpl.this.withLoadBalancer(builder.build());
}
public N endLoadBalancer(){
return and();
}
}
}