me.snowdrop.istio.api.networking.v1alpha3.HTTPMatchRequestFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.networking.v1alpha3;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.util.ArrayList;
import java.lang.String;
import io.fabric8.kubernetes.api.builder.Predicate;
import java.util.LinkedHashMap;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.List;
import java.lang.Boolean;
import java.lang.Integer;
import javax.validation.Valid;
import java.util.Collection;
import java.lang.Object;
import java.util.Map;
public class HTTPMatchRequestFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements HTTPMatchRequestFluent{
private me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder authority;
private List gateways;
private Map headers;
private me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder method;
private Integer port;
private me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder scheme;
private Map sourceLabels;
private me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder uri;
public HTTPMatchRequestFluentImpl(){
}
public HTTPMatchRequestFluentImpl(HTTPMatchRequest instance){
this.withAuthority(instance.getAuthority());
this.withGateways(instance.getGateways());
this.withHeaders(instance.getHeaders());
this.withMethod(instance.getMethod());
this.withPort(instance.getPort());
this.withScheme(instance.getScheme());
this.withSourceLabels(instance.getSourceLabels());
this.withUri(instance.getUri());
}
/**
* This method has been deprecated, please use method buildAuthority instead.
* @return The buildable object.
*/
@Deprecated public me.snowdrop.istio.api.networking.v1alpha3.StringMatch getAuthority(){
return this.authority!=null?this.authority.build():null;
}
public me.snowdrop.istio.api.networking.v1alpha3.StringMatch buildAuthority(){
return this.authority!=null?this.authority.build():null;
}
public A withAuthority(me.snowdrop.istio.api.networking.v1alpha3.StringMatch authority){
_visitables.remove(this.authority);
if (authority!=null){ this.authority= new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(authority); _visitables.add(this.authority);} return (A) this;
}
public Boolean hasAuthority(){
return this.authority != null;
}
public HTTPMatchRequestFluent.AuthorityNested withNewAuthority(){
return new AuthorityNestedImpl();
}
public HTTPMatchRequestFluent.AuthorityNested withNewAuthorityLike(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
return new AuthorityNestedImpl(item);
}
public HTTPMatchRequestFluent.AuthorityNested editAuthority(){
return withNewAuthorityLike(getAuthority());
}
public HTTPMatchRequestFluent.AuthorityNested editOrNewAuthority(){
return withNewAuthorityLike(getAuthority() != null ? getAuthority(): new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder().build());
}
public HTTPMatchRequestFluent.AuthorityNested editOrNewAuthorityLike(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
return withNewAuthorityLike(getAuthority() != null ? getAuthority(): item);
}
public A addToGateways(int index,String item){
if (this.gateways == null) {this.gateways = new ArrayList();}
this.gateways.add(index, item);
return (A)this;
}
public A setToGateways(int index,String item){
if (this.gateways == null) {this.gateways = new ArrayList();}
this.gateways.set(index, item); return (A)this;
}
public A addToGateways(String... items){
if (this.gateways == null) {this.gateways = new ArrayList();}
for (String item : items) {this.gateways.add(item);} return (A)this;
}
public A addAllToGateways(Collection items){
if (this.gateways == null) {this.gateways = new ArrayList();}
for (String item : items) {this.gateways.add(item);} return (A)this;
}
public A removeFromGateways(String... items){
for (String item : items) {if (this.gateways!= null){ this.gateways.remove(item);}} return (A)this;
}
public A removeAllFromGateways(Collection items){
for (String item : items) {if (this.gateways!= null){ this.gateways.remove(item);}} return (A)this;
}
public List getGateways(){
return this.gateways;
}
public String getGateway(int index){
return this.gateways.get(index);
}
public String getFirstGateway(){
return this.gateways.get(0);
}
public String getLastGateway(){
return this.gateways.get(gateways.size() - 1);
}
public String getMatchingGateway(io.fabric8.kubernetes.api.builder.Predicate predicate){
for (String item: gateways) { if(predicate.apply(item)){return item;} } return null;
}
public A withGateways(List gateways){
if (this.gateways != null) { _visitables.removeAll(this.gateways);}
if (gateways != null) {this.gateways = new ArrayList(); for (String item : gateways){this.addToGateways(item);}} else { this.gateways = null;} return (A) this;
}
public A withGateways(String... gateways){
if (this.gateways != null) {this.gateways.clear();}
if (gateways != null) {for (String item :gateways){ this.addToGateways(item);}} return (A) this;
}
public Boolean hasGateways(){
return gateways != null && !gateways.isEmpty();
}
public A addToHeaders(String key,me.snowdrop.istio.api.networking.v1alpha3.StringMatch value){
if(this.headers == null && key != null && value != null) { this.headers = new LinkedHashMap(); }
if(key != null && value != null) {this.headers.put(key, value);} return (A)this;
}
public A addToHeaders(Map map){
if(this.headers == null && map != null) { this.headers = new LinkedHashMap(); }
if(map != null) { this.headers.putAll(map);} return (A)this;
}
public A removeFromHeaders(String key){
if(this.headers == null) { return (A) this; }
if(key != null && this.headers != null) {this.headers.remove(key);} return (A)this;
}
public A removeFromHeaders(Map map){
if(this.headers == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.headers != null){this.headers.remove(key);}}} return (A)this;
}
public Map getHeaders(){
return this.headers;
}
public A withHeaders(Map headers){
if (headers == null) { this.headers = null;} else {this.headers = new LinkedHashMap(headers);} return (A) this;
}
public Boolean hasHeaders(){
return this.headers != null;
}
/**
* This method has been deprecated, please use method buildMethod instead.
* @return The buildable object.
*/
@Deprecated public me.snowdrop.istio.api.networking.v1alpha3.StringMatch getMethod(){
return this.method!=null?this.method.build():null;
}
public me.snowdrop.istio.api.networking.v1alpha3.StringMatch buildMethod(){
return this.method!=null?this.method.build():null;
}
public A withMethod(me.snowdrop.istio.api.networking.v1alpha3.StringMatch method){
_visitables.remove(this.method);
if (method!=null){ this.method= new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(method); _visitables.add(this.method);} return (A) this;
}
public Boolean hasMethod(){
return this.method != null;
}
public HTTPMatchRequestFluent.MethodNested withNewMethod(){
return new MethodNestedImpl();
}
public HTTPMatchRequestFluent.MethodNested withNewMethodLike(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
return new MethodNestedImpl(item);
}
public HTTPMatchRequestFluent.MethodNested editMethod(){
return withNewMethodLike(getMethod());
}
public HTTPMatchRequestFluent.MethodNested editOrNewMethod(){
return withNewMethodLike(getMethod() != null ? getMethod(): new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder().build());
}
public HTTPMatchRequestFluent.MethodNested editOrNewMethodLike(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
return withNewMethodLike(getMethod() != null ? getMethod(): item);
}
public Integer getPort(){
return this.port;
}
public A withPort(Integer port){
this.port=port; return (A) this;
}
public Boolean hasPort(){
return this.port != null;
}
public A withNewPort(String arg1){
return (A)withPort(new Integer(arg1));
}
public A withNewPort(int arg1){
return (A)withPort(new Integer(arg1));
}
/**
* This method has been deprecated, please use method buildScheme instead.
* @return The buildable object.
*/
@Deprecated public me.snowdrop.istio.api.networking.v1alpha3.StringMatch getScheme(){
return this.scheme!=null?this.scheme.build():null;
}
public me.snowdrop.istio.api.networking.v1alpha3.StringMatch buildScheme(){
return this.scheme!=null?this.scheme.build():null;
}
public A withScheme(me.snowdrop.istio.api.networking.v1alpha3.StringMatch scheme){
_visitables.remove(this.scheme);
if (scheme!=null){ this.scheme= new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(scheme); _visitables.add(this.scheme);} return (A) this;
}
public Boolean hasScheme(){
return this.scheme != null;
}
public HTTPMatchRequestFluent.SchemeNested withNewScheme(){
return new SchemeNestedImpl();
}
public HTTPMatchRequestFluent.SchemeNested withNewSchemeLike(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
return new SchemeNestedImpl(item);
}
public HTTPMatchRequestFluent.SchemeNested editScheme(){
return withNewSchemeLike(getScheme());
}
public HTTPMatchRequestFluent.SchemeNested editOrNewScheme(){
return withNewSchemeLike(getScheme() != null ? getScheme(): new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder().build());
}
public HTTPMatchRequestFluent.SchemeNested editOrNewSchemeLike(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
return withNewSchemeLike(getScheme() != null ? getScheme(): item);
}
public A addToSourceLabels(String key,String value){
if(this.sourceLabels == null && key != null && value != null) { this.sourceLabels = new LinkedHashMap(); }
if(key != null && value != null) {this.sourceLabels.put(key, value);} return (A)this;
}
public A addToSourceLabels(Map map){
if(this.sourceLabels == null && map != null) { this.sourceLabels = new LinkedHashMap(); }
if(map != null) { this.sourceLabels.putAll(map);} return (A)this;
}
public A removeFromSourceLabels(String key){
if(this.sourceLabels == null) { return (A) this; }
if(key != null && this.sourceLabels != null) {this.sourceLabels.remove(key);} return (A)this;
}
public A removeFromSourceLabels(Map map){
if(this.sourceLabels == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.sourceLabels != null){this.sourceLabels.remove(key);}}} return (A)this;
}
public Map getSourceLabels(){
return this.sourceLabels;
}
public A withSourceLabels(Map sourceLabels){
if (sourceLabels == null) { this.sourceLabels = null;} else {this.sourceLabels = new LinkedHashMap(sourceLabels);} return (A) this;
}
public Boolean hasSourceLabels(){
return this.sourceLabels != null;
}
/**
* This method has been deprecated, please use method buildUri instead.
* @return The buildable object.
*/
@Deprecated public me.snowdrop.istio.api.networking.v1alpha3.StringMatch getUri(){
return this.uri!=null?this.uri.build():null;
}
public me.snowdrop.istio.api.networking.v1alpha3.StringMatch buildUri(){
return this.uri!=null?this.uri.build():null;
}
public A withUri(me.snowdrop.istio.api.networking.v1alpha3.StringMatch uri){
_visitables.remove(this.uri);
if (uri!=null){ this.uri= new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(uri); _visitables.add(this.uri);} return (A) this;
}
public Boolean hasUri(){
return this.uri != null;
}
public HTTPMatchRequestFluent.UriNested withNewUri(){
return new UriNestedImpl();
}
public HTTPMatchRequestFluent.UriNested withNewUriLike(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
return new UriNestedImpl(item);
}
public HTTPMatchRequestFluent.UriNested editUri(){
return withNewUriLike(getUri());
}
public HTTPMatchRequestFluent.UriNested editOrNewUri(){
return withNewUriLike(getUri() != null ? getUri(): new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder().build());
}
public HTTPMatchRequestFluent.UriNested editOrNewUriLike(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
return withNewUriLike(getUri() != null ? getUri(): 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;
HTTPMatchRequestFluentImpl that = (HTTPMatchRequestFluentImpl) o;
if (authority != null ? !authority.equals(that.authority) :that.authority != null) return false;
if (gateways != null ? !gateways.equals(that.gateways) :that.gateways != null) return false;
if (headers != null ? !headers.equals(that.headers) :that.headers != null) return false;
if (method != null ? !method.equals(that.method) :that.method != null) return false;
if (port != null ? !port.equals(that.port) :that.port != null) return false;
if (scheme != null ? !scheme.equals(that.scheme) :that.scheme != null) return false;
if (sourceLabels != null ? !sourceLabels.equals(that.sourceLabels) :that.sourceLabels != null) return false;
if (uri != null ? !uri.equals(that.uri) :that.uri != null) return false;
return true;
}
public class AuthorityNestedImpl extends me.snowdrop.istio.api.networking.v1alpha3.StringMatchFluentImpl> implements HTTPMatchRequestFluent.AuthorityNested,io.fabric8.kubernetes.api.builder.Nested{
private final me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder builder;
AuthorityNestedImpl(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
this.builder = new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(this, item);
}
AuthorityNestedImpl(){
this.builder = new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(this);
}
public N and(){
return (N) HTTPMatchRequestFluentImpl.this.withAuthority(builder.build());
}
public N endAuthority(){
return and();
}
}
public class MethodNestedImpl extends me.snowdrop.istio.api.networking.v1alpha3.StringMatchFluentImpl> implements HTTPMatchRequestFluent.MethodNested,io.fabric8.kubernetes.api.builder.Nested{
private final me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder builder;
MethodNestedImpl(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
this.builder = new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(this, item);
}
MethodNestedImpl(){
this.builder = new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(this);
}
public N and(){
return (N) HTTPMatchRequestFluentImpl.this.withMethod(builder.build());
}
public N endMethod(){
return and();
}
}
public class SchemeNestedImpl extends me.snowdrop.istio.api.networking.v1alpha3.StringMatchFluentImpl> implements HTTPMatchRequestFluent.SchemeNested,io.fabric8.kubernetes.api.builder.Nested{
private final me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder builder;
SchemeNestedImpl(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
this.builder = new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(this, item);
}
SchemeNestedImpl(){
this.builder = new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(this);
}
public N and(){
return (N) HTTPMatchRequestFluentImpl.this.withScheme(builder.build());
}
public N endScheme(){
return and();
}
}
public class UriNestedImpl extends me.snowdrop.istio.api.networking.v1alpha3.StringMatchFluentImpl> implements HTTPMatchRequestFluent.UriNested,io.fabric8.kubernetes.api.builder.Nested{
private final me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder builder;
UriNestedImpl(me.snowdrop.istio.api.networking.v1alpha3.StringMatch item){
this.builder = new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(this, item);
}
UriNestedImpl(){
this.builder = new me.snowdrop.istio.api.networking.v1alpha3.StringMatchBuilder(this);
}
public N and(){
return (N) HTTPMatchRequestFluentImpl.this.withUri(builder.build());
}
public N endUri(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy