com.yahoo.athenz.msd.KubernetesNetworkPolicySpec Maven / Gradle / Ivy
The newest version!
//
// 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 java.util.List;
import com.yahoo.rdl.*;
//
// KubernetesNetworkPolicySpec - Kubernetes network policy spec
//
@JsonIgnoreProperties(ignoreUnknown = true)
public class KubernetesNetworkPolicySpec {
public KubernetesLabelSelector podSelector;
public List policyTypes;
@RdlOptional
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List ingress;
@RdlOptional
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List egress;
public KubernetesNetworkPolicySpec setPodSelector(KubernetesLabelSelector podSelector) {
this.podSelector = podSelector;
return this;
}
public KubernetesLabelSelector getPodSelector() {
return podSelector;
}
public KubernetesNetworkPolicySpec setPolicyTypes(List policyTypes) {
this.policyTypes = policyTypes;
return this;
}
public List getPolicyTypes() {
return policyTypes;
}
public KubernetesNetworkPolicySpec setIngress(List ingress) {
this.ingress = ingress;
return this;
}
public List getIngress() {
return ingress;
}
public KubernetesNetworkPolicySpec setEgress(List egress) {
this.egress = egress;
return this;
}
public List getEgress() {
return egress;
}
@Override
public boolean equals(Object another) {
if (this != another) {
if (another == null || another.getClass() != KubernetesNetworkPolicySpec.class) {
return false;
}
KubernetesNetworkPolicySpec a = (KubernetesNetworkPolicySpec) another;
if (podSelector == null ? a.podSelector != null : !podSelector.equals(a.podSelector)) {
return false;
}
if (policyTypes == null ? a.policyTypes != null : !policyTypes.equals(a.policyTypes)) {
return false;
}
if (ingress == null ? a.ingress != null : !ingress.equals(a.ingress)) {
return false;
}
if (egress == null ? a.egress != null : !egress.equals(a.egress)) {
return false;
}
}
return true;
}
}