
io.fabric8.openshift.api.model.RouteIngressFluentImpl Maven / Gradle / Ivy
package io.fabric8.openshift.api.model;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.Valid;
import java.util.ArrayList;
import java.lang.String;
import java.lang.Object;
import io.fabric8.kubernetes.api.builder.Nested;
public class RouteIngressFluentImpl> extends BaseFluent implements RouteIngressFluent{
private List> conditions = new ArrayList>();
private String host;
private String routerName;
public RouteIngressFluentImpl(){
}
public RouteIngressFluentImpl(RouteIngress instance){
this.withConditions(instance.getConditions());
this.withHost(instance.getHost());
this.withRouterName(instance.getRouterName());
}
public A addToConditions(RouteIngressCondition... items){
for (RouteIngressCondition item : items) {RouteIngressConditionBuilder builder = new RouteIngressConditionBuilder(item);_visitables.add(builder);this.conditions.add(builder);} return (A)this;
}
public A removeFromConditions(RouteIngressCondition... items){
for (RouteIngressCondition item : items) {RouteIngressConditionBuilder builder = new RouteIngressConditionBuilder(item);_visitables.remove(builder);this.conditions.remove(builder);} return (A)this;
}
public List getConditions(){
return build(conditions);
}
public A withConditions(List conditions){
this.conditions.clear();
if (conditions != null) {for (RouteIngressCondition item : conditions){this.addToConditions(item);}} return (A) this;
}
public A withConditions(RouteIngressCondition... conditions){
this.conditions.clear(); if (conditions != null) {for (RouteIngressCondition item :conditions){ this.addToConditions(item);}} return (A) this;
}
public RouteIngressFluent.ConditionsNested addNewCondition(){
return new ConditionsNestedImpl();
}
public RouteIngressFluent.ConditionsNested addNewConditionLike(RouteIngressCondition item){
return new ConditionsNestedImpl(item);
}
public A addNewCondition(String lastTransitionTime,String message,String reason,String status,String type){
return (A)addToConditions(new RouteIngressCondition(lastTransitionTime, message, reason, status, type));
}
public String getHost(){
return this.host;
}
public A withHost(String host){
this.host=host; return (A) this;
}
public String getRouterName(){
return this.routerName;
}
public A withRouterName(String routerName){
this.routerName=routerName; return (A) this;
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
RouteIngressFluentImpl that = (RouteIngressFluentImpl) o;
if (conditions != null ? !conditions.equals(that.conditions) :that.conditions != null) return false;
if (host != null ? !host.equals(that.host) :that.host != null) return false;
if (routerName != null ? !routerName.equals(that.routerName) :that.routerName != null) return false;
return true;
}
public class ConditionsNestedImpl extends RouteIngressConditionFluentImpl> implements RouteIngressFluent.ConditionsNested,Nested{
private final RouteIngressConditionBuilder builder;
ConditionsNestedImpl(){
this.builder = new RouteIngressConditionBuilder(this);
}
ConditionsNestedImpl(RouteIngressCondition item){
this.builder = new RouteIngressConditionBuilder(this, item);
}
public N and(){
return (N) RouteIngressFluentImpl.this.addToConditions(builder.build());
}
public N endCondition(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy