Class NamedPort.Builder (1.41.0)

public static final class NamedPort.Builder extends GeneratedMessageV3.Builder<NamedPort.Builder> implements NamedPortOrBuilder

The named port. For example: <"http", 80>.

Protobuf type google.cloud.compute.v1.NamedPort

Implements

NamedPortOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public NamedPort.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
NamedPort.Builder
Overrides

build()

public NamedPort build()
Returns
TypeDescription
NamedPort

buildPartial()

public NamedPort buildPartial()
Returns
TypeDescription
NamedPort

clear()

public NamedPort.Builder clear()
Returns
TypeDescription
NamedPort.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public NamedPort.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
NamedPort.Builder
Overrides

clearName()

public NamedPort.Builder clearName()

The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.

optional string name = 3373707;

Returns
TypeDescription
NamedPort.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public NamedPort.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
NamedPort.Builder
Overrides

clearPort()

public NamedPort.Builder clearPort()

The port number, which can be a value between 1 and 65535.

optional int32 port = 3446913;

Returns
TypeDescription
NamedPort.Builder

This builder for chaining.

clone()

public NamedPort.Builder clone()
Returns
TypeDescription
NamedPort.Builder
Overrides

getDefaultInstanceForType()

public NamedPort getDefaultInstanceForType()
Returns
TypeDescription
NamedPort

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getName()

public String getName()

The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.

optional string name = 3373707;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.

optional string name = 3373707;

Returns
TypeDescription
ByteString

The bytes for name.

getPort()

public int getPort()

The port number, which can be a value between 1 and 65535.

optional int32 port = 3446913;

Returns
TypeDescription
int

The port.

hasName()

public boolean hasName()

The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.

optional string name = 3373707;

Returns
TypeDescription
boolean

Whether the name field is set.

hasPort()

public boolean hasPort()

The port number, which can be a value between 1 and 65535.

optional int32 port = 3446913;

Returns
TypeDescription
boolean

Whether the port field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(NamedPort other)

public NamedPort.Builder mergeFrom(NamedPort other)
Parameter
NameDescription
otherNamedPort
Returns
TypeDescription
NamedPort.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public NamedPort.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NamedPort.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public NamedPort.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
NamedPort.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final NamedPort.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
NamedPort.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public NamedPort.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
NamedPort.Builder
Overrides

setName(String value)

public NamedPort.Builder setName(String value)

The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.

optional string name = 3373707;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
NamedPort.Builder

This builder for chaining.

setNameBytes(ByteString value)

public NamedPort.Builder setNameBytes(ByteString value)

The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.

optional string name = 3373707;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
NamedPort.Builder

This builder for chaining.

setPort(int value)

public NamedPort.Builder setPort(int value)

The port number, which can be a value between 1 and 65535.

optional int32 port = 3446913;

Parameter
NameDescription
valueint

The port to set.

Returns
TypeDescription
NamedPort.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public NamedPort.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
NamedPort.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final NamedPort.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
NamedPort.Builder
Overrides