Class AllocationPolicy.InstanceFlexibilityPolicy.Builder (0.95.0)

public static final class AllocationPolicy.InstanceFlexibilityPolicy.Builder extends GeneratedMessage.Builder<AllocationPolicy.InstanceFlexibilityPolicy.Builder> implements AllocationPolicy.InstanceFlexibilityPolicyOrBuilder

Allows creating VMs from multiple types of machines. Instance flexibility configuration overrides instances configuration.

Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.InstanceFlexibilityPolicy

Static Methods

getDescriptor()

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

Methods

build()

public AllocationPolicy.InstanceFlexibilityPolicy build()
Returns
Type Description
AllocationPolicy.InstanceFlexibilityPolicy

buildPartial()

public AllocationPolicy.InstanceFlexibilityPolicy buildPartial()
Returns
Type Description
AllocationPolicy.InstanceFlexibilityPolicy

clear()

public AllocationPolicy.InstanceFlexibilityPolicy.Builder clear()
Returns
Type Description
AllocationPolicy.InstanceFlexibilityPolicy.Builder
Overrides

clearInstanceSelections()

public AllocationPolicy.InstanceFlexibilityPolicy.Builder clearInstanceSelections()
Returns
Type Description
AllocationPolicy.InstanceFlexibilityPolicy.Builder

containsInstanceSelections(String key)

public boolean containsInstanceSelections(String key)

Required. Named instance selections configuring properties that the group will use when creating new VMs. The map key is a user-specified name for the instance selection. The key must be 1-63 characters long, and comply with RFC1035. Specifically, the key must consist of lowercase letters, numbers, and hyphens. The first character must be a lowercase letter, and the last character must be a lowercase letter or number. The maximum number of instance selections is 50. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

map<string, .google.cloud.batch.v1alpha.AllocationPolicy.InstanceSelection> instance_selections = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public AllocationPolicy.InstanceFlexibilityPolicy getDefaultInstanceForType()
Returns
Type Description
AllocationPolicy.InstanceFlexibilityPolicy

getDescriptorForType()

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

getInstanceSelections() (deprecated)

public Map<String,AllocationPolicy.InstanceSelection> getInstanceSelections()
Returns
Type Description
Map<String,InstanceSelection>

getInstanceSelectionsCount()

public int getInstanceSelectionsCount()

Required. Named instance selections configuring properties that the group will use when creating new VMs. The map key is a user-specified name for the instance selection. The key must be 1-63 characters long, and comply with RFC1035. Specifically, the key must consist of lowercase letters, numbers, and hyphens. The first character must be a lowercase letter, and the last character must be a lowercase letter or number. The maximum number of instance selections is 50. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

map<string, .google.cloud.batch.v1alpha.AllocationPolicy.InstanceSelection> instance_selections = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getInstanceSelectionsMap()

public Map<String,AllocationPolicy.InstanceSelection> getInstanceSelectionsMap()

Required. Named instance selections configuring properties that the group will use when creating new VMs. The map key is a user-specified name for the instance selection. The key must be 1-63 characters long, and comply with RFC1035. Specifically, the key must consist of lowercase letters, numbers, and hyphens. The first character must be a lowercase letter, and the last character must be a lowercase letter or number. The maximum number of instance selections is 50. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

map<string, .google.cloud.batch.v1alpha.AllocationPolicy.InstanceSelection> instance_selections = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Map<String,InstanceSelection>

getInstanceSelectionsOrDefault(String key, AllocationPolicy.InstanceSelection defaultValue)

public AllocationPolicy.InstanceSelection getInstanceSelectionsOrDefault(String key, AllocationPolicy.InstanceSelection defaultValue)

Required. Named instance selections configuring properties that the group will use when creating new VMs. The map key is a user-specified name for the instance selection. The key must be 1-63 characters long, and comply with RFC1035. Specifically, the key must consist of lowercase letters, numbers, and hyphens. The first character must be a lowercase letter, and the last character must be a lowercase letter or number. The maximum number of instance selections is 50. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

map<string, .google.cloud.batch.v1alpha.AllocationPolicy.InstanceSelection> instance_selections = 1 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
key String
defaultValue AllocationPolicy.InstanceSelection
Returns
Type Description
AllocationPolicy.InstanceSelection

getInstanceSelectionsOrThrow(String key)

public AllocationPolicy.InstanceSelection getInstanceSelectionsOrThrow(String key)

Required. Named instance selections configuring properties that the group will use when creating new VMs. The map key is a user-specified name for the instance selection. The key must be 1-63 characters long, and comply with RFC1035. Specifically, the key must consist of lowercase letters, numbers, and hyphens. The first character must be a lowercase letter, and the last character must be a lowercase letter or number. The maximum number of instance selections is 50. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

map<string, .google.cloud.batch.v1alpha.AllocationPolicy.InstanceSelection> instance_selections = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
key String
Returns
Type Description
AllocationPolicy.InstanceSelection

getMutableInstanceSelections() (deprecated)

public Map<String,AllocationPolicy.InstanceSelection> getMutableInstanceSelections()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,InstanceSelection>

internalGetFieldAccessorTable()

protected GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AllocationPolicy.InstanceFlexibilityPolicy other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

putAllInstanceSelections(Map<String,AllocationPolicy.InstanceSelection> values)

public AllocationPolicy.InstanceFlexibilityPolicy.Builder putAllInstanceSelections(Map<String,AllocationPolicy.InstanceSelection> values)

Required. Named instance selections configuring properties that the group will use when creating new VMs. The map key is a user-specified name for the instance selection. The key must be 1-63 characters long, and comply with RFC1035. Specifically, the key must consist of lowercase letters, numbers, and hyphens. The first character must be a lowercase letter, and the last character must be a lowercase letter or number. The maximum number of instance selections is 50. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

map<string, .google.cloud.batch.v1alpha.AllocationPolicy.InstanceSelection> instance_selections = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Map<String,InstanceSelection>
Returns
Type Description
AllocationPolicy.InstanceFlexibilityPolicy.Builder

putInstanceSelections(String key, AllocationPolicy.InstanceSelection value)

public AllocationPolicy.InstanceFlexibilityPolicy.Builder putInstanceSelections(String key, AllocationPolicy.InstanceSelection value)

Required. Named instance selections configuring properties that the group will use when creating new VMs. The map key is a user-specified name for the instance selection. The key must be 1-63 characters long, and comply with RFC1035. Specifically, the key must consist of lowercase letters, numbers, and hyphens. The first character must be a lowercase letter, and the last character must be a lowercase letter or number. The maximum number of instance selections is 50. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

map<string, .google.cloud.batch.v1alpha.AllocationPolicy.InstanceSelection> instance_selections = 1 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
key String
value AllocationPolicy.InstanceSelection
Returns
Type Description
AllocationPolicy.InstanceFlexibilityPolicy.Builder

putInstanceSelectionsBuilderIfAbsent(String key)

public AllocationPolicy.InstanceSelection.Builder putInstanceSelectionsBuilderIfAbsent(String key)

Required. Named instance selections configuring properties that the group will use when creating new VMs. The map key is a user-specified name for the instance selection. The key must be 1-63 characters long, and comply with RFC1035. Specifically, the key must consist of lowercase letters, numbers, and hyphens. The first character must be a lowercase letter, and the last character must be a lowercase letter or number. The maximum number of instance selections is 50. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

map<string, .google.cloud.batch.v1alpha.AllocationPolicy.InstanceSelection> instance_selections = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
key String
Returns
Type Description
AllocationPolicy.InstanceSelection.Builder

removeInstanceSelections(String key)

public AllocationPolicy.InstanceFlexibilityPolicy.Builder removeInstanceSelections(String key)

Required. Named instance selections configuring properties that the group will use when creating new VMs. The map key is a user-specified name for the instance selection. The key must be 1-63 characters long, and comply with RFC1035. Specifically, the key must consist of lowercase letters, numbers, and hyphens. The first character must be a lowercase letter, and the last character must be a lowercase letter or number. The maximum number of instance selections is 50. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

map<string, .google.cloud.batch.v1alpha.AllocationPolicy.InstanceSelection> instance_selections = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
key String
Returns
Type Description
AllocationPolicy.InstanceFlexibilityPolicy.Builder