me.snowdrop.istio.api.model.IstioSchemaBuilder Maven / Gradle / Ivy
package me.snowdrop.istio.api.model;
import me.snowdrop.istio.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class IstioSchemaBuilder extends IstioSchemaFluentImpl implements me.snowdrop.istio.api.builder.VisitableBuilder{
IstioSchemaFluent> fluent;
Boolean validationEnabled;
public IstioSchemaBuilder(){
this(true);
}
public IstioSchemaBuilder(Boolean validationEnabled){
this(new IstioSchema(), validationEnabled);
}
public IstioSchemaBuilder(IstioSchemaFluent> fluent){
this(fluent, true);
}
public IstioSchemaBuilder(IstioSchemaFluent> fluent,Boolean validationEnabled){
this(fluent, new IstioSchema(), validationEnabled);
}
public IstioSchemaBuilder(IstioSchemaFluent> fluent,IstioSchema instance){
this(fluent, instance, true);
}
public IstioSchemaBuilder(IstioSchemaFluent> fluent,IstioSchema instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withAttributeValue(instance.getAttributeValue());
fluent.withAttributes(instance.getAttributes());
fluent.withCatalogEntry(instance.getCatalogEntry());
fluent.withCatalogPlan(instance.getCatalogPlan());
fluent.withCheckRequest(instance.getCheckRequest());
fluent.withCheckResponse(instance.getCheckResponse());
fluent.withCircuitBreaker(instance.getCircuitBreaker());
fluent.withCompressedAttributes(instance.getCompressedAttributes());
fluent.withCorsPolicy(instance.getCorsPolicy());
fluent.withDeployment(instance.getDeployment());
fluent.withDestinationPolicy(instance.getDestinationPolicy());
fluent.withDestinationWeight(instance.getDestinationWeight());
fluent.withEgressRule(instance.getEgressRule());
fluent.withHTTPFaultInjection(instance.getHTTPFaultInjection());
fluent.withHTTPRedirect(instance.getHTTPRedirect());
fluent.withHTTPRetry(instance.getHTTPRetry());
fluent.withHTTPRewrite(instance.getHTTPRewrite());
fluent.withHTTPTimeout(instance.getHTTPTimeout());
fluent.withIngressRule(instance.getIngressRule());
fluent.withIstioService(instance.getIstioService());
fluent.withL4FaultInjection(instance.getL4FaultInjection());
fluent.withL4MatchAttributes(instance.getL4MatchAttributes());
fluent.withLoadBalancing(instance.getLoadBalancing());
fluent.withMatchCondition(instance.getMatchCondition());
fluent.withMatchRequest(instance.getMatchRequest());
fluent.withMeshConfig(instance.getMeshConfig());
fluent.withProxyConfig(instance.getProxyConfig());
fluent.withQuotaParams(instance.getQuotaParams());
fluent.withQuotaResult(instance.getQuotaResult());
fluent.withReferencedAttributes(instance.getReferencedAttributes());
fluent.withReportRequest(instance.getReportRequest());
fluent.withReportResponse(instance.getReportResponse());
fluent.withRouteRule(instance.getRouteRule());
fluent.withServiceClass(instance.getServiceClass());
fluent.withServicePlan(instance.getServicePlan());
fluent.withStringMap(instance.getStringMap());
fluent.withStringMatch(instance.getStringMatch());
this.validationEnabled = validationEnabled;
}
public IstioSchemaBuilder(IstioSchema instance){
this(instance,true);
}
public IstioSchemaBuilder(IstioSchema instance,Boolean validationEnabled){
this.fluent = this;
this.withAttributeValue(instance.getAttributeValue());
this.withAttributes(instance.getAttributes());
this.withCatalogEntry(instance.getCatalogEntry());
this.withCatalogPlan(instance.getCatalogPlan());
this.withCheckRequest(instance.getCheckRequest());
this.withCheckResponse(instance.getCheckResponse());
this.withCircuitBreaker(instance.getCircuitBreaker());
this.withCompressedAttributes(instance.getCompressedAttributes());
this.withCorsPolicy(instance.getCorsPolicy());
this.withDeployment(instance.getDeployment());
this.withDestinationPolicy(instance.getDestinationPolicy());
this.withDestinationWeight(instance.getDestinationWeight());
this.withEgressRule(instance.getEgressRule());
this.withHTTPFaultInjection(instance.getHTTPFaultInjection());
this.withHTTPRedirect(instance.getHTTPRedirect());
this.withHTTPRetry(instance.getHTTPRetry());
this.withHTTPRewrite(instance.getHTTPRewrite());
this.withHTTPTimeout(instance.getHTTPTimeout());
this.withIngressRule(instance.getIngressRule());
this.withIstioService(instance.getIstioService());
this.withL4FaultInjection(instance.getL4FaultInjection());
this.withL4MatchAttributes(instance.getL4MatchAttributes());
this.withLoadBalancing(instance.getLoadBalancing());
this.withMatchCondition(instance.getMatchCondition());
this.withMatchRequest(instance.getMatchRequest());
this.withMeshConfig(instance.getMeshConfig());
this.withProxyConfig(instance.getProxyConfig());
this.withQuotaParams(instance.getQuotaParams());
this.withQuotaResult(instance.getQuotaResult());
this.withReferencedAttributes(instance.getReferencedAttributes());
this.withReportRequest(instance.getReportRequest());
this.withReportResponse(instance.getReportResponse());
this.withRouteRule(instance.getRouteRule());
this.withServiceClass(instance.getServiceClass());
this.withServicePlan(instance.getServicePlan());
this.withStringMap(instance.getStringMap());
this.withStringMatch(instance.getStringMatch());
this.validationEnabled = validationEnabled;
}
public IstioSchema build(){
IstioSchema buildable = new IstioSchema(fluent.getAttributeValue(),fluent.getAttributes(),fluent.getCatalogEntry(),fluent.getCatalogPlan(),fluent.getCheckRequest(),fluent.getCheckResponse(),fluent.getCircuitBreaker(),fluent.getCompressedAttributes(),fluent.getCorsPolicy(),fluent.getDeployment(),fluent.getDestinationPolicy(),fluent.getDestinationWeight(),fluent.getEgressRule(),fluent.getHTTPFaultInjection(),fluent.getHTTPRedirect(),fluent.getHTTPRetry(),fluent.getHTTPRewrite(),fluent.getHTTPTimeout(),fluent.getIngressRule(),fluent.getIstioService(),fluent.getL4FaultInjection(),fluent.getL4MatchAttributes(),fluent.getLoadBalancing(),fluent.getMatchCondition(),fluent.getMatchRequest(),fluent.getMeshConfig(),fluent.getProxyConfig(),fluent.getQuotaParams(),fluent.getQuotaResult(),fluent.getReferencedAttributes(),fluent.getReportRequest(),fluent.getReportResponse(),fluent.getRouteRule(),fluent.getServiceClass(),fluent.getServicePlan(),fluent.getStringMap(),fluent.getStringMatch());
me.snowdrop.istio.api.builder.ValidationUtils.validate(buildable);
return buildable;
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
IstioSchemaBuilder that = (IstioSchemaBuilder) o;
if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;
if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy