Class HostAddress.Builder (1.82.0)

public static final class HostAddress.Builder extends GeneratedMessage.Builder<HostAddress.Builder> implements HostAddressOrBuilder

A HostAddress represents a transport end point, which is the combination of an IP address or hostname and a port number.

Protobuf type google.cloud.datastream.v1.HostAddress

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public HostAddress build()
Returns
Type Description
HostAddress

buildPartial()

public HostAddress buildPartial()
Returns
Type Description
HostAddress

clear()

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

clearHostname()

public HostAddress.Builder clearHostname()

Required. Hostname for the connection.

string hostname = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
HostAddress.Builder

This builder for chaining.

clearPort()

public HostAddress.Builder clearPort()

Optional. Port for the connection.

int32 port = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
HostAddress.Builder

This builder for chaining.

getDefaultInstanceForType()

public HostAddress getDefaultInstanceForType()
Returns
Type Description
HostAddress

getDescriptorForType()

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

getHostname()

public String getHostname()

Required. Hostname for the connection.

string hostname = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The hostname.

getHostnameBytes()

public ByteString getHostnameBytes()

Required. Hostname for the connection.

string hostname = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for hostname.

getPort()

public int getPort()

Optional. Port for the connection.

int32 port = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The port.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(HostAddress other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public HostAddress.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
HostAddress.Builder
Overrides

setHostname(String value)

public HostAddress.Builder setHostname(String value)

Required. Hostname for the connection.

string hostname = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The hostname to set.

Returns
Type Description
HostAddress.Builder

This builder for chaining.

setHostnameBytes(ByteString value)

public HostAddress.Builder setHostnameBytes(ByteString value)

Required. Hostname for the connection.

string hostname = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for hostname to set.

Returns
Type Description
HostAddress.Builder

This builder for chaining.

setPort(int value)

public HostAddress.Builder setPort(int value)

Optional. Port for the connection.

int32 port = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The port to set.

Returns
Type Description
HostAddress.Builder

This builder for chaining.