Class ProducerQuotaPolicy.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ProducerQuotaPolicy.Builder>
com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy.Builder
- All Implemented Interfaces:
ProducerQuotaPolicyOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- ProducerQuotaPolicy
public static final class ProducerQuotaPolicy.Builder
extends com.google.protobuf.GeneratedMessage.Builder<ProducerQuotaPolicy.Builder>
implements ProducerQuotaPolicyOrBuilder
Quota policy created by service producer.Protobuf type
google.api.serviceusage.v1beta1.ProducerQuotaPolicy-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The cloud resource container at which the quota policy is created.The name of the metric to which this policy applies.The resource name of the policy.The quota policy value.The limit unit of the limit to which this policy applies.booleancontainsDimensions(String key) If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit.The cloud resource container at which the quota policy is created.com.google.protobuf.ByteStringThe cloud resource container at which the quota policy is created.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.intIf this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit.If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit.getDimensionsOrDefault(String key, String defaultValue) If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit.If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit.The name of the metric to which this policy applies.com.google.protobuf.ByteStringThe name of the metric to which this policy applies.Deprecated.getName()The resource name of the policy.com.google.protobuf.ByteStringThe resource name of the policy.longThe quota policy value.getUnit()The limit unit of the limit to which this policy applies.com.google.protobuf.ByteStringThe limit unit of the limit to which this policy applies.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(ProducerQuotaPolicy other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) putAllDimensions(Map<String, String> values) If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit.putDimensions(String key, String value) If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit.removeDimensions(String key) If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit.setContainer(String value) The cloud resource container at which the quota policy is created.setContainerBytes(com.google.protobuf.ByteString value) The cloud resource container at which the quota policy is created.The name of the metric to which this policy applies.setMetricBytes(com.google.protobuf.ByteString value) The name of the metric to which this policy applies.The resource name of the policy.setNameBytes(com.google.protobuf.ByteString value) The resource name of the policy.setPolicyValue(long value) The quota policy value.The limit unit of the limit to which this policy applies.setUnitBytes(com.google.protobuf.ByteString value) The limit unit of the limit to which this policy applies.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<ProducerQuotaPolicy.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<ProducerQuotaPolicy.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<ProducerQuotaPolicy.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<ProducerQuotaPolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<ProducerQuotaPolicy.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ProducerQuotaPolicy.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<ProducerQuotaPolicy.Builder>
-
mergeFrom
public ProducerQuotaPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ProducerQuotaPolicy.Builder>- Throws:
IOException
-
getName
The resource name of the policy. This name is generated by the server when the policy is created. Example names would be: `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies/4a3f2c1d`
string name = 1;- Specified by:
getNamein interfaceProducerQuotaPolicyOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The resource name of the policy. This name is generated by the server when the policy is created. Example names would be: `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies/4a3f2c1d`
string name = 1;- Specified by:
getNameBytesin interfaceProducerQuotaPolicyOrBuilder- Returns:
- The bytes for name.
-
setName
The resource name of the policy. This name is generated by the server when the policy is created. Example names would be: `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies/4a3f2c1d`
string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
The resource name of the policy. This name is generated by the server when the policy is created. Example names would be: `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies/4a3f2c1d`
string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
The resource name of the policy. This name is generated by the server when the policy is created. Example names would be: `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies/4a3f2c1d`
string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getPolicyValue
public long getPolicyValue()The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).
int64 policy_value = 2;- Specified by:
getPolicyValuein interfaceProducerQuotaPolicyOrBuilder- Returns:
- The policyValue.
-
setPolicyValue
The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).
int64 policy_value = 2;- Parameters:
value- The policyValue to set.- Returns:
- This builder for chaining.
-
clearPolicyValue
The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).
int64 policy_value = 2;- Returns:
- This builder for chaining.
-
getDimensionsCount
public int getDimensionsCount()Description copied from interface:ProducerQuotaPolicyOrBuilderIf this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * `project` is not a valid key; the project is already specified in the parent resource name. * `user` is not a valid key; the API does not support quota policies that apply only to a specific user. * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * If any valid key other than `region` or `zone` appears in the map, then all valid keys other than `region` or `zone` must also appear in the map.map<string, string> dimensions = 3;- Specified by:
getDimensionsCountin interfaceProducerQuotaPolicyOrBuilder
-
containsDimensions
If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * `project` is not a valid key; the project is already specified in the parent resource name. * `user` is not a valid key; the API does not support quota policies that apply only to a specific user. * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * If any valid key other than `region` or `zone` appears in the map, then all valid keys other than `region` or `zone` must also appear in the map.map<string, string> dimensions = 3;- Specified by:
containsDimensionsin interfaceProducerQuotaPolicyOrBuilder
-
getDimensions
Deprecated.UsegetDimensionsMap()instead.- Specified by:
getDimensionsin interfaceProducerQuotaPolicyOrBuilder
-
getDimensionsMap
If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * `project` is not a valid key; the project is already specified in the parent resource name. * `user` is not a valid key; the API does not support quota policies that apply only to a specific user. * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * If any valid key other than `region` or `zone` appears in the map, then all valid keys other than `region` or `zone` must also appear in the map.map<string, string> dimensions = 3;- Specified by:
getDimensionsMapin interfaceProducerQuotaPolicyOrBuilder
-
getDimensionsOrDefault
If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * `project` is not a valid key; the project is already specified in the parent resource name. * `user` is not a valid key; the API does not support quota policies that apply only to a specific user. * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * If any valid key other than `region` or `zone` appears in the map, then all valid keys other than `region` or `zone` must also appear in the map.map<string, string> dimensions = 3;- Specified by:
getDimensionsOrDefaultin interfaceProducerQuotaPolicyOrBuilder
-
getDimensionsOrThrow
If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * `project` is not a valid key; the project is already specified in the parent resource name. * `user` is not a valid key; the API does not support quota policies that apply only to a specific user. * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * If any valid key other than `region` or `zone` appears in the map, then all valid keys other than `region` or `zone` must also appear in the map.map<string, string> dimensions = 3;- Specified by:
getDimensionsOrThrowin interfaceProducerQuotaPolicyOrBuilder
-
clearDimensions
-
removeDimensions
If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * `project` is not a valid key; the project is already specified in the parent resource name. * `user` is not a valid key; the API does not support quota policies that apply only to a specific user. * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * If any valid key other than `region` or `zone` appears in the map, then all valid keys other than `region` or `zone` must also appear in the map.map<string, string> dimensions = 3; -
getMutableDimensions
Deprecated.Use alternate mutation accessors instead. -
putDimensions
If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * `project` is not a valid key; the project is already specified in the parent resource name. * `user` is not a valid key; the API does not support quota policies that apply only to a specific user. * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * If any valid key other than `region` or `zone` appears in the map, then all valid keys other than `region` or `zone` must also appear in the map.map<string, string> dimensions = 3; -
putAllDimensions
If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * `project` is not a valid key; the project is already specified in the parent resource name. * `user` is not a valid key; the API does not support quota policies that apply only to a specific user. * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * If any valid key other than `region` or `zone` appears in the map, then all valid keys other than `region` or `zone` must also appear in the map.map<string, string> dimensions = 3; -
getMetric
The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`
string metric = 4;- Specified by:
getMetricin interfaceProducerQuotaPolicyOrBuilder- Returns:
- The metric.
-
getMetricBytes
public com.google.protobuf.ByteString getMetricBytes()The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`
string metric = 4;- Specified by:
getMetricBytesin interfaceProducerQuotaPolicyOrBuilder- Returns:
- The bytes for metric.
-
setMetric
The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`
string metric = 4;- Parameters:
value- The metric to set.- Returns:
- This builder for chaining.
-
clearMetric
The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`
string metric = 4;- Returns:
- This builder for chaining.
-
setMetricBytes
The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`
string metric = 4;- Parameters:
value- The bytes for metric to set.- Returns:
- This builder for chaining.
-
getUnit
The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.string unit = 5;- Specified by:
getUnitin interfaceProducerQuotaPolicyOrBuilder- Returns:
- The unit.
-
getUnitBytes
public com.google.protobuf.ByteString getUnitBytes()The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.string unit = 5;- Specified by:
getUnitBytesin interfaceProducerQuotaPolicyOrBuilder- Returns:
- The bytes for unit.
-
setUnit
The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.string unit = 5;- Parameters:
value- The unit to set.- Returns:
- This builder for chaining.
-
clearUnit
The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.string unit = 5;- Returns:
- This builder for chaining.
-
setUnitBytes
The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.string unit = 5;- Parameters:
value- The bytes for unit to set.- Returns:
- This builder for chaining.
-
getContainer
The cloud resource container at which the quota policy is created. The format is `{container_type}/{container_number}`string container = 6;- Specified by:
getContainerin interfaceProducerQuotaPolicyOrBuilder- Returns:
- The container.
-
getContainerBytes
public com.google.protobuf.ByteString getContainerBytes()The cloud resource container at which the quota policy is created. The format is `{container_type}/{container_number}`string container = 6;- Specified by:
getContainerBytesin interfaceProducerQuotaPolicyOrBuilder- Returns:
- The bytes for container.
-
setContainer
The cloud resource container at which the quota policy is created. The format is `{container_type}/{container_number}`string container = 6;- Parameters:
value- The container to set.- Returns:
- This builder for chaining.
-
clearContainer
The cloud resource container at which the quota policy is created. The format is `{container_type}/{container_number}`string container = 6;- Returns:
- This builder for chaining.
-
setContainerBytes
The cloud resource container at which the quota policy is created. The format is `{container_type}/{container_number}`string container = 6;- Parameters:
value- The bytes for container to set.- Returns:
- This builder for chaining.
-