me.snowdrop.istio.api.networking.v1alpha3.HeadersFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.networking.v1alpha3;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class HeadersFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements HeadersFluent{
private HeaderOperationsBuilder request;
private HeaderOperationsBuilder response;
public HeadersFluentImpl(){
}
public HeadersFluentImpl(Headers instance){
this.withRequest(instance.getRequest());
this.withResponse(instance.getResponse());
}
/**
* This method has been deprecated, please use method buildRequest instead.
* @return The buildable object.
*/
@Deprecated public HeaderOperations getRequest(){
return this.request!=null?this.request.build():null;
}
public HeaderOperations buildRequest(){
return this.request!=null?this.request.build():null;
}
public A withRequest(HeaderOperations request){
_visitables.remove(this.request);
if (request!=null){ this.request= new HeaderOperationsBuilder(request); _visitables.add(this.request);} return (A) this;
}
public Boolean hasRequest(){
return this.request != null;
}
public HeadersFluent.RequestNested withNewRequest(){
return new RequestNestedImpl();
}
public HeadersFluent.RequestNested withNewRequestLike(HeaderOperations item){
return new RequestNestedImpl(item);
}
public HeadersFluent.RequestNested editRequest(){
return withNewRequestLike(getRequest());
}
public HeadersFluent.RequestNested editOrNewRequest(){
return withNewRequestLike(getRequest() != null ? getRequest(): new HeaderOperationsBuilder().build());
}
public HeadersFluent.RequestNested editOrNewRequestLike(HeaderOperations item){
return withNewRequestLike(getRequest() != null ? getRequest(): item);
}
/**
* This method has been deprecated, please use method buildResponse instead.
* @return The buildable object.
*/
@Deprecated public HeaderOperations getResponse(){
return this.response!=null?this.response.build():null;
}
public HeaderOperations buildResponse(){
return this.response!=null?this.response.build():null;
}
public A withResponse(HeaderOperations response){
_visitables.remove(this.response);
if (response!=null){ this.response= new HeaderOperationsBuilder(response); _visitables.add(this.response);} return (A) this;
}
public Boolean hasResponse(){
return this.response != null;
}
public HeadersFluent.ResponseNested withNewResponse(){
return new ResponseNestedImpl();
}
public HeadersFluent.ResponseNested withNewResponseLike(HeaderOperations item){
return new ResponseNestedImpl(item);
}
public HeadersFluent.ResponseNested editResponse(){
return withNewResponseLike(getResponse());
}
public HeadersFluent.ResponseNested editOrNewResponse(){
return withNewResponseLike(getResponse() != null ? getResponse(): new HeaderOperationsBuilder().build());
}
public HeadersFluent.ResponseNested editOrNewResponseLike(HeaderOperations item){
return withNewResponseLike(getResponse() != null ? getResponse(): 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;
HeadersFluentImpl that = (HeadersFluentImpl) o;
if (request != null ? !request.equals(that.request) :that.request != null) return false;
if (response != null ? !response.equals(that.response) :that.response != null) return false;
return true;
}
public class RequestNestedImpl extends HeaderOperationsFluentImpl> implements HeadersFluent.RequestNested,io.fabric8.kubernetes.api.builder.Nested{
private final HeaderOperationsBuilder builder;
RequestNestedImpl(HeaderOperations item){
this.builder = new HeaderOperationsBuilder(this, item);
}
RequestNestedImpl(){
this.builder = new HeaderOperationsBuilder(this);
}
public N and(){
return (N) HeadersFluentImpl.this.withRequest(builder.build());
}
public N endRequest(){
return and();
}
}
public class ResponseNestedImpl extends HeaderOperationsFluentImpl> implements HeadersFluent.ResponseNested,io.fabric8.kubernetes.api.builder.Nested{
private final HeaderOperationsBuilder builder;
ResponseNestedImpl(HeaderOperations item){
this.builder = new HeaderOperationsBuilder(this, item);
}
ResponseNestedImpl(){
this.builder = new HeaderOperationsBuilder(this);
}
public N and(){
return (N) HeadersFluentImpl.this.withResponse(builder.build());
}
public N endResponse(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy