Class ResourceAllowance (0.41.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
TypeDescription
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NOTIFICATIONS_FIELD_NUMBER

public static final int NOTIFICATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

UID_FIELD_NUMBER

public static final int UID_FIELD_NUMBER
Field Value
TypeDescription
int

USAGE_RESOURCE_ALLOWANCE_FIELD_NUMBER

public static final int USAGE_RESOURCE_ALLOWANCE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ResourceAllowance getDefaultInstance()
Returns
TypeDescription
ResourceAllowance

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static ResourceAllowance.Builder newBuilder()
Returns
TypeDescription
ResourceAllowance.Builder

newBuilder(ResourceAllowance prototype)

public static ResourceAllowance.Builder newBuilder(ResourceAllowance prototype)
Parameter
NameDescription
prototypeResourceAllowance
Returns
TypeDescription
ResourceAllowance.Builder

parseDelimitedFrom(InputStream input)

public static ResourceAllowance parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ResourceAllowance parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ResourceAllowance parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ResourceAllowance parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ResourceAllowance parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ResourceAllowance parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ResourceAllowance parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResourceAllowance
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ResourceAllowance> parser()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public ResourceAllowance getDefaultInstanceForType()
Returns
TypeDescription
ResourceAllowance

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Notification

getNotificationsCount()

public int getNotificationsCount()

Optional. Notification configurations.

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

Returns
TypeDescription
int

getNotificationsList()

public List<Notification> getNotificationsList()

Optional. Notification configurations.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
NotificationOrBuilder

getNotificationsOrBuilderList()

public List<? extends NotificationOrBuilder> getNotificationsOrBuilderList()

Optional. Notification configurations.

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

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

getParserForType()

public Parser<ResourceAllowance> getParserForType()
Returns
TypeDescription
Parser<ResourceAllowance>
Overrides

getResourceAllowanceCase()

public ResourceAllowance.ResourceAllowanceCase getResourceAllowanceCase()
Returns
TypeDescription
ResourceAllowance.ResourceAllowanceCase

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
UsageResourceAllowance

The usageResourceAllowance.

getUsageResourceAllowanceOrBuilder()

public UsageResourceAllowanceOrBuilder getUsageResourceAllowanceOrBuilder()

The detail of usage resource allowance.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the usageResourceAllowance field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ResourceAllowance.Builder newBuilderForType()
Returns
TypeDescription
ResourceAllowance.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ResourceAllowance.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ResourceAllowance.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ResourceAllowance.Builder toBuilder()
Returns
TypeDescription
ResourceAllowance.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException