io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluentImpl Maven / Gradle / Ivy
package io.fabric8.knative.internal.pkg.apis.duck.v1;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.StringBuilder;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.StringBuffer;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class DestinationFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements DestinationFluent{
private KReferenceBuilder ref;
private String uri;
public DestinationFluentImpl(){
}
public DestinationFluentImpl(Destination instance){
this.withRef(instance.getRef());
this.withUri(instance.getUri());
}
/**
* This method has been deprecated, please use method buildRef instead.
* @return The buildable object.
*/
@Deprecated public KReference getRef(){
return this.ref!=null?this.ref.build():null;
}
public KReference buildRef(){
return this.ref!=null?this.ref.build():null;
}
public A withRef(KReference ref){
_visitables.get("ref").remove(this.ref);
if (ref!=null){ this.ref= new KReferenceBuilder(ref); _visitables.get("ref").add(this.ref);} return (A) this;
}
public Boolean hasRef(){
return this.ref != null;
}
public A withNewRef(String apiVersion,String kind,String name,String namespace){
return (A)withRef(new KReference(apiVersion, kind, name, namespace));
}
public DestinationFluent.RefNested withNewRef(){
return new RefNestedImpl();
}
public DestinationFluent.RefNested withNewRefLike(KReference item){
return new RefNestedImpl(item);
}
public DestinationFluent.RefNested editRef(){
return withNewRefLike(getRef());
}
public DestinationFluent.RefNested editOrNewRef(){
return withNewRefLike(getRef() != null ? getRef(): new KReferenceBuilder().build());
}
public DestinationFluent.RefNested editOrNewRefLike(KReference item){
return withNewRefLike(getRef() != null ? getRef(): item);
}
public String getUri(){
return this.uri;
}
public A withUri(String uri){
this.uri=uri; return (A) this;
}
public Boolean hasUri(){
return this.uri != null;
}
public A withNewUri(String arg1){
return (A)withUri(new String(arg1));
}
public A withNewUri(StringBuilder arg1){
return (A)withUri(new String(arg1));
}
public A withNewUri(StringBuffer arg1){
return (A)withUri(new String(arg1));
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DestinationFluentImpl that = (DestinationFluentImpl) o;
if (ref != null ? !ref.equals(that.ref) :that.ref != null) return false;
if (uri != null ? !uri.equals(that.uri) :that.uri != null) return false;
return true;
}
public class RefNestedImpl extends KReferenceFluentImpl> implements DestinationFluent.RefNested,io.fabric8.kubernetes.api.builder.Nested{
private final KReferenceBuilder builder;
RefNestedImpl(KReference item){
this.builder = new KReferenceBuilder(this, item);
}
RefNestedImpl(){
this.builder = new KReferenceBuilder(this);
}
public N and(){
return (N) DestinationFluentImpl.this.withRef(builder.build());
}
public N endRef(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy