
io.kubernetes.client.models.V1beta1NetworkPolicyPeerFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.models;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class V1beta1NetworkPolicyPeerFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta1NetworkPolicyPeerFluent{
private V1beta1IPBlockBuilder ipBlock;
private V1LabelSelectorBuilder namespaceSelector;
private V1LabelSelectorBuilder podSelector;
public V1beta1NetworkPolicyPeerFluentImpl(){
}
public V1beta1NetworkPolicyPeerFluentImpl(V1beta1NetworkPolicyPeer instance){
this.withIpBlock(instance.getIpBlock());
this.withNamespaceSelector(instance.getNamespaceSelector());
this.withPodSelector(instance.getPodSelector());
}
/**
* This method has been deprecated, please use method buildIpBlock instead.
*/
@Deprecated public V1beta1IPBlock getIpBlock(){
return this.ipBlock!=null?this.ipBlock.build():null;
}
public V1beta1IPBlock buildIpBlock(){
return this.ipBlock!=null?this.ipBlock.build():null;
}
public A withIpBlock(V1beta1IPBlock ipBlock){
_visitables.remove(this.ipBlock);
if (ipBlock!=null){ this.ipBlock= new V1beta1IPBlockBuilder(ipBlock); _visitables.add(this.ipBlock);} return (A) this;
}
public Boolean hasIpBlock(){
return this.ipBlock != null;
}
public V1beta1NetworkPolicyPeerFluent.IpBlockNested withNewIpBlock(){
return new IpBlockNestedImpl();
}
public V1beta1NetworkPolicyPeerFluent.IpBlockNested withNewIpBlockLike(V1beta1IPBlock item){
return new IpBlockNestedImpl(item);
}
public V1beta1NetworkPolicyPeerFluent.IpBlockNested editIpBlock(){
return withNewIpBlockLike(getIpBlock());
}
public V1beta1NetworkPolicyPeerFluent.IpBlockNested editOrNewIpBlock(){
return withNewIpBlockLike(getIpBlock() != null ? getIpBlock(): new V1beta1IPBlockBuilder().build());
}
public V1beta1NetworkPolicyPeerFluent.IpBlockNested editOrNewIpBlockLike(V1beta1IPBlock item){
return withNewIpBlockLike(getIpBlock() != null ? getIpBlock(): item);
}
/**
* This method has been deprecated, please use method buildNamespaceSelector instead.
*/
@Deprecated public V1LabelSelector getNamespaceSelector(){
return this.namespaceSelector!=null?this.namespaceSelector.build():null;
}
public V1LabelSelector buildNamespaceSelector(){
return this.namespaceSelector!=null?this.namespaceSelector.build():null;
}
public A withNamespaceSelector(V1LabelSelector namespaceSelector){
_visitables.remove(this.namespaceSelector);
if (namespaceSelector!=null){ this.namespaceSelector= new V1LabelSelectorBuilder(namespaceSelector); _visitables.add(this.namespaceSelector);} return (A) this;
}
public Boolean hasNamespaceSelector(){
return this.namespaceSelector != null;
}
public V1beta1NetworkPolicyPeerFluent.NamespaceSelectorNested withNewNamespaceSelector(){
return new NamespaceSelectorNestedImpl();
}
public V1beta1NetworkPolicyPeerFluent.NamespaceSelectorNested withNewNamespaceSelectorLike(V1LabelSelector item){
return new NamespaceSelectorNestedImpl(item);
}
public V1beta1NetworkPolicyPeerFluent.NamespaceSelectorNested editNamespaceSelector(){
return withNewNamespaceSelectorLike(getNamespaceSelector());
}
public V1beta1NetworkPolicyPeerFluent.NamespaceSelectorNested editOrNewNamespaceSelector(){
return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): new V1LabelSelectorBuilder().build());
}
public V1beta1NetworkPolicyPeerFluent.NamespaceSelectorNested editOrNewNamespaceSelectorLike(V1LabelSelector item){
return withNewNamespaceSelectorLike(getNamespaceSelector() != null ? getNamespaceSelector(): item);
}
/**
* This method has been deprecated, please use method buildPodSelector instead.
*/
@Deprecated public V1LabelSelector getPodSelector(){
return this.podSelector!=null?this.podSelector.build():null;
}
public V1LabelSelector buildPodSelector(){
return this.podSelector!=null?this.podSelector.build():null;
}
public A withPodSelector(V1LabelSelector podSelector){
_visitables.remove(this.podSelector);
if (podSelector!=null){ this.podSelector= new V1LabelSelectorBuilder(podSelector); _visitables.add(this.podSelector);} return (A) this;
}
public Boolean hasPodSelector(){
return this.podSelector != null;
}
public V1beta1NetworkPolicyPeerFluent.PodSelectorNested withNewPodSelector(){
return new PodSelectorNestedImpl();
}
public V1beta1NetworkPolicyPeerFluent.PodSelectorNested withNewPodSelectorLike(V1LabelSelector item){
return new PodSelectorNestedImpl(item);
}
public V1beta1NetworkPolicyPeerFluent.PodSelectorNested editPodSelector(){
return withNewPodSelectorLike(getPodSelector());
}
public V1beta1NetworkPolicyPeerFluent.PodSelectorNested editOrNewPodSelector(){
return withNewPodSelectorLike(getPodSelector() != null ? getPodSelector(): new V1LabelSelectorBuilder().build());
}
public V1beta1NetworkPolicyPeerFluent.PodSelectorNested editOrNewPodSelectorLike(V1LabelSelector item){
return withNewPodSelectorLike(getPodSelector() != null ? getPodSelector(): 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;
V1beta1NetworkPolicyPeerFluentImpl that = (V1beta1NetworkPolicyPeerFluentImpl) o;
if (ipBlock != null ? !ipBlock.equals(that.ipBlock) :that.ipBlock != null) return false;
if (namespaceSelector != null ? !namespaceSelector.equals(that.namespaceSelector) :that.namespaceSelector != null) return false;
if (podSelector != null ? !podSelector.equals(that.podSelector) :that.podSelector != null) return false;
return true;
}
public class IpBlockNestedImpl extends V1beta1IPBlockFluentImpl> implements V1beta1NetworkPolicyPeerFluent.IpBlockNested,io.kubernetes.client.fluent.Nested{
private final V1beta1IPBlockBuilder builder;
IpBlockNestedImpl(V1beta1IPBlock item){
this.builder = new V1beta1IPBlockBuilder(this, item);
}
IpBlockNestedImpl(){
this.builder = new V1beta1IPBlockBuilder(this);
}
public N and(){
return (N) V1beta1NetworkPolicyPeerFluentImpl.this.withIpBlock(builder.build());
}
public N endIpBlock(){
return and();
}
}
public class NamespaceSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1beta1NetworkPolicyPeerFluent.NamespaceSelectorNested,io.kubernetes.client.fluent.Nested{
private final V1LabelSelectorBuilder builder;
NamespaceSelectorNestedImpl(V1LabelSelector item){
this.builder = new V1LabelSelectorBuilder(this, item);
}
NamespaceSelectorNestedImpl(){
this.builder = new V1LabelSelectorBuilder(this);
}
public N and(){
return (N) V1beta1NetworkPolicyPeerFluentImpl.this.withNamespaceSelector(builder.build());
}
public N endNamespaceSelector(){
return and();
}
}
public class PodSelectorNestedImpl extends V1LabelSelectorFluentImpl> implements V1beta1NetworkPolicyPeerFluent.PodSelectorNested,io.kubernetes.client.fluent.Nested{
private final V1LabelSelectorBuilder builder;
PodSelectorNestedImpl(V1LabelSelector item){
this.builder = new V1LabelSelectorBuilder(this, item);
}
PodSelectorNestedImpl(){
this.builder = new V1LabelSelectorBuilder(this);
}
public N and(){
return (N) V1beta1NetworkPolicyPeerFluentImpl.this.withPodSelector(builder.build());
}
public N endPodSelector(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy