io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluentImpl Maven / Gradle / Ivy
package io.fabric8.knative.internal.pkg.apis.duck.v1;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
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 io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluent {
private io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder ref;
private java.lang.String uri;
public DestinationFluentImpl() {
}
public DestinationFluentImpl(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination instance) {
this.withRef(instance.getRef());
this.withUri(instance.getUri());
}
@java.lang.Deprecated
/**
* This method has been deprecated, please use method buildRef instead.
* @return The buildable object.
*/
public io.fabric8.knative.internal.pkg.apis.duck.v1.KReference getRef() {
return this.ref!=null?this.ref.build():null;
}
public io.fabric8.knative.internal.pkg.apis.duck.v1.KReference buildRef() {
return this.ref!=null?this.ref.build():null;
}
public A withRef(io.fabric8.knative.internal.pkg.apis.duck.v1.KReference ref) {
_visitables.get("ref").remove(this.ref);
if (ref!=null){ this.ref= new io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder(ref); _visitables.get("ref").add(this.ref);} return (A) this;
}
public java.lang.Boolean hasRef() {
return this.ref != null;
}
public A withNewRef(java.lang.String apiVersion,java.lang.String kind,java.lang.String name,java.lang.String namespace) {
return (A)withRef(new KReference(apiVersion, kind, name, namespace));
}
public io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluent.RefNested withNewRef() {
return new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluentImpl.RefNestedImpl();
}
public io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluent.RefNested withNewRefLike(io.fabric8.knative.internal.pkg.apis.duck.v1.KReference item) {
return new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluentImpl.RefNestedImpl(item);
}
public io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluent.RefNested editRef() {
return withNewRefLike(getRef());
}
public io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluent.RefNested editOrNewRef() {
return withNewRefLike(getRef() != null ? getRef(): new io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder().build());
}
public io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluent.RefNested editOrNewRefLike(io.fabric8.knative.internal.pkg.apis.duck.v1.KReference item) {
return withNewRefLike(getRef() != null ? getRef(): item);
}
public java.lang.String getUri() {
return this.uri;
}
public A withUri(java.lang.String uri) {
this.uri=uri; return (A) this;
}
public java.lang.Boolean hasUri() {
return this.uri != null;
}
@java.lang.Deprecated
/**
* Method is deprecated. use withUri instead.
*/
public A withNewUri(java.lang.String arg0) {
return (A)withUri(new String(arg0));
}
public boolean equals(java.lang.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 int hashCode() {
return java.util.Objects.hash(ref, uri, super.hashCode());
}
public class RefNestedImpl extends io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceFluentImpl> implements io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluent.RefNested,io.fabric8.kubernetes.api.builder.Nested {
private final io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder builder;
RefNestedImpl(io.fabric8.knative.internal.pkg.apis.duck.v1.KReference item) {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder(this, item);
}
RefNestedImpl() {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder(this);
}
public N and() {
return (N) DestinationFluentImpl.this.withRef(builder.build());
}
public N endRef() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy