
io.kubernetes.client.models.V1beta1VolumeAttachmentSpecFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.models;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class V1beta1VolumeAttachmentSpecFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta1VolumeAttachmentSpecFluent{
private String attacher;
private String nodeName;
private V1beta1VolumeAttachmentSourceBuilder source;
public V1beta1VolumeAttachmentSpecFluentImpl(){
}
public V1beta1VolumeAttachmentSpecFluentImpl(V1beta1VolumeAttachmentSpec instance){
this.withAttacher(instance.getAttacher());
this.withNodeName(instance.getNodeName());
this.withSource(instance.getSource());
}
public String getAttacher(){
return this.attacher;
}
public A withAttacher(String attacher){
this.attacher=attacher; return (A) this;
}
public Boolean hasAttacher(){
return this.attacher != null;
}
public String getNodeName(){
return this.nodeName;
}
public A withNodeName(String nodeName){
this.nodeName=nodeName; return (A) this;
}
public Boolean hasNodeName(){
return this.nodeName != null;
}
/**
* This method has been deprecated, please use method buildSource instead.
*/
@Deprecated public V1beta1VolumeAttachmentSource getSource(){
return this.source!=null?this.source.build():null;
}
public V1beta1VolumeAttachmentSource buildSource(){
return this.source!=null?this.source.build():null;
}
public A withSource(V1beta1VolumeAttachmentSource source){
_visitables.remove(this.source);
if (source!=null){ this.source= new V1beta1VolumeAttachmentSourceBuilder(source); _visitables.add(this.source);} return (A) this;
}
public Boolean hasSource(){
return this.source != null;
}
public V1beta1VolumeAttachmentSpecFluent.SourceNested withNewSource(){
return new SourceNestedImpl();
}
public V1beta1VolumeAttachmentSpecFluent.SourceNested withNewSourceLike(V1beta1VolumeAttachmentSource item){
return new SourceNestedImpl(item);
}
public V1beta1VolumeAttachmentSpecFluent.SourceNested editSource(){
return withNewSourceLike(getSource());
}
public V1beta1VolumeAttachmentSpecFluent.SourceNested editOrNewSource(){
return withNewSourceLike(getSource() != null ? getSource(): new V1beta1VolumeAttachmentSourceBuilder().build());
}
public V1beta1VolumeAttachmentSpecFluent.SourceNested editOrNewSourceLike(V1beta1VolumeAttachmentSource item){
return withNewSourceLike(getSource() != null ? getSource(): 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;
V1beta1VolumeAttachmentSpecFluentImpl that = (V1beta1VolumeAttachmentSpecFluentImpl) o;
if (attacher != null ? !attacher.equals(that.attacher) :that.attacher != null) return false;
if (nodeName != null ? !nodeName.equals(that.nodeName) :that.nodeName != null) return false;
if (source != null ? !source.equals(that.source) :that.source != null) return false;
return true;
}
public class SourceNestedImpl extends V1beta1VolumeAttachmentSourceFluentImpl> implements V1beta1VolumeAttachmentSpecFluent.SourceNested,io.kubernetes.client.fluent.Nested{
private final V1beta1VolumeAttachmentSourceBuilder builder;
SourceNestedImpl(V1beta1VolumeAttachmentSource item){
this.builder = new V1beta1VolumeAttachmentSourceBuilder(this, item);
}
SourceNestedImpl(){
this.builder = new V1beta1VolumeAttachmentSourceBuilder(this);
}
public N and(){
return (N) V1beta1VolumeAttachmentSpecFluentImpl.this.withSource(builder.build());
}
public N endSource(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy