Class HostsEntry.Builder (0.24.0)

public static final class HostsEntry.Builder extends GeneratedMessageV3.Builder<HostsEntry.Builder> implements HostsEntryOrBuilder

Single /etc/hosts entry.

Protobuf type google.cloud.migrationcenter.v1.HostsEntry

Implements

HostsEntryOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllHostNames(Iterable<String> values)

public HostsEntry.Builder addAllHostNames(Iterable<String> values)

List of host names / aliases.

repeated string host_names = 2;

Parameter
Name Description
values Iterable<String>

The hostNames to add.

Returns
Type Description
HostsEntry.Builder

This builder for chaining.

addHostNames(String value)

public HostsEntry.Builder addHostNames(String value)

List of host names / aliases.

repeated string host_names = 2;

Parameter
Name Description
value String

The hostNames to add.

Returns
Type Description
HostsEntry.Builder

This builder for chaining.

addHostNamesBytes(ByteString value)

public HostsEntry.Builder addHostNamesBytes(ByteString value)

List of host names / aliases.

repeated string host_names = 2;

Parameter
Name Description
value ByteString

The bytes of the hostNames to add.

Returns
Type Description
HostsEntry.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public HostsEntry.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HostsEntry.Builder
Overrides

build()

public HostsEntry build()
Returns
Type Description
HostsEntry

buildPartial()

public HostsEntry buildPartial()
Returns
Type Description
HostsEntry

clear()

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

clearField(Descriptors.FieldDescriptor field)

public HostsEntry.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
HostsEntry.Builder
Overrides

clearHostNames()

public HostsEntry.Builder clearHostNames()

List of host names / aliases.

repeated string host_names = 2;

Returns
Type Description
HostsEntry.Builder

This builder for chaining.

clearIp()

public HostsEntry.Builder clearIp()

IP (raw, IPv4/6 agnostic).

string ip = 1;

Returns
Type Description
HostsEntry.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public HostsEntry.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
HostsEntry.Builder
Overrides

clone()

public HostsEntry.Builder clone()
Returns
Type Description
HostsEntry.Builder
Overrides

getDefaultInstanceForType()

public HostsEntry getDefaultInstanceForType()
Returns
Type Description
HostsEntry

getDescriptorForType()

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

getHostNames(int index)

public String getHostNames(int index)

List of host names / aliases.

repeated string host_names = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The hostNames at the given index.

getHostNamesBytes(int index)

public ByteString getHostNamesBytes(int index)

List of host names / aliases.

repeated string host_names = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the hostNames at the given index.

getHostNamesCount()

public int getHostNamesCount()

List of host names / aliases.

repeated string host_names = 2;

Returns
Type Description
int

The count of hostNames.

getHostNamesList()

public ProtocolStringList getHostNamesList()

List of host names / aliases.

repeated string host_names = 2;

Returns
Type Description
ProtocolStringList

A list containing the hostNames.

getIp()

public String getIp()

IP (raw, IPv4/6 agnostic).

string ip = 1;

Returns
Type Description
String

The ip.

getIpBytes()

public ByteString getIpBytes()

IP (raw, IPv4/6 agnostic).

string ip = 1;

Returns
Type Description
ByteString

The bytes for ip.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(HostsEntry other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final HostsEntry.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HostsEntry.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public HostsEntry.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HostsEntry.Builder
Overrides

setHostNames(int index, String value)

public HostsEntry.Builder setHostNames(int index, String value)

List of host names / aliases.

repeated string host_names = 2;

Parameters
Name Description
index int

The index to set the value at.

value String

The hostNames to set.

Returns
Type Description
HostsEntry.Builder

This builder for chaining.

setIp(String value)

public HostsEntry.Builder setIp(String value)

IP (raw, IPv4/6 agnostic).

string ip = 1;

Parameter
Name Description
value String

The ip to set.

Returns
Type Description
HostsEntry.Builder

This builder for chaining.

setIpBytes(ByteString value)

public HostsEntry.Builder setIpBytes(ByteString value)

IP (raw, IPv4/6 agnostic).

string ip = 1;

Parameter
Name Description
value ByteString

The bytes for ip to set.

Returns
Type Description
HostsEntry.Builder

This builder for chaining.

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

public HostsEntry.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
HostsEntry.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final HostsEntry.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HostsEntry.Builder
Overrides