Class V1Networking.NetworkPolicySpec.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<V1Networking.NetworkPolicySpec.Builder>
io.kubernetes.client.proto.V1Networking.NetworkPolicySpec.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, V1Networking.NetworkPolicySpecOrBuilder, Cloneable
Enclosing class:
V1Networking.NetworkPolicySpec

public static final class V1Networking.NetworkPolicySpec.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<V1Networking.NetworkPolicySpec.Builder> implements V1Networking.NetworkPolicySpecOrBuilder
 NetworkPolicySpec provides the specification of a NetworkPolicy
 
Protobuf type k8s.io.api.networking.v1.NetworkPolicySpec
  • Method Details

    • 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<V1Networking.NetworkPolicySpec.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<V1Networking.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<V1Networking.NetworkPolicySpec.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<V1Networking.NetworkPolicySpec.Builder>
    • setField

      public V1Networking.NetworkPolicySpec.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<V1Networking.NetworkPolicySpec.Builder>
    • clearField

      public V1Networking.NetworkPolicySpec.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<V1Networking.NetworkPolicySpec.Builder>
    • clearOneof

      public V1Networking.NetworkPolicySpec.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<V1Networking.NetworkPolicySpec.Builder>
    • setRepeatedField

      public V1Networking.NetworkPolicySpec.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V1Networking.NetworkPolicySpec.Builder>
    • addRepeatedField

      public V1Networking.NetworkPolicySpec.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<V1Networking.NetworkPolicySpec.Builder>
    • mergeFrom

      public V1Networking.NetworkPolicySpec.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<V1Networking.NetworkPolicySpec.Builder>
    • mergeFrom

    • isInitialized

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

      public V1Networking.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<V1Networking.NetworkPolicySpec.Builder>
      Throws:
      IOException
    • hasPodSelector

      public boolean hasPodSelector()
       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 V1Networking.NetworkPolicySpecOrBuilder
    • getPodSelector

      public Meta.LabelSelector getPodSelector()
       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 V1Networking.NetworkPolicySpecOrBuilder
    • setPodSelector

       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 V1Networking.NetworkPolicySpec.Builder setPodSelector(Meta.LabelSelector.Builder builderForValue)
       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

       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 V1Networking.NetworkPolicySpec.Builder clearPodSelector()
       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 Meta.LabelSelector.Builder getPodSelectorBuilder()
       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 Meta.LabelSelectorOrBuilder getPodSelectorOrBuilder()
       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 V1Networking.NetworkPolicySpecOrBuilder
    • getIngressList

      public List<V1Networking.NetworkPolicyIngressRule> getIngressList()
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      Specified by:
      getIngressList in interface V1Networking.NetworkPolicySpecOrBuilder
    • getIngressCount

      public int getIngressCount()
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      Specified by:
      getIngressCount in interface V1Networking.NetworkPolicySpecOrBuilder
    • getIngress

      public V1Networking.NetworkPolicyIngressRule getIngress(int index)
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      Specified by:
      getIngress in interface V1Networking.NetworkPolicySpecOrBuilder
    • setIngress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • setIngress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • addIngress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • addIngress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • addIngress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • addIngress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • addAllIngress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • clearIngress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • removeIngress

      public V1Networking.NetworkPolicySpec.Builder removeIngress(int index)
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • getIngressBuilder

      public V1Networking.NetworkPolicyIngressRule.Builder getIngressBuilder(int index)
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • getIngressOrBuilder

      public V1Networking.NetworkPolicyIngressRuleOrBuilder getIngressOrBuilder(int index)
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      Specified by:
      getIngressOrBuilder in interface V1Networking.NetworkPolicySpecOrBuilder
    • getIngressOrBuilderList

      public List<? extends V1Networking.NetworkPolicyIngressRuleOrBuilder> getIngressOrBuilderList()
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
      Specified by:
      getIngressOrBuilderList in interface V1Networking.NetworkPolicySpecOrBuilder
    • addIngressBuilder

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • addIngressBuilder

      public V1Networking.NetworkPolicyIngressRule.Builder addIngressBuilder(int index)
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • getIngressBuilderList

      public List<V1Networking.NetworkPolicyIngressRule.Builder> getIngressBuilderList()
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyIngressRule ingress = 2;
    • getEgressList

      public List<V1Networking.NetworkPolicyEgressRule> getEgressList()
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      Specified by:
      getEgressList in interface V1Networking.NetworkPolicySpecOrBuilder
    • getEgressCount

      public int getEgressCount()
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      Specified by:
      getEgressCount in interface V1Networking.NetworkPolicySpecOrBuilder
    • getEgress

      public V1Networking.NetworkPolicyEgressRule getEgress(int index)
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      Specified by:
      getEgress in interface V1Networking.NetworkPolicySpecOrBuilder
    • setEgress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • setEgress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • addEgress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • addEgress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • addEgress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • addEgress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • addAllEgress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • clearEgress

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • removeEgress

      public V1Networking.NetworkPolicySpec.Builder removeEgress(int index)
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • getEgressBuilder

      public V1Networking.NetworkPolicyEgressRule.Builder getEgressBuilder(int index)
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • getEgressOrBuilder

      public V1Networking.NetworkPolicyEgressRuleOrBuilder getEgressOrBuilder(int index)
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      Specified by:
      getEgressOrBuilder in interface V1Networking.NetworkPolicySpecOrBuilder
    • getEgressOrBuilderList

      public List<? extends V1Networking.NetworkPolicyEgressRuleOrBuilder> getEgressOrBuilderList()
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
      Specified by:
      getEgressOrBuilderList in interface V1Networking.NetworkPolicySpecOrBuilder
    • addEgressBuilder

       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • addEgressBuilder

      public V1Networking.NetworkPolicyEgressRule.Builder addEgressBuilder(int index)
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • getEgressBuilderList

      public List<V1Networking.NetworkPolicyEgressRule.Builder> getEgressBuilderList()
       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
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyEgressRule egress = 3;
    • getPolicyTypesList

      public com.google.protobuf.ProtocolStringList getPolicyTypesList()
       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
       
      repeated string policyTypes = 4;
      Specified by:
      getPolicyTypesList in interface V1Networking.NetworkPolicySpecOrBuilder
    • getPolicyTypesCount

      public int getPolicyTypesCount()
       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
       
      repeated string policyTypes = 4;
      Specified by:
      getPolicyTypesCount in interface V1Networking.NetworkPolicySpecOrBuilder
    • getPolicyTypes

      public String getPolicyTypes(int index)
       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
       
      repeated string policyTypes = 4;
      Specified by:
      getPolicyTypes in interface V1Networking.NetworkPolicySpecOrBuilder
    • getPolicyTypesBytes

      public com.google.protobuf.ByteString getPolicyTypesBytes(int index)
       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
       
      repeated string policyTypes = 4;
      Specified by:
      getPolicyTypesBytes in interface V1Networking.NetworkPolicySpecOrBuilder
    • setPolicyTypes

      public V1Networking.NetworkPolicySpec.Builder setPolicyTypes(int index, String value)
       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
       
      repeated string policyTypes = 4;
    • addPolicyTypes

      public V1Networking.NetworkPolicySpec.Builder addPolicyTypes(String value)
       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
       
      repeated string policyTypes = 4;
    • addAllPolicyTypes

      public V1Networking.NetworkPolicySpec.Builder addAllPolicyTypes(Iterable<String> values)
       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
       
      repeated string policyTypes = 4;
    • clearPolicyTypes

      public V1Networking.NetworkPolicySpec.Builder clearPolicyTypes()
       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
       
      repeated string policyTypes = 4;
    • addPolicyTypesBytes

      public V1Networking.NetworkPolicySpec.Builder addPolicyTypesBytes(com.google.protobuf.ByteString value)
       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
       
      repeated string policyTypes = 4;
    • setUnknownFields

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

      public final V1Networking.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<V1Networking.NetworkPolicySpec.Builder>