me.snowdrop.istio.api.networking.v1alpha3.StringMatchFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.networking.v1alpha3;
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.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import java.lang.Boolean;
import java.lang.Object;
public class StringMatchFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements me.snowdrop.istio.api.networking.v1alpha3.StringMatchFluent{
private VisitableBuilder extends me.snowdrop.istio.api.networking.v1alpha3.StringMatch.MatchType,?> matchType;
public StringMatchFluentImpl(){
}
public StringMatchFluentImpl(me.snowdrop.istio.api.networking.v1alpha3.StringMatch instance){
this.withMatchType(instance.getMatchType());
}
/**
* This method has been deprecated, please use method buildMatchType instead.
* @return The buildable object.
*/
@Deprecated public me.snowdrop.istio.api.networking.v1alpha3.StringMatch.MatchType getMatchType(){
return this.matchType!=null?this.matchType.build():null;
}
public me.snowdrop.istio.api.networking.v1alpha3.StringMatch.MatchType buildMatchType(){
return this.matchType!=null?this.matchType.build():null;
}
public A withMatchType(me.snowdrop.istio.api.networking.v1alpha3.StringMatch.MatchType matchType){
if (matchType instanceof RegexMatchType){ this.matchType= new RegexMatchTypeBuilder((RegexMatchType)matchType); _visitables.add(this.matchType);}
if (matchType instanceof PrefixMatchType){ this.matchType= new PrefixMatchTypeBuilder((PrefixMatchType)matchType); _visitables.add(this.matchType);}
if (matchType instanceof ExactMatchType){ this.matchType= new ExactMatchTypeBuilder((ExactMatchType)matchType); _visitables.add(this.matchType);}
return (A) this;
}
public Boolean hasMatchType(){
return this.matchType != null;
}
public A withRegexMatchType(RegexMatchType regexMatchType){
_visitables.remove(this.matchType);
if (regexMatchType!=null){ this.matchType= new RegexMatchTypeBuilder(regexMatchType); _visitables.add(this.matchType);} return (A) this;
}
public StringMatchFluent.RegexMatchTypeNested withNewRegexMatchType(){
return new RegexMatchTypeNestedImpl();
}
public StringMatchFluent.RegexMatchTypeNested withNewRegexMatchTypeLike(RegexMatchType item){
return new RegexMatchTypeNestedImpl(item);
}
public A withNewRegexMatchType(String regex){
return (A)withRegexMatchType(new RegexMatchType(regex));
}
public A withPrefixMatchType(PrefixMatchType prefixMatchType){
_visitables.remove(this.matchType);
if (prefixMatchType!=null){ this.matchType= new PrefixMatchTypeBuilder(prefixMatchType); _visitables.add(this.matchType);} return (A) this;
}
public StringMatchFluent.PrefixMatchTypeNested withNewPrefixMatchType(){
return new PrefixMatchTypeNestedImpl();
}
public StringMatchFluent.PrefixMatchTypeNested withNewPrefixMatchTypeLike(PrefixMatchType item){
return new PrefixMatchTypeNestedImpl(item);
}
public A withNewPrefixMatchType(String prefix){
return (A)withPrefixMatchType(new PrefixMatchType(prefix));
}
public A withExactMatchType(ExactMatchType exactMatchType){
_visitables.remove(this.matchType);
if (exactMatchType!=null){ this.matchType= new ExactMatchTypeBuilder(exactMatchType); _visitables.add(this.matchType);} return (A) this;
}
public StringMatchFluent.ExactMatchTypeNested withNewExactMatchType(){
return new ExactMatchTypeNestedImpl();
}
public StringMatchFluent.ExactMatchTypeNested withNewExactMatchTypeLike(ExactMatchType item){
return new ExactMatchTypeNestedImpl(item);
}
public A withNewExactMatchType(String exact){
return (A)withExactMatchType(new ExactMatchType(exact));
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
StringMatchFluentImpl that = (StringMatchFluentImpl) o;
if (matchType != null ? !matchType.equals(that.matchType) :that.matchType != null) return false;
return true;
}
public class RegexMatchTypeNestedImpl extends RegexMatchTypeFluentImpl> implements StringMatchFluent.RegexMatchTypeNested,io.fabric8.kubernetes.api.builder.Nested{
private final RegexMatchTypeBuilder builder;
RegexMatchTypeNestedImpl(RegexMatchType item){
this.builder = new RegexMatchTypeBuilder(this, item);
}
RegexMatchTypeNestedImpl(){
this.builder = new RegexMatchTypeBuilder(this);
}
public N and(){
return (N) StringMatchFluentImpl.this.withRegexMatchType(builder.build());
}
public N endRegexMatchType(){
return and();
}
}
public class PrefixMatchTypeNestedImpl extends PrefixMatchTypeFluentImpl> implements StringMatchFluent.PrefixMatchTypeNested,io.fabric8.kubernetes.api.builder.Nested{
private final PrefixMatchTypeBuilder builder;
PrefixMatchTypeNestedImpl(PrefixMatchType item){
this.builder = new PrefixMatchTypeBuilder(this, item);
}
PrefixMatchTypeNestedImpl(){
this.builder = new PrefixMatchTypeBuilder(this);
}
public N and(){
return (N) StringMatchFluentImpl.this.withPrefixMatchType(builder.build());
}
public N endPrefixMatchType(){
return and();
}
}
public class ExactMatchTypeNestedImpl extends ExactMatchTypeFluentImpl> implements StringMatchFluent.ExactMatchTypeNested,io.fabric8.kubernetes.api.builder.Nested{
private final ExactMatchTypeBuilder builder;
ExactMatchTypeNestedImpl(ExactMatchType item){
this.builder = new ExactMatchTypeBuilder(this, item);
}
ExactMatchTypeNestedImpl(){
this.builder = new ExactMatchTypeBuilder(this);
}
public N and(){
return (N) StringMatchFluentImpl.this.withExactMatchType(builder.build());
}
public N endExactMatchType(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy