com.yahoo.athenz.msd.KubernetesNetworkPolicyPeer Maven / Gradle / Ivy
//
// This file generated by rdl 1.5.2. Do not modify!
//
package com.yahoo.athenz.msd;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yahoo.rdl.*;
//
// KubernetesNetworkPolicyPeer - Kubernetes network policy peer (source/target)
//
@JsonIgnoreProperties(ignoreUnknown = true)
public class KubernetesNetworkPolicyPeer {
@RdlOptional
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public KubernetesLabelSelector podSelector;
@RdlOptional
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public KubernetesLabelSelector namespaceSelector;
@RdlOptional
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public KubernetesIPBlock ipBlock;
public KubernetesNetworkPolicyPeer setPodSelector(KubernetesLabelSelector podSelector) {
this.podSelector = podSelector;
return this;
}
public KubernetesLabelSelector getPodSelector() {
return podSelector;
}
public KubernetesNetworkPolicyPeer setNamespaceSelector(KubernetesLabelSelector namespaceSelector) {
this.namespaceSelector = namespaceSelector;
return this;
}
public KubernetesLabelSelector getNamespaceSelector() {
return namespaceSelector;
}
public KubernetesNetworkPolicyPeer setIpBlock(KubernetesIPBlock ipBlock) {
this.ipBlock = ipBlock;
return this;
}
public KubernetesIPBlock getIpBlock() {
return ipBlock;
}
@Override
public boolean equals(Object another) {
if (this != another) {
if (another == null || another.getClass() != KubernetesNetworkPolicyPeer.class) {
return false;
}
KubernetesNetworkPolicyPeer a = (KubernetesNetworkPolicyPeer) another;
if (podSelector == null ? a.podSelector != null : !podSelector.equals(a.podSelector)) {
return false;
}
if (namespaceSelector == null ? a.namespaceSelector != null : !namespaceSelector.equals(a.namespaceSelector)) {
return false;
}
if (ipBlock == null ? a.ipBlock != null : !ipBlock.equals(a.ipBlock)) {
return false;
}
}
return true;
}
}