# Interface QuotaPreferenceOrBuilder (0.61.0)

0.61.0 (latest) 0.59.0 0.56.0 0.55.0 0.53.0 0.51.0 0.50.0 0.49.0 0.48.0 0.46.0 0.44.0 0.43.0 0.42.0 0.41.0 0.40.0 0.38.0 0.36.0 0.35.0 0.32.0 0.31.0 0.30.0 0.28.0 0.27.0 0.26.0 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

    public interface QuotaPreferenceOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsDimensions(String key)

    public abstract boolean containsDimensions(String key)

Immutable. The dimensions that this quota preference applies to. The key of
the map entry is the name of a dimension, such as `region`, `zone`,
`network_id`, and the value of the map entry is the dimension value.

If a dimension is missing from the map of dimensions, the quota preference
applies to all the dimension values except for those that have other quota
preferences configured for the specific value.

Note: QuotaPreferences can only be applied across all values of `user` and
`resource` dimension. Do not set values for `user` or `resource` in the
dimension map.

For example: `{"provider" : "Example Organization"}` where `provider` is a
service-specific quota dimension and `Example Organization` is the provider
name.

`map<string, string> dimensions = 2 [(.google.api.field_behavior) = IMMUTABLE];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getContactEmail()

    public abstract String getContactEmail()

Input only. An email address that can be used to contact the user, in case
Google Cloud needs more information to make a decision before additional
quota can be granted.

When requesting a quota increase, the email address is required.
When requesting a quota decrease, the email address is optional.
For example, the email address is optional when the
`QuotaConfig.preferred_value` is smaller than the
`QuotaDetails.reset_value`.

`string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The contactEmail. |

### getContactEmailBytes()

    public abstract ByteString getContactEmailBytes()

Input only. An email address that can be used to contact the user, in case
Google Cloud needs more information to make a decision before additional
quota can be granted.

When requesting a quota increase, the email address is required.
When requesting a quota decrease, the email address is optional.
For example, the email address is optional when the
`QuotaConfig.preferred_value` is smaller than the
`QuotaDetails.reset_value`.

`string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for contactEmail. |

### getCreateTime()

    public abstract Timestamp getCreateTime()

Output only. Create time stamp

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeOrBuilder()

    public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Create time stamp

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getDimensions() (deprecated)

    public abstract Map<String,String> getDimensions()

Use [#getDimensionsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudquotas/latest/com.google.api.cloudquotas.v1beta.QuotaPreferenceOrBuilder#com_google_api_cloudquotas_v1beta_QuotaPreferenceOrBuilder_getDimensionsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getDimensionsCount()

    public abstract int getDimensionsCount()

Immutable. The dimensions that this quota preference applies to. The key of
the map entry is the name of a dimension, such as `region`, `zone`,
`network_id`, and the value of the map entry is the dimension value.

If a dimension is missing from the map of dimensions, the quota preference
applies to all the dimension values except for those that have other quota
preferences configured for the specific value.

Note: QuotaPreferences can only be applied across all values of `user` and
`resource` dimension. Do not set values for `user` or `resource` in the
dimension map.

For example: `{"provider" : "Example Organization"}` where `provider` is a
service-specific quota dimension and `Example Organization` is the provider
name.

`map<string, string> dimensions = 2 [(.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getDimensionsMap()

    public abstract Map<String,String> getDimensionsMap()

Immutable. The dimensions that this quota preference applies to. The key of
the map entry is the name of a dimension, such as `region`, `zone`,
`network_id`, and the value of the map entry is the dimension value.

If a dimension is missing from the map of dimensions, the quota preference
applies to all the dimension values except for those that have other quota
preferences configured for the specific value.

Note: QuotaPreferences can only be applied across all values of `user` and
`resource` dimension. Do not set values for `user` or `resource` in the
dimension map.

For example: `{"provider" : "Example Organization"}` where `provider` is a
service-specific quota dimension and `Example Organization` is the provider
name.

`map<string, string> dimensions = 2 [(.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getDimensionsOrDefault(String key, String defaultValue)

    public abstract String getDimensionsOrDefault(String key, String defaultValue)

Immutable. The dimensions that this quota preference applies to. The key of
the map entry is the name of a dimension, such as `region`, `zone`,
`network_id`, and the value of the map entry is the dimension value.

If a dimension is missing from the map of dimensions, the quota preference
applies to all the dimension values except for those that have other quota
preferences configured for the specific value.

Note: QuotaPreferences can only be applied across all values of `user` and
`resource` dimension. Do not set values for `user` or `resource` in the
dimension map.

For example: `{"provider" : "Example Organization"}` where `provider` is a
service-specific quota dimension and `Example Organization` is the provider
name.

`map<string, string> dimensions = 2 [(.google.api.field_behavior) = IMMUTABLE];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getDimensionsOrThrow(String key)

    public abstract String getDimensionsOrThrow(String key)

Immutable. The dimensions that this quota preference applies to. The key of
the map entry is the name of a dimension, such as `region`, `zone`,
`network_id`, and the value of the map entry is the dimension value.

If a dimension is missing from the map of dimensions, the quota preference
applies to all the dimension values except for those that have other quota
preferences configured for the specific value.

Note: QuotaPreferences can only be applied across all values of `user` and
`resource` dimension. Do not set values for `user` or `resource` in the
dimension map.

For example: `{"provider" : "Example Organization"}` where `provider` is a
service-specific quota dimension and `Example Organization` is the provider
name.

`map<string, string> dimensions = 2 [(.google.api.field_behavior) = IMMUTABLE];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getEtag()

    public abstract String getEtag()

Optional. The current etag of the quota preference. If an etag is provided
on update and does not match the current server's etag of the quota
preference, the request will be blocked and an ABORTED error will be
returned. See <https://google.aip.dev/134#etags> for more details on etags.

`string etag = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The etag. |

### getEtagBytes()

    public abstract ByteString getEtagBytes()

Optional. The current etag of the quota preference. If an etag is provided
on update and does not match the current server's etag of the quota
preference, the request will be blocked and an ABORTED error will be
returned. See <https://google.aip.dev/134#etags> for more details on etags.

`string etag = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for etag. |

### getJustification()

    public abstract String getJustification()

The reason / justification for this quota preference.

`string justification = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The justification. |

### getJustificationBytes()

    public abstract ByteString getJustificationBytes()

The reason / justification for this quota preference.

`string justification = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for justification. |

### getName()

    public abstract String getName()

Required except in the CREATE requests.
The resource name of the quota preference.
The path that follows `/locations` must be `/global`.
For example:
`projects/123/locations/global/quotaPreferences/my-config-for-us-east1`

`string name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

Required except in the CREATE requests.
The resource name of the quota preference.
The path that follows `/locations` must be `/global`.
For example:
`projects/123/locations/global/quotaPreferences/my-config-for-us-east1`

`string name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getQuotaConfig()

    public abstract QuotaConfig getQuotaConfig()

Required. Preferred quota configuration.

`
.google.api.cloudquotas.v1beta.QuotaConfig quota_config = 3 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudquotas/latest/com.google.api.cloudquotas.v1beta.QuotaConfig` | The quotaConfig. |

### getQuotaConfigOrBuilder()

    public abstract QuotaConfigOrBuilder getQuotaConfigOrBuilder()

Required. Preferred quota configuration.

`
.google.api.cloudquotas.v1beta.QuotaConfig quota_config = 3 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudquotas/latest/com.google.api.cloudquotas.v1beta.QuotaConfigOrBuilder` |   |

### getQuotaId()

    public abstract String getQuotaId()

Required. The id of the quota to which the quota preference is applied. A
quota name is unique in the service. For example, `CpusPerProjectPerRegion`

`string quota_id = 8 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The quotaId. |

### getQuotaIdBytes()

    public abstract ByteString getQuotaIdBytes()

Required. The id of the quota to which the quota preference is applied. A
quota name is unique in the service. For example, `CpusPerProjectPerRegion`

`string quota_id = 8 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for quotaId. |

### getReconciling()

    public abstract boolean getReconciling()

Output only. Is the quota preference pending Google Cloud approval and
fulfillment.

`bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The reconciling. |

### getService()

    public abstract String getService()

Required. The name of the service to which the quota preference is applied.

`string service = 7 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The service. |

### getServiceBytes()

    public abstract ByteString getServiceBytes()

Required. The name of the service to which the quota preference is applied.

`string service = 7 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for service. |

### getUpdateTime()

    public abstract Timestamp getUpdateTime()

Output only. Update time stamp

`.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Update time stamp

`.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### hasCreateTime()

    public abstract boolean hasCreateTime()

Output only. Create time stamp

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createTime field is set. |

### hasQuotaConfig()

    public abstract boolean hasQuotaConfig()

Required. Preferred quota configuration.

`
.google.api.cloudquotas.v1beta.QuotaConfig quota_config = 3 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the quotaConfig field is set. |

### hasUpdateTime()

    public abstract boolean hasUpdateTime()

Output only. Update time stamp

`.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the updateTime field is set. |