Class Generated.NetworkPolicyEgressRule.Builder

    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Generated.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<Generated.NetworkPolicyEgressRule.Builder>
      • getDefaultInstanceForType

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

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

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

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

        public List<Generated.NetworkPolicyPort> getPortsList()
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
        Specified by:
        getPortsList in interface Generated.NetworkPolicyEgressRuleOrBuilder
      • getPortsCount

        public int getPortsCount()
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
        Specified by:
        getPortsCount in interface Generated.NetworkPolicyEgressRuleOrBuilder
      • getPorts

        public Generated.NetworkPolicyPort getPorts​(int index)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
        Specified by:
        getPorts in interface Generated.NetworkPolicyEgressRuleOrBuilder
      • setPorts

        public Generated.NetworkPolicyEgressRule.Builder setPorts​(int index,
                                                                  Generated.NetworkPolicyPort value)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • setPorts

        public Generated.NetworkPolicyEgressRule.Builder setPorts​(int index,
                                                                  Generated.NetworkPolicyPort.Builder builderForValue)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • addPorts

        public Generated.NetworkPolicyEgressRule.Builder addPorts​(Generated.NetworkPolicyPort value)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • addPorts

        public Generated.NetworkPolicyEgressRule.Builder addPorts​(int index,
                                                                  Generated.NetworkPolicyPort value)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • addPorts

        public Generated.NetworkPolicyEgressRule.Builder addPorts​(Generated.NetworkPolicyPort.Builder builderForValue)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • addPorts

        public Generated.NetworkPolicyEgressRule.Builder addPorts​(int index,
                                                                  Generated.NetworkPolicyPort.Builder builderForValue)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • addAllPorts

        public Generated.NetworkPolicyEgressRule.Builder addAllPorts​(Iterable<? extends Generated.NetworkPolicyPort> values)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • clearPorts

        public Generated.NetworkPolicyEgressRule.Builder clearPorts()
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • removePorts

        public Generated.NetworkPolicyEgressRule.Builder removePorts​(int index)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • getPortsBuilder

        public Generated.NetworkPolicyPort.Builder getPortsBuilder​(int index)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • getPortsOrBuilder

        public Generated.NetworkPolicyPortOrBuilder getPortsOrBuilder​(int index)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
        Specified by:
        getPortsOrBuilder in interface Generated.NetworkPolicyEgressRuleOrBuilder
      • getPortsOrBuilderList

        public List<? extends Generated.NetworkPolicyPortOrBuilder> getPortsOrBuilderList()
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
        Specified by:
        getPortsOrBuilderList in interface Generated.NetworkPolicyEgressRuleOrBuilder
      • addPortsBuilder

        public Generated.NetworkPolicyPort.Builder addPortsBuilder()
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • addPortsBuilder

        public Generated.NetworkPolicyPort.Builder addPortsBuilder​(int index)
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • getPortsBuilderList

        public List<Generated.NetworkPolicyPort.Builder> getPortsBuilderList()
         ports is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPort ports = 1;
      • getToList

        public List<Generated.NetworkPolicyPeer> getToList()
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
        Specified by:
        getToList in interface Generated.NetworkPolicyEgressRuleOrBuilder
      • getToCount

        public int getToCount()
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
        Specified by:
        getToCount in interface Generated.NetworkPolicyEgressRuleOrBuilder
      • getTo

        public Generated.NetworkPolicyPeer getTo​(int index)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
        Specified by:
        getTo in interface Generated.NetworkPolicyEgressRuleOrBuilder
      • setTo

        public Generated.NetworkPolicyEgressRule.Builder setTo​(int index,
                                                               Generated.NetworkPolicyPeer value)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • setTo

        public Generated.NetworkPolicyEgressRule.Builder setTo​(int index,
                                                               Generated.NetworkPolicyPeer.Builder builderForValue)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • addTo

        public Generated.NetworkPolicyEgressRule.Builder addTo​(Generated.NetworkPolicyPeer value)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • addTo

        public Generated.NetworkPolicyEgressRule.Builder addTo​(int index,
                                                               Generated.NetworkPolicyPeer value)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • addTo

        public Generated.NetworkPolicyEgressRule.Builder addTo​(Generated.NetworkPolicyPeer.Builder builderForValue)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • addTo

        public Generated.NetworkPolicyEgressRule.Builder addTo​(int index,
                                                               Generated.NetworkPolicyPeer.Builder builderForValue)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • addAllTo

        public Generated.NetworkPolicyEgressRule.Builder addAllTo​(Iterable<? extends Generated.NetworkPolicyPeer> values)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • clearTo

        public Generated.NetworkPolicyEgressRule.Builder clearTo()
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • removeTo

        public Generated.NetworkPolicyEgressRule.Builder removeTo​(int index)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • getToBuilder

        public Generated.NetworkPolicyPeer.Builder getToBuilder​(int index)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • getToOrBuilder

        public Generated.NetworkPolicyPeerOrBuilder getToOrBuilder​(int index)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
        Specified by:
        getToOrBuilder in interface Generated.NetworkPolicyEgressRuleOrBuilder
      • getToOrBuilderList

        public List<? extends Generated.NetworkPolicyPeerOrBuilder> getToOrBuilderList()
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
        Specified by:
        getToOrBuilderList in interface Generated.NetworkPolicyEgressRuleOrBuilder
      • addToBuilder

        public Generated.NetworkPolicyPeer.Builder addToBuilder()
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • addToBuilder

        public Generated.NetworkPolicyPeer.Builder addToBuilder​(int index)
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;
      • getToBuilderList

        public List<Generated.NetworkPolicyPeer.Builder> getToBuilderList()
         to is a 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
         +listType=atomic
         
        repeated .k8s.io.api.networking.v1.NetworkPolicyPeer to = 2;