Package k8s.io.api.networking.v1
Class Generated.NetworkPolicyPort.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
- k8s.io.api.networking.v1.Generated.NetworkPolicyPort.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable,Generated.NetworkPolicyPortOrBuilder
- Enclosing class:
- Generated.NetworkPolicyPort
public static final class Generated.NetworkPolicyPort.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder> implements Generated.NetworkPolicyPortOrBuilder
NetworkPolicyPort describes a port to allow traffic on
Protobuf typek8s.io.api.networking.v1.NetworkPolicyPort
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Generated.NetworkPolicyPort.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Generated.NetworkPolicyPortbuild()Generated.NetworkPolicyPortbuildPartial()Generated.NetworkPolicyPort.Builderclear()Generated.NetworkPolicyPort.BuilderclearEndPort()endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy.Generated.NetworkPolicyPort.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)Generated.NetworkPolicyPort.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)Generated.NetworkPolicyPort.BuilderclearPort()port represents the port on the given protocol.Generated.NetworkPolicyPort.BuilderclearProtocol()protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.Generated.NetworkPolicyPort.Builderclone()Generated.NetworkPolicyPortgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()intgetEndPort()endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy.Generated.IntOrStringgetPort()port represents the port on the given protocol.Generated.IntOrString.BuildergetPortBuilder()port represents the port on the given protocol.Generated.IntOrStringOrBuildergetPortOrBuilder()port represents the port on the given protocol.StringgetProtocol()protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.com.google.protobuf.ByteStringgetProtocolBytes()protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.booleanhasEndPort()endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy.booleanhasPort()port represents the port on the given protocol.booleanhasProtocol()protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()Generated.NetworkPolicyPort.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Generated.NetworkPolicyPort.BuildermergeFrom(com.google.protobuf.Message other)Generated.NetworkPolicyPort.BuildermergeFrom(Generated.NetworkPolicyPort other)Generated.NetworkPolicyPort.BuildermergePort(Generated.IntOrString value)port represents the port on the given protocol.Generated.NetworkPolicyPort.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Generated.NetworkPolicyPort.BuildersetEndPort(int value)endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy.Generated.NetworkPolicyPort.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Generated.NetworkPolicyPort.BuildersetPort(Generated.IntOrString value)port represents the port on the given protocol.Generated.NetworkPolicyPort.BuildersetPort(Generated.IntOrString.Builder builderForValue)port represents the port on the given protocol.Generated.NetworkPolicyPort.BuildersetProtocol(String value)protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.Generated.NetworkPolicyPort.BuildersetProtocolBytes(com.google.protobuf.ByteString value)protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.Generated.NetworkPolicyPort.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)Generated.NetworkPolicyPort.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
clear
public Generated.NetworkPolicyPort.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
getDefaultInstanceForType
public Generated.NetworkPolicyPort getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public Generated.NetworkPolicyPort build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Generated.NetworkPolicyPort buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Generated.NetworkPolicyPort.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
setField
public Generated.NetworkPolicyPort.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
clearField
public Generated.NetworkPolicyPort.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
clearOneof
public Generated.NetworkPolicyPort.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
setRepeatedField
public Generated.NetworkPolicyPort.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
addRepeatedField
public Generated.NetworkPolicyPort.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
mergeFrom
public Generated.NetworkPolicyPort.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Generated.NetworkPolicyPort.Builder>
-
mergeFrom
public Generated.NetworkPolicyPort.Builder mergeFrom(Generated.NetworkPolicyPort other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
mergeFrom
public Generated.NetworkPolicyPort.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Generated.NetworkPolicyPort.Builder>- Throws:
IOException
-
hasProtocol
public boolean hasProtocol()
protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. +optional
optional string protocol = 1;- Specified by:
hasProtocolin interfaceGenerated.NetworkPolicyPortOrBuilder- Returns:
- Whether the protocol field is set.
-
getProtocol
public String getProtocol()
protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. +optional
optional string protocol = 1;- Specified by:
getProtocolin interfaceGenerated.NetworkPolicyPortOrBuilder- Returns:
- The protocol.
-
getProtocolBytes
public com.google.protobuf.ByteString getProtocolBytes()
protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. +optional
optional string protocol = 1;- Specified by:
getProtocolBytesin interfaceGenerated.NetworkPolicyPortOrBuilder- Returns:
- The bytes for protocol.
-
setProtocol
public Generated.NetworkPolicyPort.Builder setProtocol(String value)
protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. +optional
optional string protocol = 1;- Parameters:
value- The protocol to set.- Returns:
- This builder for chaining.
-
clearProtocol
public Generated.NetworkPolicyPort.Builder clearProtocol()
protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. +optional
optional string protocol = 1;- Returns:
- This builder for chaining.
-
setProtocolBytes
public Generated.NetworkPolicyPort.Builder setProtocolBytes(com.google.protobuf.ByteString value)
protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. +optional
optional string protocol = 1;- Parameters:
value- The bytes for protocol to set.- Returns:
- This builder for chaining.
-
hasPort
public boolean hasPort()
port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +optional
optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;- Specified by:
hasPortin interfaceGenerated.NetworkPolicyPortOrBuilder- Returns:
- Whether the port field is set.
-
getPort
public Generated.IntOrString getPort()
port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +optional
optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;- Specified by:
getPortin interfaceGenerated.NetworkPolicyPortOrBuilder- Returns:
- The port.
-
setPort
public Generated.NetworkPolicyPort.Builder setPort(Generated.IntOrString value)
port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +optional
optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
-
setPort
public Generated.NetworkPolicyPort.Builder setPort(Generated.IntOrString.Builder builderForValue)
port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +optional
optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
-
mergePort
public Generated.NetworkPolicyPort.Builder mergePort(Generated.IntOrString value)
port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +optional
optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
-
clearPort
public Generated.NetworkPolicyPort.Builder clearPort()
port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +optional
optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
-
getPortBuilder
public Generated.IntOrString.Builder getPortBuilder()
port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +optional
optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
-
getPortOrBuilder
public Generated.IntOrStringOrBuilder getPortOrBuilder()
port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. +optional
optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;- Specified by:
getPortOrBuilderin interfaceGenerated.NetworkPolicyPortOrBuilder
-
hasEndPort
public boolean hasEndPort()
endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. +optional
optional int32 endPort = 3;- Specified by:
hasEndPortin interfaceGenerated.NetworkPolicyPortOrBuilder- Returns:
- Whether the endPort field is set.
-
getEndPort
public int getEndPort()
endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. +optional
optional int32 endPort = 3;- Specified by:
getEndPortin interfaceGenerated.NetworkPolicyPortOrBuilder- Returns:
- The endPort.
-
setEndPort
public Generated.NetworkPolicyPort.Builder setEndPort(int value)
endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. +optional
optional int32 endPort = 3;- Parameters:
value- The endPort to set.- Returns:
- This builder for chaining.
-
clearEndPort
public Generated.NetworkPolicyPort.Builder clearEndPort()
endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. +optional
optional int32 endPort = 3;- Returns:
- This builder for chaining.
-
setUnknownFields
public final Generated.NetworkPolicyPort.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
mergeUnknownFields
public final Generated.NetworkPolicyPort.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Generated.NetworkPolicyPort.Builder>
-
-