Interface AllocationPolicyOrBuilder (0.55.0)

public interface AllocationPolicyOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsLabels(String key)

public abstract boolean containsLabels(String key)

Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels.

Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple labels fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see Organize resources using labels.

map<string, string> labels = 6;

Parameter
Name Description
key String
Returns
Type Description
boolean

getInstance() (deprecated)

public abstract AllocationPolicy.InstancePolicy getInstance()

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance is deprecated. See google/cloud/batch/v1alpha/job.proto;l=635

Deprecated: please use instances[0].policy instead.

.google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy instance = 2 [deprecated = true];

Returns
Type Description
AllocationPolicy.InstancePolicy

The instance.

getInstanceOrBuilder() (deprecated)

public abstract AllocationPolicy.InstancePolicyOrBuilder getInstanceOrBuilder()

Deprecated: please use instances[0].policy instead.

.google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy instance = 2 [deprecated = true];

Returns
Type Description
AllocationPolicy.InstancePolicyOrBuilder

getInstanceTemplates(int index) (deprecated)

public abstract String getInstanceTemplates(int index)

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance_templates is deprecated. See google/cloud/batch/v1alpha/job.proto;l=642

Deprecated: please use instances[0].template instead.

repeated string instance_templates = 3 [deprecated = true];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The instanceTemplates at the given index.

getInstanceTemplatesBytes(int index) (deprecated)

public abstract ByteString getInstanceTemplatesBytes(int index)

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance_templates is deprecated. See google/cloud/batch/v1alpha/job.proto;l=642

Deprecated: please use instances[0].template instead.

repeated string instance_templates = 3 [deprecated = true];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the instanceTemplates at the given index.

getInstanceTemplatesCount() (deprecated)

public abstract int getInstanceTemplatesCount()

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance_templates is deprecated. See google/cloud/batch/v1alpha/job.proto;l=642

Deprecated: please use instances[0].template instead.

repeated string instance_templates = 3 [deprecated = true];

Returns
Type Description
int

The count of instanceTemplates.

getInstanceTemplatesList() (deprecated)

public abstract List<String> getInstanceTemplatesList()

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance_templates is deprecated. See google/cloud/batch/v1alpha/job.proto;l=642

Deprecated: please use instances[0].template instead.

repeated string instance_templates = 3 [deprecated = true];

Returns
Type Description
List<String>

A list containing the instanceTemplates.

getInstances(int index)

public abstract AllocationPolicy.InstancePolicyOrTemplate getInstances(int index)

Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.

repeated .google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicyOrTemplate instances = 8;

Parameter
Name Description
index int
Returns
Type Description
AllocationPolicy.InstancePolicyOrTemplate

getInstancesCount()

public abstract int getInstancesCount()

Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.

repeated .google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicyOrTemplate instances = 8;

Returns
Type Description
int

getInstancesList()

public abstract List<AllocationPolicy.InstancePolicyOrTemplate> getInstancesList()

Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.

repeated .google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicyOrTemplate instances = 8;

Returns
Type Description
List<InstancePolicyOrTemplate>

getInstancesOrBuilder(int index)

public abstract AllocationPolicy.InstancePolicyOrTemplateOrBuilder getInstancesOrBuilder(int index)

Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.

repeated .google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicyOrTemplate instances = 8;

Parameter
Name Description
index int
Returns
Type Description
AllocationPolicy.InstancePolicyOrTemplateOrBuilder

getInstancesOrBuilderList()

public abstract List<? extends AllocationPolicy.InstancePolicyOrTemplateOrBuilder> getInstancesOrBuilderList()

Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.

repeated .google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicyOrTemplate instances = 8;

Returns
Type Description
List<? extends com.google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicyOrTemplateOrBuilder>

getLabels() (deprecated)

public abstract Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public abstract int getLabelsCount()

Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels.

Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple labels fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see Organize resources using labels.

map<string, string> labels = 6;

Returns
Type Description
int

getLabelsMap()

public abstract Map<String,String> getLabelsMap()

Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels.

Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple labels fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see Organize resources using labels.

map<string, string> labels = 6;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public abstract String getLabelsOrDefault(String key, String defaultValue)

Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels.

Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple labels fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see Organize resources using labels.

map<string, string> labels = 6;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public abstract String getLabelsOrThrow(String key)

Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels.

Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple labels fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see Organize resources using labels.

map<string, string> labels = 6;

Parameter
Name Description
key String
Returns
Type Description
String

getLocation()

public abstract AllocationPolicy.LocationPolicy getLocation()

Location where compute resources should be allocated for the Job.

.google.cloud.batch.v1alpha.AllocationPolicy.LocationPolicy location = 1;

Returns
Type Description
AllocationPolicy.LocationPolicy

The location.

getLocationOrBuilder()

public abstract AllocationPolicy.LocationPolicyOrBuilder getLocationOrBuilder()

Location where compute resources should be allocated for the Job.

.google.cloud.batch.v1alpha.AllocationPolicy.LocationPolicy location = 1;

Returns
Type Description
AllocationPolicy.LocationPolicyOrBuilder

getNetwork()

public abstract AllocationPolicy.NetworkPolicy getNetwork()

The network policy.

If you define an instance template in the InstancePolicyOrTemplate field, Batch will use the network settings in the instance template instead of this field.

.google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7;

Returns
Type Description
AllocationPolicy.NetworkPolicy

The network.

getNetworkOrBuilder()

public abstract AllocationPolicy.NetworkPolicyOrBuilder getNetworkOrBuilder()

The network policy.

If you define an instance template in the InstancePolicyOrTemplate field, Batch will use the network settings in the instance template instead of this field.

.google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7;

Returns
Type Description
AllocationPolicy.NetworkPolicyOrBuilder

getPlacement()

public abstract AllocationPolicy.PlacementPolicy getPlacement()

The placement policy.

.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy placement = 10;

Returns
Type Description
AllocationPolicy.PlacementPolicy

The placement.

getPlacementOrBuilder()

public abstract AllocationPolicy.PlacementPolicyOrBuilder getPlacementOrBuilder()

The placement policy.

.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy placement = 10;

Returns
Type Description
AllocationPolicy.PlacementPolicyOrBuilder

getProvisioningModels(int index) (deprecated)

public abstract AllocationPolicy.ProvisioningModel getProvisioningModels(int index)

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.provisioning_models is deprecated. See google/cloud/batch/v1alpha/job.proto;l=645

Deprecated: please use instances[0].policy.provisioning_model instead.

repeated .google.cloud.batch.v1alpha.AllocationPolicy.ProvisioningModel provisioning_models = 4 [deprecated = true];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
AllocationPolicy.ProvisioningModel

The provisioningModels at the given index.

getProvisioningModelsCount() (deprecated)

public abstract int getProvisioningModelsCount()

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.provisioning_models is deprecated. See google/cloud/batch/v1alpha/job.proto;l=645

Deprecated: please use instances[0].policy.provisioning_model instead.

repeated .google.cloud.batch.v1alpha.AllocationPolicy.ProvisioningModel provisioning_models = 4 [deprecated = true];

Returns
Type Description
int

The count of provisioningModels.

getProvisioningModelsList() (deprecated)

public abstract List<AllocationPolicy.ProvisioningModel> getProvisioningModelsList()

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.provisioning_models is deprecated. See google/cloud/batch/v1alpha/job.proto;l=645

Deprecated: please use instances[0].policy.provisioning_model instead.

repeated .google.cloud.batch.v1alpha.AllocationPolicy.ProvisioningModel provisioning_models = 4 [deprecated = true];

Returns
Type Description
List<ProvisioningModel>

A list containing the provisioningModels.

getProvisioningModelsValue(int index) (deprecated)

public abstract int getProvisioningModelsValue(int index)

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.provisioning_models is deprecated. See google/cloud/batch/v1alpha/job.proto;l=645

Deprecated: please use instances[0].policy.provisioning_model instead.

repeated .google.cloud.batch.v1alpha.AllocationPolicy.ProvisioningModel provisioning_models = 4 [deprecated = true];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of provisioningModels at the given index.

getProvisioningModelsValueList() (deprecated)

public abstract List<Integer> getProvisioningModelsValueList()

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.provisioning_models is deprecated. See google/cloud/batch/v1alpha/job.proto;l=645

Deprecated: please use instances[0].policy.provisioning_model instead.

repeated .google.cloud.batch.v1alpha.AllocationPolicy.ProvisioningModel provisioning_models = 4 [deprecated = true];

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for provisioningModels.

getServiceAccount()

public abstract ServiceAccount getServiceAccount()

Defines the service account for Batch-created VMs. If omitted, the default Compute Engine service account is used. Must match the service account specified in any used instance template configured in the Batch job.

Includes the following fields:

  • email: The service account's email address. If not set, the default Compute Engine service account is used.
  • scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)

.google.cloud.batch.v1alpha.ServiceAccount service_account = 9;

Returns
Type Description
ServiceAccount

The serviceAccount.

getServiceAccountEmail() (deprecated)

public abstract String getServiceAccountEmail()

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.service_account_email is deprecated. See google/cloud/batch/v1alpha/job.proto;l=648

Deprecated: please use service_account instead.

string service_account_email = 5 [deprecated = true];

Returns
Type Description
String

The serviceAccountEmail.

getServiceAccountEmailBytes() (deprecated)

public abstract ByteString getServiceAccountEmailBytes()

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.service_account_email is deprecated. See google/cloud/batch/v1alpha/job.proto;l=648

Deprecated: please use service_account instead.

string service_account_email = 5 [deprecated = true];

Returns
Type Description
ByteString

The bytes for serviceAccountEmail.

getServiceAccountOrBuilder()

public abstract ServiceAccountOrBuilder getServiceAccountOrBuilder()

Defines the service account for Batch-created VMs. If omitted, the default Compute Engine service account is used. Must match the service account specified in any used instance template configured in the Batch job.

Includes the following fields:

  • email: The service account's email address. If not set, the default Compute Engine service account is used.
  • scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)

.google.cloud.batch.v1alpha.ServiceAccount service_account = 9;

Returns
Type Description
ServiceAccountOrBuilder

getTags(int index)

public abstract String getTags(int index)

Optional. Tags applied to the VM instances.

The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with RFC1035.

repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The tags at the given index.

getTagsBytes(int index)

public abstract ByteString getTagsBytes(int index)

Optional. Tags applied to the VM instances.

The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with RFC1035.

repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the tags at the given index.

getTagsCount()

public abstract int getTagsCount()

Optional. Tags applied to the VM instances.

The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with RFC1035.

repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of tags.

getTagsList()

public abstract List<String> getTagsList()

Optional. Tags applied to the VM instances.

The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with RFC1035.

repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<String>

A list containing the tags.

hasInstance() (deprecated)

public abstract boolean hasInstance()

Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance is deprecated. See google/cloud/batch/v1alpha/job.proto;l=635

Deprecated: please use instances[0].policy instead.

.google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy instance = 2 [deprecated = true];

Returns
Type Description
boolean

Whether the instance field is set.

hasLocation()

public abstract boolean hasLocation()

Location where compute resources should be allocated for the Job.

.google.cloud.batch.v1alpha.AllocationPolicy.LocationPolicy location = 1;

Returns
Type Description
boolean

Whether the location field is set.

hasNetwork()

public abstract boolean hasNetwork()

The network policy.

If you define an instance template in the InstancePolicyOrTemplate field, Batch will use the network settings in the instance template instead of this field.

.google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7;

Returns
Type Description
boolean

Whether the network field is set.

hasPlacement()

public abstract boolean hasPlacement()

The placement policy.

.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy placement = 10;

Returns
Type Description
boolean

Whether the placement field is set.

hasServiceAccount()

public abstract boolean hasServiceAccount()

Defines the service account for Batch-created VMs. If omitted, the default Compute Engine service account is used. Must match the service account specified in any used instance template configured in the Batch job.

Includes the following fields:

  • email: The service account's email address. If not set, the default Compute Engine service account is used.
  • scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)

.google.cloud.batch.v1alpha.ServiceAccount service_account = 9;

Returns
Type Description
boolean

Whether the serviceAccount field is set.