Class V1beta1Extensions.NetworkPolicySpec.Builder

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

public static final class V1beta1Extensions.NetworkPolicySpec.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<V1beta1Extensions.NetworkPolicySpec.Builder> implements V1beta1Extensions.NetworkPolicySpecOrBuilder
 DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec.
 
Protobuf type k8s.io.api.extensions.v1beta1.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<V1beta1Extensions.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<V1beta1Extensions.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<V1beta1Extensions.NetworkPolicySpec.Builder>
    • getDefaultInstanceForType

      public V1beta1Extensions.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 V1beta1Extensions.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<V1beta1Extensions.NetworkPolicySpec.Builder>
    • setField

      public V1beta1Extensions.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<V1beta1Extensions.NetworkPolicySpec.Builder>
    • clearField

      public V1beta1Extensions.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<V1beta1Extensions.NetworkPolicySpec.Builder>
    • clearOneof

      public V1beta1Extensions.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<V1beta1Extensions.NetworkPolicySpec.Builder>
    • setRepeatedField

      public V1beta1Extensions.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<V1beta1Extensions.NetworkPolicySpec.Builder>
    • addRepeatedField

      public V1beta1Extensions.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<V1beta1Extensions.NetworkPolicySpec.Builder>
    • mergeFrom

      public V1beta1Extensions.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<V1beta1Extensions.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<V1beta1Extensions.NetworkPolicySpec.Builder>
    • mergeFrom

      public V1beta1Extensions.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<V1beta1Extensions.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 V1beta1Extensions.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 V1beta1Extensions.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

       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

       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 V1beta1Extensions.NetworkPolicySpecOrBuilder
    • 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
       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.extensions.v1beta1.NetworkPolicyIngressRule ingress = 2;
      Specified by:
      getIngressList in interface V1beta1Extensions.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
       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.extensions.v1beta1.NetworkPolicyIngressRule ingress = 2;
      Specified by:
      getIngressCount in interface V1beta1Extensions.NetworkPolicySpecOrBuilder
    • getIngress

      public V1beta1Extensions.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
       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.extensions.v1beta1.NetworkPolicyIngressRule ingress = 2;
      Specified by:
      getIngress in interface V1beta1Extensions.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
       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.extensions.v1beta1.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
       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.extensions.v1beta1.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
       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.extensions.v1beta1.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
       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.extensions.v1beta1.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
       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.extensions.v1beta1.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
       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.extensions.v1beta1.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
       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.extensions.v1beta1.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
       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.extensions.v1beta1.NetworkPolicyIngressRule ingress = 2;
    • removeIngress

      public V1beta1Extensions.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
       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.extensions.v1beta1.NetworkPolicyIngressRule ingress = 2;
    • getIngressBuilder

      public V1beta1Extensions.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
       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.extensions.v1beta1.NetworkPolicyIngressRule ingress = 2;
    • getIngressOrBuilder

      public V1beta1Extensions.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
       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.extensions.v1beta1.NetworkPolicyIngressRule ingress = 2;
      Specified by:
      getIngressOrBuilder in interface V1beta1Extensions.NetworkPolicySpecOrBuilder
    • getIngressOrBuilderList

      public List<? extends V1beta1Extensions.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
       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.extensions.v1beta1.NetworkPolicyIngressRule ingress = 2;
      Specified by:
      getIngressOrBuilderList in interface V1beta1Extensions.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
       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.extensions.v1beta1.NetworkPolicyIngressRule ingress = 2;
    • addIngressBuilder

      public V1beta1Extensions.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
       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.extensions.v1beta1.NetworkPolicyIngressRule ingress = 2;
    • 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
       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.extensions.v1beta1.NetworkPolicyIngressRule ingress = 2;
    • 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.extensions.v1beta1.NetworkPolicyEgressRule egress = 3;
      Specified by:
      getEgressList in interface V1beta1Extensions.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.extensions.v1beta1.NetworkPolicyEgressRule egress = 3;
      Specified by:
      getEgressCount in interface V1beta1Extensions.NetworkPolicySpecOrBuilder
    • getEgress

      public V1beta1Extensions.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.extensions.v1beta1.NetworkPolicyEgressRule egress = 3;
      Specified by:
      getEgress in interface V1beta1Extensions.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.extensions.v1beta1.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.extensions.v1beta1.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.extensions.v1beta1.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.extensions.v1beta1.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.extensions.v1beta1.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.extensions.v1beta1.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.extensions.v1beta1.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.extensions.v1beta1.NetworkPolicyEgressRule egress = 3;
    • removeEgress

      public V1beta1Extensions.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.extensions.v1beta1.NetworkPolicyEgressRule egress = 3;
    • getEgressBuilder

      public V1beta1Extensions.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.extensions.v1beta1.NetworkPolicyEgressRule egress = 3;
    • getEgressOrBuilder

      public V1beta1Extensions.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.extensions.v1beta1.NetworkPolicyEgressRule egress = 3;
      Specified by:
      getEgressOrBuilder in interface V1beta1Extensions.NetworkPolicySpecOrBuilder
    • getEgressOrBuilderList

      public List<? extends V1beta1Extensions.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.extensions.v1beta1.NetworkPolicyEgressRule egress = 3;
      Specified by:
      getEgressOrBuilderList in interface V1beta1Extensions.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.extensions.v1beta1.NetworkPolicyEgressRule egress = 3;
    • addEgressBuilder

      public V1beta1Extensions.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.extensions.v1beta1.NetworkPolicyEgressRule egress = 3;
    • 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.extensions.v1beta1.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 V1beta1Extensions.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 V1beta1Extensions.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 V1beta1Extensions.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 V1beta1Extensions.NetworkPolicySpecOrBuilder
    • setPolicyTypes

      public V1beta1Extensions.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 V1beta1Extensions.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 V1beta1Extensions.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

       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 V1beta1Extensions.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 V1beta1Extensions.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<V1beta1Extensions.NetworkPolicySpec.Builder>
    • mergeUnknownFields

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