Class ResourceAllowance (0.40.0)

public final class ResourceAllowance extends GeneratedMessageV3 implements ResourceAllowanceOrBuilder

The Resource Allowance description for Cloud Batch.

Protobuf type google.cloud.batch.v1alpha.ResourceAllowance

Static Fields

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

NOTIFICATIONS_FIELD_NUMBER

public static final int NOTIFICATIONS_FIELD_NUMBER
Field Value
Type Description
int

UID_FIELD_NUMBER

public static final int UID_FIELD_NUMBER
Field Value
Type Description
int

USAGE_RESOURCE_ALLOWANCE_FIELD_NUMBER

public static final int USAGE_RESOURCE_ALLOWANCE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ResourceAllowance getDefaultInstance()
Returns
Type Description
ResourceAllowance

getDescriptor()

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

newBuilder()

public static ResourceAllowance.Builder newBuilder()
Returns
Type Description
ResourceAllowance.Builder

newBuilder(ResourceAllowance prototype)

public static ResourceAllowance.Builder newBuilder(ResourceAllowance prototype)
Parameter
Name Description
prototype ResourceAllowance
Returns
Type Description
ResourceAllowance.Builder

parseDelimitedFrom(InputStream input)

public static ResourceAllowance parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ResourceAllowance parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ResourceAllowance parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ResourceAllowance parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ResourceAllowance parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ResourceAllowance parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResourceAllowance
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ResourceAllowance> parser()
Returns
Type Description
Parser<ResourceAllowance>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

Optional. Labels are attributes that can be set and used by both the user and by Batch. Labels must meet the following constraints:

  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.
  • All characters must use UTF-8 encoding, and international characters are allowed.
  • Keys must start with a lowercase letter or international character.
  • Each resource is limited to a maximum of 64 labels.

    Both keys and values are additionally constrained to be <= 128 bytes.

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

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCreateTime()

public Timestamp getCreateTime()

Output only. Time when the ResourceAllowance was created.

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

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time when the ResourceAllowance was created.

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

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public ResourceAllowance getDefaultInstanceForType()
Returns
Type Description
ResourceAllowance

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. Labels are attributes that can be set and used by both the user and by Batch. Labels must meet the following constraints:

  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.
  • All characters must use UTF-8 encoding, and international characters are allowed.
  • Keys must start with a lowercase letter or international character.
  • Each resource is limited to a maximum of 64 labels.

    Both keys and values are additionally constrained to be <= 128 bytes.

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

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. Labels are attributes that can be set and used by both the user and by Batch. Labels must meet the following constraints:

  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.
  • All characters must use UTF-8 encoding, and international characters are allowed.
  • Keys must start with a lowercase letter or international character.
  • Each resource is limited to a maximum of 64 labels.

    Both keys and values are additionally constrained to be <= 128 bytes.

map<string, string> labels = 5 [(.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 are attributes that can be set and used by both the user and by Batch. Labels must meet the following constraints:

  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.
  • All characters must use UTF-8 encoding, and international characters are allowed.
  • Keys must start with a lowercase letter or international character.
  • Each resource is limited to a maximum of 64 labels.

    Both keys and values are additionally constrained to be <= 128 bytes.

map<string, string> labels = 5 [(.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 are attributes that can be set and used by both the user and by Batch. Labels must meet the following constraints:

  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes.
  • All characters must use UTF-8 encoding, and international characters are allowed.
  • Keys must start with a lowercase letter or international character.
  • Each resource is limited to a maximum of 64 labels.

    Both keys and values are additionally constrained to be <= 128 bytes.

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

Parameter
Name Description
key String
Returns
Type Description
String

getName()

public String getName()

Identifier. ResourceAllowance name. For example: "projects/123456/locations/us-central1/resourceAllowances/resource-allowance-1".

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. ResourceAllowance name. For example: "projects/123456/locations/us-central1/resourceAllowances/resource-allowance-1".

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

Returns
Type Description
ByteString

The bytes for name.

getNotifications(int index)

public Notification getNotifications(int index)

Optional. Notification configurations.

repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Notification

getNotificationsCount()

public int getNotificationsCount()

Optional. Notification configurations.

repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getNotificationsList()

public List<Notification> getNotificationsList()

Optional. Notification configurations.

repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Notification>

getNotificationsOrBuilder(int index)

public NotificationOrBuilder getNotificationsOrBuilder(int index)

Optional. Notification configurations.

repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
NotificationOrBuilder

getNotificationsOrBuilderList()

public List<? extends NotificationOrBuilder> getNotificationsOrBuilderList()

Optional. Notification configurations.

repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];

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

getParserForType()

public Parser<ResourceAllowance> getParserForType()
Returns
Type Description
Parser<ResourceAllowance>
Overrides

getResourceAllowanceCase()

public ResourceAllowance.ResourceAllowanceCase getResourceAllowanceCase()
Returns
Type Description
ResourceAllowance.ResourceAllowanceCase

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUid()

public String getUid()

Output only. A system generated unique ID (in UUID4 format) for the ResourceAllowance.

string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }

Returns
Type Description
String

The uid.

getUidBytes()

public ByteString getUidBytes()

Output only. A system generated unique ID (in UUID4 format) for the ResourceAllowance.

string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }

Returns
Type Description
ByteString

The bytes for uid.

getUsageResourceAllowance()

public UsageResourceAllowance getUsageResourceAllowance()

The detail of usage resource allowance.

.google.cloud.batch.v1alpha.UsageResourceAllowance usage_resource_allowance = 4;

Returns
Type Description
UsageResourceAllowance

The usageResourceAllowance.

getUsageResourceAllowanceOrBuilder()

public UsageResourceAllowanceOrBuilder getUsageResourceAllowanceOrBuilder()

The detail of usage resource allowance.

.google.cloud.batch.v1alpha.UsageResourceAllowance usage_resource_allowance = 4;

Returns
Type Description
UsageResourceAllowanceOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Time when the ResourceAllowance was created.

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

Returns
Type Description
boolean

Whether the createTime field is set.

hasUsageResourceAllowance()

public boolean hasUsageResourceAllowance()

The detail of usage resource allowance.

.google.cloud.batch.v1alpha.UsageResourceAllowance usage_resource_allowance = 4;

Returns
Type Description
boolean

Whether the usageResourceAllowance field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

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.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ResourceAllowance.Builder newBuilderForType()
Returns
Type Description
ResourceAllowance.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ResourceAllowance.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ResourceAllowance.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ResourceAllowance.Builder toBuilder()
Returns
Type Description
ResourceAllowance.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException