io.fabric8.knative.duck.v1alpha1.AddressableFluentImpl Maven / Gradle / Ivy
package io.fabric8.knative.duck.v1alpha1;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.StringBuilder;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import io.fabric8.knative.v1.URL;
import io.fabric8.knative.v1.URLBuilder;
import io.fabric8.knative.v1.URLFluentImpl;
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 AddressableFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.knative.duck.v1alpha1.AddressableFluent{
private String hostname;
private URLBuilder url;
public AddressableFluentImpl(){
}
public AddressableFluentImpl(io.fabric8.knative.duck.v1alpha1.Addressable instance){
this.withHostname(instance.getHostname());
this.withUrl(instance.getUrl());
}
public String getHostname(){
return this.hostname;
}
public A withHostname(String hostname){
this.hostname=hostname; return (A) this;
}
public Boolean hasHostname(){
return this.hostname != null;
}
public A withNewHostname(String arg1){
return (A)withHostname(new String(arg1));
}
public A withNewHostname(StringBuilder arg1){
return (A)withHostname(new String(arg1));
}
public A withNewHostname(StringBuffer arg1){
return (A)withHostname(new String(arg1));
}
/**
* This method has been deprecated, please use method buildUrl instead.
* @return The buildable object.
*/
@Deprecated public URL getUrl(){
return this.url!=null?this.url.build():null;
}
public URL buildUrl(){
return this.url!=null?this.url.build():null;
}
public A withUrl(URL url){
_visitables.get("url").remove(this.url);
if (url!=null){ this.url= new URLBuilder(url); _visitables.get("url").add(this.url);} return (A) this;
}
public Boolean hasUrl(){
return this.url != null;
}
public AddressableFluent.UrlNested withNewUrl(){
return new UrlNestedImpl();
}
public AddressableFluent.UrlNested withNewUrlLike(URL item){
return new UrlNestedImpl(item);
}
public AddressableFluent.UrlNested editUrl(){
return withNewUrlLike(getUrl());
}
public AddressableFluent.UrlNested editOrNewUrl(){
return withNewUrlLike(getUrl() != null ? getUrl(): new URLBuilder().build());
}
public AddressableFluent.UrlNested editOrNewUrlLike(URL item){
return withNewUrlLike(getUrl() != null ? getUrl(): 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;
AddressableFluentImpl that = (AddressableFluentImpl) o;
if (hostname != null ? !hostname.equals(that.hostname) :that.hostname != null) return false;
if (url != null ? !url.equals(that.url) :that.url != null) return false;
return true;
}
public class UrlNestedImpl extends URLFluentImpl> implements AddressableFluent.UrlNested,io.fabric8.kubernetes.api.builder.Nested{
private final URLBuilder builder;
UrlNestedImpl(URL item){
this.builder = new URLBuilder(this, item);
}
UrlNestedImpl(){
this.builder = new URLBuilder(this);
}
public N and(){
return (N) AddressableFluentImpl.this.withUrl(builder.build());
}
public N endUrl(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy