Class V1Networking.NetworkPolicyEgressRule.Builder

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

public static final class V1Networking.NetworkPolicyEgressRule.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<V1Networking.NetworkPolicyEgressRule.Builder> implements V1Networking.NetworkPolicyEgressRuleOrBuilder
 NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods
 matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to.
 This type is beta-level in 1.8
 
Protobuf type k8s.io.api.networking.v1.NetworkPolicyEgressRule
  • 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.NetworkPolicyEgressRule.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.NetworkPolicyEgressRule.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.NetworkPolicyEgressRule.Builder>
    • getDefaultInstanceForType

      public V1Networking.NetworkPolicyEgressRule 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.NetworkPolicyEgressRule 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.NetworkPolicyEgressRule.Builder>
    • setField

      public V1Networking.NetworkPolicyEgressRule.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.NetworkPolicyEgressRule.Builder>
    • clearField

      public V1Networking.NetworkPolicyEgressRule.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.NetworkPolicyEgressRule.Builder>
    • clearOneof

      public V1Networking.NetworkPolicyEgressRule.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.NetworkPolicyEgressRule.Builder>
    • setRepeatedField

      public V1Networking.NetworkPolicyEgressRule.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.NetworkPolicyEgressRule.Builder>
    • addRepeatedField

      public V1Networking.NetworkPolicyEgressRule.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.NetworkPolicyEgressRule.Builder>
    • mergeFrom

      public V1Networking.NetworkPolicyEgressRule.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.NetworkPolicyEgressRule.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.NetworkPolicyEgressRule.Builder>
    • mergeFrom

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

      public List<V1Networking.NetworkPolicyPort> getPortsList()
       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      Specified by:
      getPortsList in interface V1Networking.NetworkPolicyEgressRuleOrBuilder
    • getPortsCount

      public int getPortsCount()
       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      Specified by:
      getPortsCount in interface V1Networking.NetworkPolicyEgressRuleOrBuilder
    • getPorts

      public V1Networking.NetworkPolicyPort getPorts(int index)
       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      Specified by:
      getPorts in interface V1Networking.NetworkPolicyEgressRuleOrBuilder
    • setPorts

       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • setPorts

       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • addPorts

       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • addPorts

       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • addPorts

       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • addPorts

       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • addAllPorts

       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • clearPorts

       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • removePorts

      public V1Networking.NetworkPolicyEgressRule.Builder removePorts(int index)
       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • getPortsBuilder

      public V1Networking.NetworkPolicyPort.Builder getPortsBuilder(int index)
       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • getPortsOrBuilder

      public V1Networking.NetworkPolicyPortOrBuilder getPortsOrBuilder(int index)
       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      Specified by:
      getPortsOrBuilder in interface V1Networking.NetworkPolicyEgressRuleOrBuilder
    • getPortsOrBuilderList

      public List<? extends V1Networking.NetworkPolicyPortOrBuilder> getPortsOrBuilderList()
       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      Specified by:
      getPortsOrBuilderList in interface V1Networking.NetworkPolicyEgressRuleOrBuilder
    • addPortsBuilder

      public V1Networking.NetworkPolicyPort.Builder addPortsBuilder()
       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • addPortsBuilder

      public V1Networking.NetworkPolicyPort.Builder addPortsBuilder(int index)
       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • getPortsBuilderList

      public List<V1Networking.NetworkPolicyPort.Builder> getPortsBuilderList()
       List of destination ports for outgoing traffic.
       Each item in this list is combined using a logical OR. If this field is
       empty or missing, this rule matches all ports (traffic not restricted by port).
       If this field is present and contains at least one item, then this rule allows
       traffic only if the traffic matches at least one port in the list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
    • getToList

      public List<V1Networking.NetworkPolicyPeer> getToList()
       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      Specified by:
      getToList in interface V1Networking.NetworkPolicyEgressRuleOrBuilder
    • getToCount

      public int getToCount()
       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      Specified by:
      getToCount in interface V1Networking.NetworkPolicyEgressRuleOrBuilder
    • getTo

      public V1Networking.NetworkPolicyPeer getTo(int index)
       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      Specified by:
      getTo in interface V1Networking.NetworkPolicyEgressRuleOrBuilder
    • setTo

       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • setTo

       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • addTo

       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • addTo

       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • addTo

       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • addTo

       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • addAllTo

       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • clearTo

       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • removeTo

      public V1Networking.NetworkPolicyEgressRule.Builder removeTo(int index)
       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • getToBuilder

      public V1Networking.NetworkPolicyPeer.Builder getToBuilder(int index)
       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • getToOrBuilder

      public V1Networking.NetworkPolicyPeerOrBuilder getToOrBuilder(int index)
       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      Specified by:
      getToOrBuilder in interface V1Networking.NetworkPolicyEgressRuleOrBuilder
    • getToOrBuilderList

      public List<? extends V1Networking.NetworkPolicyPeerOrBuilder> getToOrBuilderList()
       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      Specified by:
      getToOrBuilderList in interface V1Networking.NetworkPolicyEgressRuleOrBuilder
    • addToBuilder

       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • addToBuilder

      public V1Networking.NetworkPolicyPeer.Builder addToBuilder(int index)
       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • getToBuilderList

      public List<V1Networking.NetworkPolicyPeer.Builder> getToBuilderList()
       List of destinations for outgoing traffic of pods selected for this rule.
       Items in this list are combined using a logical OR operation. If this field is
       empty or missing, this rule matches all destinations (traffic not restricted by
       destination). If this field is present and contains at least one item, this rule
       allows traffic only if the traffic matches at least one item in the to list.
       +optional
       
      repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
    • setUnknownFields

      public final V1Networking.NetworkPolicyEgressRule.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.NetworkPolicyEgressRule.Builder>
    • mergeUnknownFields

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