Class V1beta1Extensions.NetworkPolicySpec

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

public static final class V1beta1Extensions.NetworkPolicySpec extends com.google.protobuf.GeneratedMessageV3 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
See Also:
  • Field Details

  • Method Details

    • getUnknownFields

      public final com.google.protobuf.UnknownFieldSet getUnknownFields()
      Specified by:
      getUnknownFields in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getUnknownFields in class com.google.protobuf.GeneratedMessageV3
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • 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
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static V1beta1Extensions.NetworkPolicySpec parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Extensions.NetworkPolicySpec parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Extensions.NetworkPolicySpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Extensions.NetworkPolicySpec parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Extensions.NetworkPolicySpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Extensions.NetworkPolicySpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Extensions.NetworkPolicySpec parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static V1beta1Extensions.NetworkPolicySpec parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static V1beta1Extensions.NetworkPolicySpec parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static V1beta1Extensions.NetworkPolicySpec parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static V1beta1Extensions.NetworkPolicySpec parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static V1beta1Extensions.NetworkPolicySpec parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public V1beta1Extensions.NetworkPolicySpec.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static V1beta1Extensions.NetworkPolicySpec.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected V1beta1Extensions.NetworkPolicySpec.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static V1beta1Extensions.NetworkPolicySpec getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<V1beta1Extensions.NetworkPolicySpec> parser()
    • getParserForType

      public com.google.protobuf.Parser<V1beta1Extensions.NetworkPolicySpec> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

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