
io.fabric8.kubernetes.api.model.EndpointAddressFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;
/**
* Generated
*/
public class EndpointAddressFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.EndpointAddressFluent{
public EndpointAddressFluentImpl() {
}
public EndpointAddressFluentImpl(io.fabric8.kubernetes.api.model.EndpointAddress instance) {
this.withHostname(instance.getHostname());
this.withIp(instance.getIp());
this.withNodeName(instance.getNodeName());
this.withTargetRef(instance.getTargetRef());
this.withAdditionalProperties(instance.getAdditionalProperties());
}
private java.lang.String hostname;
private java.lang.String ip;
private java.lang.String nodeName;
private io.fabric8.kubernetes.api.model.ObjectReferenceBuilder targetRef;
private java.util.Map additionalProperties;
public java.lang.String getHostname() {
return this.hostname;
}
public A withHostname(java.lang.String hostname) {
this.hostname=hostname; return (A) this;
}
public java.lang.Boolean hasHostname() {
return this.hostname != null;
}
/**
* Method is deprecated. use withHostname instead.
*/
@java.lang.Deprecated
public A withNewHostname(java.lang.String arg0) {
return (A)withHostname(new String(arg0));
}
public java.lang.String getIp() {
return this.ip;
}
public A withIp(java.lang.String ip) {
this.ip=ip; return (A) this;
}
public java.lang.Boolean hasIp() {
return this.ip != null;
}
/**
* Method is deprecated. use withIp instead.
*/
@java.lang.Deprecated
public A withNewIp(java.lang.String arg0) {
return (A)withIp(new String(arg0));
}
public java.lang.String getNodeName() {
return this.nodeName;
}
public A withNodeName(java.lang.String nodeName) {
this.nodeName=nodeName; return (A) this;
}
public java.lang.Boolean hasNodeName() {
return this.nodeName != null;
}
/**
* Method is deprecated. use withNodeName instead.
*/
@java.lang.Deprecated
public A withNewNodeName(java.lang.String arg0) {
return (A)withNodeName(new String(arg0));
}
/**
* This method has been deprecated, please use method buildTargetRef instead.
* @return The buildable object.
*/
@java.lang.Deprecated
public io.fabric8.kubernetes.api.model.ObjectReference getTargetRef() {
return this.targetRef!=null?this.targetRef.build():null;
}
public io.fabric8.kubernetes.api.model.ObjectReference buildTargetRef() {
return this.targetRef!=null?this.targetRef.build():null;
}
public A withTargetRef(io.fabric8.kubernetes.api.model.ObjectReference targetRef) {
_visitables.get("targetRef").remove(this.targetRef);
if (targetRef!=null){ this.targetRef= new io.fabric8.kubernetes.api.model.ObjectReferenceBuilder(targetRef); _visitables.get("targetRef").add(this.targetRef);} return (A) this;
}
public java.lang.Boolean hasTargetRef() {
return this.targetRef != null;
}
public io.fabric8.kubernetes.api.model.EndpointAddressFluent.TargetRefNested withNewTargetRef() {
return new io.fabric8.kubernetes.api.model.EndpointAddressFluentImpl.TargetRefNestedImpl();
}
public io.fabric8.kubernetes.api.model.EndpointAddressFluent.TargetRefNested withNewTargetRefLike(io.fabric8.kubernetes.api.model.ObjectReference item) {
return new io.fabric8.kubernetes.api.model.EndpointAddressFluentImpl.TargetRefNestedImpl(item);
}
public io.fabric8.kubernetes.api.model.EndpointAddressFluent.TargetRefNested editTargetRef() {
return withNewTargetRefLike(getTargetRef());
}
public io.fabric8.kubernetes.api.model.EndpointAddressFluent.TargetRefNested editOrNewTargetRef() {
return withNewTargetRefLike(getTargetRef() != null ? getTargetRef(): new io.fabric8.kubernetes.api.model.ObjectReferenceBuilder().build());
}
public io.fabric8.kubernetes.api.model.EndpointAddressFluent.TargetRefNested editOrNewTargetRefLike(io.fabric8.kubernetes.api.model.ObjectReference item) {
return withNewTargetRefLike(getTargetRef() != null ? getTargetRef(): item);
}
public A addToAdditionalProperties(java.lang.String key,java.lang.Object value) {
if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
}
public A addToAdditionalProperties(java.util.Map map) {
if(this.additionalProperties == null && map != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
}
public A removeFromAdditionalProperties(java.lang.String key) {
if(this.additionalProperties == null) { return (A) this; }
if(key != null && this.additionalProperties != null) {this.additionalProperties.remove(key);} return (A)this;
}
public A removeFromAdditionalProperties(java.util.Map map) {
if(this.additionalProperties == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.additionalProperties != null){this.additionalProperties.remove(key);}}} return (A)this;
}
public java.util.Map getAdditionalProperties() {
return this.additionalProperties;
}
public A withAdditionalProperties(java.util.Map additionalProperties) {
if (additionalProperties == null) { this.additionalProperties = null;} else {this.additionalProperties = new java.util.LinkedHashMap(additionalProperties);} return (A) this;
}
public java.lang.Boolean hasAdditionalProperties() {
return this.additionalProperties != null;
}
public boolean equals(java.lang.Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
EndpointAddressFluentImpl that = (EndpointAddressFluentImpl) o;
if (hostname != null ? !hostname.equals(that.hostname) :that.hostname != null) return false;
if (ip != null ? !ip.equals(that.ip) :that.ip != null) return false;
if (nodeName != null ? !nodeName.equals(that.nodeName) :that.nodeName != null) return false;
if (targetRef != null ? !targetRef.equals(that.targetRef) :that.targetRef != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(hostname, ip, nodeName, targetRef, additionalProperties, super.hashCode());
}
public class TargetRefNestedImpl extends io.fabric8.kubernetes.api.model.ObjectReferenceFluentImpl> implements io.fabric8.kubernetes.api.model.EndpointAddressFluent.TargetRefNested,io.fabric8.kubernetes.api.builder.Nested{
TargetRefNestedImpl(io.fabric8.kubernetes.api.model.ObjectReference item) {
this.builder = new io.fabric8.kubernetes.api.model.ObjectReferenceBuilder(this, item);
}
TargetRefNestedImpl() {
this.builder = new io.fabric8.kubernetes.api.model.ObjectReferenceBuilder(this);
}
io.fabric8.kubernetes.api.model.ObjectReferenceBuilder builder;
public N and() {
return (N) EndpointAddressFluentImpl.this.withTargetRef(builder.build());
}
public N endTargetRef() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy