me.snowdrop.istio.api.authentication.v1alpha1.PortSelectorFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.authentication.v1alpha1;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Integer;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import java.lang.Boolean;
public class PortSelectorFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements PortSelectorFluent{
private VisitableBuilder extends me.snowdrop.istio.api.authentication.v1alpha1.PortSelector.Port,?> port;
public PortSelectorFluentImpl(){
}
public PortSelectorFluentImpl(PortSelector instance){
this.withPort(instance.getPort());
}
/**
* This method has been deprecated, please use method buildPort instead.
* @return The buildable object.
*/
@Deprecated public me.snowdrop.istio.api.authentication.v1alpha1.PortSelector.Port getPort(){
return this.port!=null?this.port.build():null;
}
public me.snowdrop.istio.api.authentication.v1alpha1.PortSelector.Port buildPort(){
return this.port!=null?this.port.build():null;
}
public A withPort(me.snowdrop.istio.api.authentication.v1alpha1.PortSelector.Port port){
if (port instanceof NamePort){ this.port= new NamePortBuilder((NamePort)port); _visitables.add(this.port);}
if (port instanceof NumberPort){ this.port= new NumberPortBuilder((NumberPort)port); _visitables.add(this.port);}
return (A) this;
}
public Boolean hasPort(){
return this.port != null;
}
public A withNamePort(NamePort namePort){
_visitables.remove(this.port);
if (namePort!=null){ this.port= new NamePortBuilder(namePort); _visitables.add(this.port);} return (A) this;
}
public PortSelectorFluent.NamePortNested withNewNamePort(){
return new NamePortNestedImpl();
}
public PortSelectorFluent.NamePortNested withNewNamePortLike(NamePort item){
return new NamePortNestedImpl(item);
}
public A withNewNamePort(String name){
return (A)withNamePort(new NamePort(name));
}
public A withNumberPort(NumberPort numberPort){
_visitables.remove(this.port);
if (numberPort!=null){ this.port= new NumberPortBuilder(numberPort); _visitables.add(this.port);} return (A) this;
}
public PortSelectorFluent.NumberPortNested withNewNumberPort(){
return new NumberPortNestedImpl();
}
public PortSelectorFluent.NumberPortNested withNewNumberPortLike(NumberPort item){
return new NumberPortNestedImpl(item);
}
public A withNewNumberPort(Integer number){
return (A)withNumberPort(new NumberPort(number));
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
PortSelectorFluentImpl that = (PortSelectorFluentImpl) o;
if (port != null ? !port.equals(that.port) :that.port != null) return false;
return true;
}
public class NamePortNestedImpl extends NamePortFluentImpl> implements PortSelectorFluent.NamePortNested,io.fabric8.kubernetes.api.builder.Nested{
private final NamePortBuilder builder;
NamePortNestedImpl(NamePort item){
this.builder = new NamePortBuilder(this, item);
}
NamePortNestedImpl(){
this.builder = new NamePortBuilder(this);
}
public N and(){
return (N) PortSelectorFluentImpl.this.withNamePort(builder.build());
}
public N endNamePort(){
return and();
}
}
public class NumberPortNestedImpl extends NumberPortFluentImpl> implements PortSelectorFluent.NumberPortNested,io.fabric8.kubernetes.api.builder.Nested{
private final NumberPortBuilder builder;
NumberPortNestedImpl(NumberPort item){
this.builder = new NumberPortBuilder(this, item);
}
NumberPortNestedImpl(){
this.builder = new NumberPortBuilder(this);
}
public N and(){
return (N) PortSelectorFluentImpl.this.withNumberPort(builder.build());
}
public N endNumberPort(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy