Class HostGroup.Builder (0.61.0)

public static final class HostGroup.Builder extends GeneratedMessageV3.Builder<HostGroup.Builder> implements HostGroupOrBuilder

Host group is a collection of hosts that can be used for accessing a Block Volume.

Protobuf type google.cloud.netapp.v1.HostGroup

Implements

HostGroupOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllHosts(Iterable<String> values)

public HostGroup.Builder addAllHosts(Iterable<String> values)

Required. The list of hosts associated with the host group.

repeated string hosts = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<String>

The hosts to add.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

addHosts(String value)

public HostGroup.Builder addHosts(String value)

Required. The list of hosts associated with the host group.

repeated string hosts = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The hosts to add.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

addHostsBytes(ByteString value)

public HostGroup.Builder addHostsBytes(ByteString value)

Required. The list of hosts associated with the host group.

repeated string hosts = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes of the hosts to add.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public HostGroup build()
Returns
Type Description
HostGroup

buildPartial()

public HostGroup buildPartial()
Returns
Type Description
HostGroup

clear()

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

clearCreateTime()

public HostGroup.Builder clearCreateTime()

Output only. Create time of the host group.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
HostGroup.Builder

clearDescription()

public HostGroup.Builder clearDescription()

Optional. Description of the host group.

string description = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
HostGroup.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearHosts()

public HostGroup.Builder clearHosts()

Required. The list of hosts associated with the host group.

repeated string hosts = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
HostGroup.Builder

This builder for chaining.

clearLabels()

public HostGroup.Builder clearLabels()
Returns
Type Description
HostGroup.Builder

clearName()

public HostGroup.Builder clearName()

Identifier. The resource name of the host group. Format: projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
HostGroup.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOsType()

public HostGroup.Builder clearOsType()

Required. The OS type of the host group. It indicates the type of operating system used by all of the hosts in the HostGroup. All hosts in a HostGroup must be of the same OS type. This can be set only when creating a HostGroup.

.google.cloud.netapp.v1.OsType os_type = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
HostGroup.Builder

This builder for chaining.

clearState()

public HostGroup.Builder clearState()

Output only. State of the host group.

.google.cloud.netapp.v1.HostGroup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
HostGroup.Builder

This builder for chaining.

clearType()

public HostGroup.Builder clearType()

Required. Type of the host group.

.google.cloud.netapp.v1.HostGroup.Type type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
HostGroup.Builder

This builder for chaining.

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Optional. Labels of the host group.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getCreateTime()

public Timestamp getCreateTime()

Output only. Create time of the host group.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Create time of the host group.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Create time of the host group.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public HostGroup getDefaultInstanceForType()
Returns
Type Description
HostGroup

getDescription()

public String getDescription()

Optional. Description of the host group.

string description = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description of the host group.

string description = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getHosts(int index)

public String getHosts(int index)

Required. The list of hosts associated with the host group.

repeated string hosts = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The hosts at the given index.

getHostsBytes(int index)

public ByteString getHostsBytes(int index)

Required. The list of hosts associated with the host group.

repeated string hosts = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the hosts at the given index.

getHostsCount()

public int getHostsCount()

Required. The list of hosts associated with the host group.

repeated string hosts = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of hosts.

getHostsList()

public ProtocolStringList getHostsList()

Required. The list of hosts associated with the host group.

repeated string hosts = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProtocolStringList

A list containing the hosts.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. Labels of the host group.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. Labels of the host group.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. Labels of the host group.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. Labels of the host group.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Identifier. The resource name of the host group. Format: projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the host group. Format: projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getOsType()

public OsType getOsType()

Required. The OS type of the host group. It indicates the type of operating system used by all of the hosts in the HostGroup. All hosts in a HostGroup must be of the same OS type. This can be set only when creating a HostGroup.

.google.cloud.netapp.v1.OsType os_type = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
OsType

The osType.

getOsTypeValue()

public int getOsTypeValue()

Required. The OS type of the host group. It indicates the type of operating system used by all of the hosts in the HostGroup. All hosts in a HostGroup must be of the same OS type. This can be set only when creating a HostGroup.

.google.cloud.netapp.v1.OsType os_type = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for osType.

getState()

public HostGroup.State getState()

Output only. State of the host group.

.google.cloud.netapp.v1.HostGroup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
HostGroup.State

The state.

getStateValue()

public int getStateValue()

Output only. State of the host group.

.google.cloud.netapp.v1.HostGroup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getType()

public HostGroup.Type getType()

Required. Type of the host group.

.google.cloud.netapp.v1.HostGroup.Type type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
HostGroup.Type

The type.

getTypeValue()

public int getTypeValue()

Required. Type of the host group.

.google.cloud.netapp.v1.HostGroup.Type type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for type.

hasCreateTime()

public boolean hasCreateTime()

Output only. Create time of the host group.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public HostGroup.Builder mergeCreateTime(Timestamp value)

Output only. Create time of the host group.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
HostGroup.Builder

mergeFrom(HostGroup other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

public HostGroup.Builder putAllLabels(Map<String,String> values)

Optional. Labels of the host group.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
HostGroup.Builder

putLabels(String key, String value)

public HostGroup.Builder putLabels(String key, String value)

Optional. Labels of the host group.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
HostGroup.Builder

removeLabels(String key)

public HostGroup.Builder removeLabels(String key)

Optional. Labels of the host group.

map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
HostGroup.Builder

setCreateTime(Timestamp value)

public HostGroup.Builder setCreateTime(Timestamp value)

Output only. Create time of the host group.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
HostGroup.Builder

setCreateTime(Timestamp.Builder builderForValue)

public HostGroup.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Create time of the host group.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
HostGroup.Builder

setDescription(String value)

public HostGroup.Builder setDescription(String value)

Optional. Description of the host group.

string description = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public HostGroup.Builder setDescriptionBytes(ByteString value)

Optional. Description of the host group.

string description = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setHosts(int index, String value)

public HostGroup.Builder setHosts(int index, String value)

Required. The list of hosts associated with the host group.

repeated string hosts = 5 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value String

The hosts to set.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

setName(String value)

public HostGroup.Builder setName(String value)

Identifier. The resource name of the host group. Format: projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

setNameBytes(ByteString value)

public HostGroup.Builder setNameBytes(ByteString value)

Identifier. The resource name of the host group. Format: projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

setOsType(OsType value)

public HostGroup.Builder setOsType(OsType value)

Required. The OS type of the host group. It indicates the type of operating system used by all of the hosts in the HostGroup. All hosts in a HostGroup must be of the same OS type. This can be set only when creating a HostGroup.

.google.cloud.netapp.v1.OsType os_type = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value OsType

The osType to set.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

setOsTypeValue(int value)

public HostGroup.Builder setOsTypeValue(int value)

Required. The OS type of the host group. It indicates the type of operating system used by all of the hosts in the HostGroup. All hosts in a HostGroup must be of the same OS type. This can be set only when creating a HostGroup.

.google.cloud.netapp.v1.OsType os_type = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for osType to set.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

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

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

setState(HostGroup.State value)

public HostGroup.Builder setState(HostGroup.State value)

Output only. State of the host group.

.google.cloud.netapp.v1.HostGroup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value HostGroup.State

The state to set.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

setStateValue(int value)

public HostGroup.Builder setStateValue(int value)

Output only. State of the host group.

.google.cloud.netapp.v1.HostGroup.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

setType(HostGroup.Type value)

public HostGroup.Builder setType(HostGroup.Type value)

Required. Type of the host group.

.google.cloud.netapp.v1.HostGroup.Type type = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value HostGroup.Type

The type to set.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

setTypeValue(int value)

public HostGroup.Builder setTypeValue(int value)

Required. Type of the host group.

.google.cloud.netapp.v1.HostGroup.Type type = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for type to set.

Returns
Type Description
HostGroup.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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