public final class AllocationPolicy extends GeneratedMessageV3 implements AllocationPolicyOrBuilder
A Job's resource allocation policy describes when, where, and how compute
resources should be allocated for the Job.
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy
Static Fields
INSTANCES_FIELD_NUMBER
public static final int INSTANCES_FIELD_NUMBER
Field Value
INSTANCE_FIELD_NUMBER
public static final int INSTANCE_FIELD_NUMBER
Field Value
INSTANCE_TEMPLATES_FIELD_NUMBER
public static final int INSTANCE_TEMPLATES_FIELD_NUMBER
Field Value
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Field Value
LOCATION_FIELD_NUMBER
public static final int LOCATION_FIELD_NUMBER
Field Value
NETWORK_FIELD_NUMBER
public static final int NETWORK_FIELD_NUMBER
Field Value
PROVISIONING_MODELS_FIELD_NUMBER
public static final int PROVISIONING_MODELS_FIELD_NUMBER
Field Value
SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER
public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER
Field Value
SERVICE_ACCOUNT_FIELD_NUMBER
public static final int SERVICE_ACCOUNT_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static AllocationPolicy getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static AllocationPolicy.Builder newBuilder()
Returns
newBuilder(AllocationPolicy prototype)
public static AllocationPolicy.Builder newBuilder(AllocationPolicy prototype)
Parameter
Returns
public static AllocationPolicy parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static AllocationPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static AllocationPolicy parseFrom(byte[] data)
Parameter
Name |
Description |
data |
byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static AllocationPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static AllocationPolicy parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AllocationPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static AllocationPolicy parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static AllocationPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static AllocationPolicy parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static AllocationPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static AllocationPolicy parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static AllocationPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<AllocationPolicy> parser()
Returns
Methods
containsLabels(String key)
public boolean containsLabels(String key)
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Parameter
Returns
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public AllocationPolicy getDefaultInstanceForType()
Returns
getInstance() (deprecated)
public AllocationPolicy.InstancePolicy getInstance()
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance is deprecated. See
google/cloud/batch/v1alpha/job.proto;l=462
Deprecated: please use instances[0].policy instead.
.google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy instance = 2 [deprecated = true];
Returns
getInstanceOrBuilder()
public AllocationPolicy.InstancePolicyOrBuilder getInstanceOrBuilder()
Deprecated: please use instances[0].policy instead.
.google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicy instance = 2 [deprecated = true];
Returns
getInstanceTemplates(int index) (deprecated)
public String getInstanceTemplates(int index)
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance_templates is deprecated. See
google/cloud/batch/v1alpha/job.proto;l=469
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 ByteString getInstanceTemplatesBytes(int index)
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance_templates is deprecated. See
google/cloud/batch/v1alpha/job.proto;l=469
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 int getInstanceTemplatesCount()
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance_templates is deprecated. See
google/cloud/batch/v1alpha/job.proto;l=469
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 ProtocolStringList getInstanceTemplatesList()
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance_templates is deprecated. See
google/cloud/batch/v1alpha/job.proto;l=469
Deprecated: please use instances[0].template instead.
repeated string instance_templates = 3 [deprecated = true];
Returns
getInstances(int index)
public 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
getInstancesCount()
public 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
getInstancesList()
public 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
getInstancesOrBuilder(int index)
public 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
getInstancesOrBuilderList()
public 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()
public Map<String,String> getLabels()
Returns
getLabelsCount()
public int getLabelsCount()
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Returns
getLabelsMap()
public Map<String,String> getLabelsMap()
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Returns
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Parameters
Returns
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Parameter
Returns
getLocation()
public AllocationPolicy.LocationPolicy getLocation()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1alpha.AllocationPolicy.LocationPolicy location = 1;
Returns
getLocationOrBuilder()
public AllocationPolicy.LocationPolicyOrBuilder getLocationOrBuilder()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1alpha.AllocationPolicy.LocationPolicy location = 1;
Returns
getNetwork()
public AllocationPolicy.NetworkPolicy getNetwork()
The network policy.
.google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7;
Returns
getNetworkOrBuilder()
public AllocationPolicy.NetworkPolicyOrBuilder getNetworkOrBuilder()
The network policy.
.google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7;
Returns
getParserForType()
public Parser<AllocationPolicy> getParserForType()
Returns
Overrides
getProvisioningModels(int index) (deprecated)
public AllocationPolicy.ProvisioningModel getProvisioningModels(int index)
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.provisioning_models is deprecated. See
google/cloud/batch/v1alpha/job.proto;l=472
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
getProvisioningModelsCount() (deprecated)
public int getProvisioningModelsCount()
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.provisioning_models is deprecated. See
google/cloud/batch/v1alpha/job.proto;l=472
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 List<AllocationPolicy.ProvisioningModel> getProvisioningModelsList()
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.provisioning_models is deprecated. See
google/cloud/batch/v1alpha/job.proto;l=472
Deprecated: please use instances[0].policy.provisioning_model instead.
repeated .google.cloud.batch.v1alpha.AllocationPolicy.ProvisioningModel provisioning_models = 4 [deprecated = true];
Returns
getProvisioningModelsValue(int index) (deprecated)
public int getProvisioningModelsValue(int index)
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.provisioning_models is deprecated. See
google/cloud/batch/v1alpha/job.proto;l=472
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 List<Integer> getProvisioningModelsValueList()
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.provisioning_models is deprecated. See
google/cloud/batch/v1alpha/job.proto;l=472
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.
|
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getServiceAccount()
public ServiceAccount getServiceAccount()
Service account that VMs will run as.
.google.cloud.batch.v1alpha.ServiceAccount service_account = 9;
Returns
getServiceAccountEmail() (deprecated)
public String getServiceAccountEmail()
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.service_account_email is deprecated.
See google/cloud/batch/v1alpha/job.proto;l=475
Deprecated: please use service_account instead.
string service_account_email = 5 [deprecated = true];
Returns
Type |
Description |
String |
The serviceAccountEmail.
|
getServiceAccountEmailBytes() (deprecated)
public ByteString getServiceAccountEmailBytes()
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.service_account_email is deprecated.
See google/cloud/batch/v1alpha/job.proto;l=475
Deprecated: please use service_account instead.
string service_account_email = 5 [deprecated = true];
Returns
Type |
Description |
ByteString |
The bytes for serviceAccountEmail.
|
getServiceAccountOrBuilder()
public ServiceAccountOrBuilder getServiceAccountOrBuilder()
Service account that VMs will run as.
.google.cloud.batch.v1alpha.ServiceAccount service_account = 9;
Returns
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasInstance() (deprecated)
public boolean hasInstance()
Deprecated. google.cloud.batch.v1alpha.AllocationPolicy.instance is deprecated. See
google/cloud/batch/v1alpha/job.proto;l=462
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 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 boolean hasNetwork()
The network policy.
.google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy network = 7;
Returns
Type |
Description |
boolean |
Whether the network field is set.
|
hasServiceAccount()
public boolean hasServiceAccount()
Service account that VMs will run as.
.google.cloud.batch.v1alpha.ServiceAccount service_account = 9;
Returns
Type |
Description |
boolean |
Whether the serviceAccount field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Name |
Description |
number |
int
|
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public AllocationPolicy.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected AllocationPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public AllocationPolicy.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions