Class NamedPort.Builder (1.93.0)

public static final class NamedPort.Builder extends GeneratedMessage.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
Type Description
Descriptor

Methods

build()

public NamedPort build()
Returns
Type Description
NamedPort

buildPartial()

public NamedPort buildPartial()
Returns
Type Description
NamedPort

clear()

public NamedPort.Builder clear()
Returns
Type Description
NamedPort.Builder
Overrides

clearName()

public NamedPort.Builder clearName()

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

optional string name = 3373707;

Returns
Type Description
NamedPort.Builder

This builder for chaining.

clearPort()

public NamedPort.Builder clearPort()

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

optional int32 port = 3446913;

Returns
Type Description
NamedPort.Builder

This builder for chaining.

getDefaultInstanceForType()

public NamedPort getDefaultInstanceForType()
Returns
Type Description
NamedPort

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getName()

public String getName()

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

optional string name = 3373707;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

optional string name = 3373707;

Returns
Type Description
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
Type Description
int

The port.

hasName()

public boolean hasName()

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

optional string name = 3373707;

Returns
Type Description
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
Type Description
boolean

Whether the port field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(NamedPort other)

public NamedPort.Builder mergeFrom(NamedPort other)
Parameter
Name Description
other NamedPort
Returns
Type Description
NamedPort.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public NamedPort.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NamedPort.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public NamedPort.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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 withRFC1035.

optional string name = 3373707;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
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 withRFC1035.

optional string name = 3373707;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
value int

The port to set.

Returns
Type Description
NamedPort.Builder

This builder for chaining.