Class Generated.NetworkPolicySpec.Builder

    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicySpec.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicySpec.Builder>
      • getDefaultInstanceForType

        public Generated.NetworkPolicySpec getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Generated.NetworkPolicySpec build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Generated.NetworkPolicySpec buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicySpec.Builder>
      • mergeFrom

        public Generated.NetworkPolicySpec.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                      throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Generated.NetworkPolicySpec.Builder>
        Throws:
        IOException
      • hasPodSelector

        public boolean hasPodSelector()
         podSelector selects the pods to which this NetworkPolicy object applies.
         The array of ingress rules is applied to any pods selected by this field.
         Multiple network policies can select the same set of pods. In this case,
         the ingress rules for each are combined additively.
         This field is NOT optional and follows standard label selector semantics.
         An empty podSelector matches all pods in this namespace.
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
        Specified by:
        hasPodSelector in interface Generated.NetworkPolicySpecOrBuilder
        Returns:
        Whether the podSelector field is set.
      • getPodSelector

        public Generated.LabelSelector getPodSelector()
         podSelector selects the pods to which this NetworkPolicy object applies.
         The array of ingress rules is applied to any pods selected by this field.
         Multiple network policies can select the same set of pods. In this case,
         the ingress rules for each are combined additively.
         This field is NOT optional and follows standard label selector semantics.
         An empty podSelector matches all pods in this namespace.
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
        Specified by:
        getPodSelector in interface Generated.NetworkPolicySpecOrBuilder
        Returns:
        The podSelector.
      • setPodSelector

        public Generated.NetworkPolicySpec.Builder setPodSelector​(Generated.LabelSelector value)
         podSelector selects the pods to which this NetworkPolicy object applies.
         The array of ingress rules is applied to any pods selected by this field.
         Multiple network policies can select the same set of pods. In this case,
         the ingress rules for each are combined additively.
         This field is NOT optional and follows standard label selector semantics.
         An empty podSelector matches all pods in this namespace.
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
      • setPodSelector

        public Generated.NetworkPolicySpec.Builder setPodSelector​(Generated.LabelSelector.Builder builderForValue)
         podSelector selects the pods to which this NetworkPolicy object applies.
         The array of ingress rules is applied to any pods selected by this field.
         Multiple network policies can select the same set of pods. In this case,
         the ingress rules for each are combined additively.
         This field is NOT optional and follows standard label selector semantics.
         An empty podSelector matches all pods in this namespace.
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
      • mergePodSelector

        public Generated.NetworkPolicySpec.Builder mergePodSelector​(Generated.LabelSelector value)
         podSelector selects the pods to which this NetworkPolicy object applies.
         The array of ingress rules is applied to any pods selected by this field.
         Multiple network policies can select the same set of pods. In this case,
         the ingress rules for each are combined additively.
         This field is NOT optional and follows standard label selector semantics.
         An empty podSelector matches all pods in this namespace.
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
      • clearPodSelector

        public Generated.NetworkPolicySpec.Builder clearPodSelector()
         podSelector selects the pods to which this NetworkPolicy object applies.
         The array of ingress rules is applied to any pods selected by this field.
         Multiple network policies can select the same set of pods. In this case,
         the ingress rules for each are combined additively.
         This field is NOT optional and follows standard label selector semantics.
         An empty podSelector matches all pods in this namespace.
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
      • getPodSelectorBuilder

        public Generated.LabelSelector.Builder getPodSelectorBuilder()
         podSelector selects the pods to which this NetworkPolicy object applies.
         The array of ingress rules is applied to any pods selected by this field.
         Multiple network policies can select the same set of pods. In this case,
         the ingress rules for each are combined additively.
         This field is NOT optional and follows standard label selector semantics.
         An empty podSelector matches all pods in this namespace.
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
      • getPodSelectorOrBuilder

        public Generated.LabelSelectorOrBuilder getPodSelectorOrBuilder()
         podSelector selects the pods to which this NetworkPolicy object applies.
         The array of ingress rules is applied to any pods selected by this field.
         Multiple network policies can select the same set of pods. In this case,
         the ingress rules for each are combined additively.
         This field is NOT optional and follows standard label selector semantics.
         An empty podSelector matches all pods in this namespace.
         
        optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
        Specified by:
        getPodSelectorOrBuilder in interface Generated.NetworkPolicySpecOrBuilder
      • getIngressList

        public List<Generated.NetworkPolicyIngressRule> getIngressList()
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
        Specified by:
        getIngressList in interface Generated.NetworkPolicySpecOrBuilder
      • getIngressCount

        public int getIngressCount()
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
        Specified by:
        getIngressCount in interface Generated.NetworkPolicySpecOrBuilder
      • getIngress

        public Generated.NetworkPolicyIngressRule getIngress​(int index)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
        Specified by:
        getIngress in interface Generated.NetworkPolicySpecOrBuilder
      • setIngress

        public Generated.NetworkPolicySpec.Builder setIngress​(int index,
                                                              Generated.NetworkPolicyIngressRule value)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • setIngress

        public Generated.NetworkPolicySpec.Builder setIngress​(int index,
                                                              Generated.NetworkPolicyIngressRule.Builder builderForValue)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • addIngress

        public Generated.NetworkPolicySpec.Builder addIngress​(Generated.NetworkPolicyIngressRule value)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • addIngress

        public Generated.NetworkPolicySpec.Builder addIngress​(int index,
                                                              Generated.NetworkPolicyIngressRule value)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • addIngress

        public Generated.NetworkPolicySpec.Builder addIngress​(Generated.NetworkPolicyIngressRule.Builder builderForValue)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • addIngress

        public Generated.NetworkPolicySpec.Builder addIngress​(int index,
                                                              Generated.NetworkPolicyIngressRule.Builder builderForValue)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • addAllIngress

        public Generated.NetworkPolicySpec.Builder addAllIngress​(Iterable<? extends Generated.NetworkPolicyIngressRule> values)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • clearIngress

        public Generated.NetworkPolicySpec.Builder clearIngress()
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • removeIngress

        public Generated.NetworkPolicySpec.Builder removeIngress​(int index)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • getIngressBuilder

        public Generated.NetworkPolicyIngressRule.Builder getIngressBuilder​(int index)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • getIngressOrBuilder

        public Generated.NetworkPolicyIngressRuleOrBuilder getIngressOrBuilder​(int index)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
        Specified by:
        getIngressOrBuilder in interface Generated.NetworkPolicySpecOrBuilder
      • getIngressOrBuilderList

        public List<? extends Generated.NetworkPolicyIngressRuleOrBuilder> getIngressOrBuilderList()
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
        Specified by:
        getIngressOrBuilderList in interface Generated.NetworkPolicySpecOrBuilder
      • addIngressBuilder

        public Generated.NetworkPolicyIngressRule.Builder addIngressBuilder()
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • addIngressBuilder

        public Generated.NetworkPolicyIngressRule.Builder addIngressBuilder​(int index)
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • getIngressBuilderList

        public List<Generated.NetworkPolicyIngressRule.Builder> getIngressBuilderList()
         ingress is a list of ingress rules to be applied to the selected pods.
         Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
         (and cluster policy otherwise allows the traffic), OR if the traffic source is
         the pod's local node, OR if the traffic matches at least one ingress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy does not allow any traffic (and serves
         solely to ensure that the pods it selects are isolated by default)
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      • getEgressList

        public List<Generated.NetworkPolicyEgressRule> getEgressList()
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
        Specified by:
        getEgressList in interface Generated.NetworkPolicySpecOrBuilder
      • getEgressCount

        public int getEgressCount()
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
        Specified by:
        getEgressCount in interface Generated.NetworkPolicySpecOrBuilder
      • getEgress

        public Generated.NetworkPolicyEgressRule getEgress​(int index)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
        Specified by:
        getEgress in interface Generated.NetworkPolicySpecOrBuilder
      • setEgress

        public Generated.NetworkPolicySpec.Builder setEgress​(int index,
                                                             Generated.NetworkPolicyEgressRule value)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • setEgress

        public Generated.NetworkPolicySpec.Builder setEgress​(int index,
                                                             Generated.NetworkPolicyEgressRule.Builder builderForValue)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • addEgress

        public Generated.NetworkPolicySpec.Builder addEgress​(Generated.NetworkPolicyEgressRule value)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • addEgress

        public Generated.NetworkPolicySpec.Builder addEgress​(int index,
                                                             Generated.NetworkPolicyEgressRule value)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • addEgress

        public Generated.NetworkPolicySpec.Builder addEgress​(Generated.NetworkPolicyEgressRule.Builder builderForValue)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • addEgress

        public Generated.NetworkPolicySpec.Builder addEgress​(int index,
                                                             Generated.NetworkPolicyEgressRule.Builder builderForValue)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • addAllEgress

        public Generated.NetworkPolicySpec.Builder addAllEgress​(Iterable<? extends Generated.NetworkPolicyEgressRule> values)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • clearEgress

        public Generated.NetworkPolicySpec.Builder clearEgress()
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • removeEgress

        public Generated.NetworkPolicySpec.Builder removeEgress​(int index)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • getEgressBuilder

        public Generated.NetworkPolicyEgressRule.Builder getEgressBuilder​(int index)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • getEgressOrBuilder

        public Generated.NetworkPolicyEgressRuleOrBuilder getEgressOrBuilder​(int index)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
        Specified by:
        getEgressOrBuilder in interface Generated.NetworkPolicySpecOrBuilder
      • getEgressOrBuilderList

        public List<? extends Generated.NetworkPolicyEgressRuleOrBuilder> getEgressOrBuilderList()
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
        Specified by:
        getEgressOrBuilderList in interface Generated.NetworkPolicySpecOrBuilder
      • addEgressBuilder

        public Generated.NetworkPolicyEgressRule.Builder addEgressBuilder()
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • addEgressBuilder

        public Generated.NetworkPolicyEgressRule.Builder addEgressBuilder​(int index)
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • getEgressBuilderList

        public List<Generated.NetworkPolicyEgressRule.Builder> getEgressBuilderList()
         egress is a list of egress rules to be applied to the selected pods. Outgoing traffic
         is allowed if there are no NetworkPolicies selecting the pod (and cluster policy
         otherwise allows the traffic), OR if the traffic matches at least one egress rule
         across all of the NetworkPolicy objects whose podSelector matches the pod. If
         this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
         solely to ensure that the pods it selects are isolated by default).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      • getPolicyTypesList

        public com.google.protobuf.ProtocolStringList getPolicyTypesList()
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Specified by:
        getPolicyTypesList in interface Generated.NetworkPolicySpecOrBuilder
        Returns:
        A list containing the policyTypes.
      • getPolicyTypesCount

        public int getPolicyTypesCount()
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Specified by:
        getPolicyTypesCount in interface Generated.NetworkPolicySpecOrBuilder
        Returns:
        The count of policyTypes.
      • getPolicyTypes

        public String getPolicyTypes​(int index)
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Specified by:
        getPolicyTypes in interface Generated.NetworkPolicySpecOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The policyTypes at the given index.
      • getPolicyTypesBytes

        public com.google.protobuf.ByteString getPolicyTypesBytes​(int index)
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Specified by:
        getPolicyTypesBytes in interface Generated.NetworkPolicySpecOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the policyTypes at the given index.
      • setPolicyTypes

        public Generated.NetworkPolicySpec.Builder setPolicyTypes​(int index,
                                                                  String value)
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Parameters:
        index - The index to set the value at.
        value - The policyTypes to set.
        Returns:
        This builder for chaining.
      • addPolicyTypes

        public Generated.NetworkPolicySpec.Builder addPolicyTypes​(String value)
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Parameters:
        value - The policyTypes to add.
        Returns:
        This builder for chaining.
      • addAllPolicyTypes

        public Generated.NetworkPolicySpec.Builder addAllPolicyTypes​(Iterable<String> values)
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Parameters:
        values - The policyTypes to add.
        Returns:
        This builder for chaining.
      • clearPolicyTypes

        public Generated.NetworkPolicySpec.Builder clearPolicyTypes()
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Returns:
        This builder for chaining.
      • addPolicyTypesBytes

        public Generated.NetworkPolicySpec.Builder addPolicyTypesBytes​(com.google.protobuf.ByteString value)
         policyTypes is a list of rule types that the NetworkPolicy relates to.
         Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"].
         If this field is not specified, it will default based on the existence of ingress or egress rules;
         policies that contain an egress section are assumed to affect egress, and all policies
         (whether or not they contain an ingress section) are assumed to affect ingress.
         If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
         Likewise, if you want to write a policy that specifies that no egress is allowed,
         you must specify a policyTypes value that include "Egress" (since such a policy would not include
         an egress section and would otherwise default to just [ "Ingress" ]).
         This field is beta-level in 1.8
         +optional
         +listType=atomic
         
        repeated string policyTypes = 4;
        Parameters:
        value - The bytes of the policyTypes to add.
        Returns:
        This builder for chaining.
      • mergeUnknownFields

        public final Generated.NetworkPolicySpec.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicySpec.Builder>