Class HostsEntry.Builder (0.12.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
TypeDescription
Descriptor

Methods

addAllHostNames(Iterable<String> values)

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

List of host names / aliases.

repeated string host_names = 2;

Parameter
NameDescription
valuesIterable<String>

The hostNames to add.

Returns
TypeDescription
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
NameDescription
valueString

The hostNames to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the hostNames to add.

Returns
TypeDescription
HostsEntry.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public HostsEntry build()
Returns
TypeDescription
HostsEntry

buildPartial()

public HostsEntry buildPartial()
Returns
TypeDescription
HostsEntry

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearHostNames()

public HostsEntry.Builder clearHostNames()

List of host names / aliases.

repeated string host_names = 2;

Returns
TypeDescription
HostsEntry.Builder

This builder for chaining.

clearIp()

public HostsEntry.Builder clearIp()

IP (raw, IPv4/6 agnostic).

string ip = 1;

Returns
TypeDescription
HostsEntry.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

public HostsEntry getDefaultInstanceForType()
Returns
TypeDescription
HostsEntry

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getHostNames(int index)

public String getHostNames(int index)

List of host names / aliases.

repeated string host_names = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
int

The count of hostNames.

getHostNamesList()

public ProtocolStringList getHostNamesList()

List of host names / aliases.

repeated string host_names = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the hostNames.

getIp()

public String getIp()

IP (raw, IPv4/6 agnostic).

string ip = 1;

Returns
TypeDescription
String

The ip.

getIpBytes()

public ByteString getIpBytes()

IP (raw, IPv4/6 agnostic).

string ip = 1;

Returns
TypeDescription
ByteString

The bytes for ip.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(HostsEntry other)

public HostsEntry.Builder mergeFrom(HostsEntry other)
Parameter
NameDescription
otherHostsEntry
Returns
TypeDescription
HostsEntry.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public HostsEntry.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The hostNames to set.

Returns
TypeDescription
HostsEntry.Builder

This builder for chaining.

setIp(String value)

public HostsEntry.Builder setIp(String value)

IP (raw, IPv4/6 agnostic).

string ip = 1;

Parameter
NameDescription
valueString

The ip to set.

Returns
TypeDescription
HostsEntry.Builder

This builder for chaining.

setIpBytes(ByteString value)

public HostsEntry.Builder setIpBytes(ByteString value)

IP (raw, IPv4/6 agnostic).

string ip = 1;

Parameter
NameDescription
valueByteString

The bytes for ip to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
HostsEntry.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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