Package com.google.api
Class Usage.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Usage.Builder>
com.google.api.Usage.Builder
- All Implemented Interfaces:
UsageOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Usage
public static final class Usage.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Usage.Builder>
implements UsageOrBuilder
Configuration controlling usage of a service.Protobuf type
google.api.Usage-
Method Summary
Modifier and TypeMethodDescriptionaddAllRequirements(Iterable<String> values) Requirements that must be satisfied before a consumer project can use the service.addAllRules(Iterable<? extends UsageRule> values) A list of usage rules that apply to individual API methods.addRequirements(String value) Requirements that must be satisfied before a consumer project can use the service.addRequirementsBytes(com.google.protobuf.ByteString value) Requirements that must be satisfied before a consumer project can use the service.A list of usage rules that apply to individual API methods.addRules(int index, UsageRule.Builder builderForValue) A list of usage rules that apply to individual API methods.A list of usage rules that apply to individual API methods.addRules(UsageRule.Builder builderForValue) A list of usage rules that apply to individual API methods.A list of usage rules that apply to individual API methods.addRulesBuilder(int index) A list of usage rules that apply to individual API methods.build()clear()The full resource name of a channel used for sending notifications to the service producer.Requirements that must be satisfied before a consumer project can use the service.A list of usage rules that apply to individual API methods.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe full resource name of a channel used for sending notifications to the service producer.com.google.protobuf.ByteStringThe full resource name of a channel used for sending notifications to the service producer.getRequirements(int index) Requirements that must be satisfied before a consumer project can use the service.com.google.protobuf.ByteStringgetRequirementsBytes(int index) Requirements that must be satisfied before a consumer project can use the service.intRequirements that must be satisfied before a consumer project can use the service.com.google.protobuf.ProtocolStringListRequirements that must be satisfied before a consumer project can use the service.getRules(int index) A list of usage rules that apply to individual API methods.getRulesBuilder(int index) A list of usage rules that apply to individual API methods.A list of usage rules that apply to individual API methods.intA list of usage rules that apply to individual API methods.A list of usage rules that apply to individual API methods.getRulesOrBuilder(int index) A list of usage rules that apply to individual API methods.List<? extends UsageRuleOrBuilder>A list of usage rules that apply to individual API methods.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeRules(int index) A list of usage rules that apply to individual API methods.The full resource name of a channel used for sending notifications to the service producer.setProducerNotificationChannelBytes(com.google.protobuf.ByteString value) The full resource name of a channel used for sending notifications to the service producer.setRequirements(int index, String value) Requirements that must be satisfied before a consumer project can use the service.A list of usage rules that apply to individual API methods.setRules(int index, UsageRule.Builder builderForValue) A list of usage rules that apply to individual API methods.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, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, 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() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Usage.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<Usage.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<Usage.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<Usage.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Usage.Builder>
-
mergeFrom
public Usage.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<Usage.Builder>- Throws:
IOException
-
getRequirementsList
public com.google.protobuf.ProtocolStringList getRequirementsList()Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form <service.name>/<requirement-id>; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.
repeated string requirements = 1;- Specified by:
getRequirementsListin interfaceUsageOrBuilder- Returns:
- A list containing the requirements.
-
getRequirementsCount
public int getRequirementsCount()Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form <service.name>/<requirement-id>; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.
repeated string requirements = 1;- Specified by:
getRequirementsCountin interfaceUsageOrBuilder- Returns:
- The count of requirements.
-
getRequirements
Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form <service.name>/<requirement-id>; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.
repeated string requirements = 1;- Specified by:
getRequirementsin interfaceUsageOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The requirements at the given index.
-
getRequirementsBytes
public com.google.protobuf.ByteString getRequirementsBytes(int index) Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form <service.name>/<requirement-id>; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.
repeated string requirements = 1;- Specified by:
getRequirementsBytesin interfaceUsageOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the requirements at the given index.
-
setRequirements
Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form <service.name>/<requirement-id>; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.
repeated string requirements = 1;- Parameters:
index- The index to set the value at.value- The requirements to set.- Returns:
- This builder for chaining.
-
addRequirements
Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form <service.name>/<requirement-id>; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.
repeated string requirements = 1;- Parameters:
value- The requirements to add.- Returns:
- This builder for chaining.
-
addAllRequirements
Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form <service.name>/<requirement-id>; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.
repeated string requirements = 1;- Parameters:
values- The requirements to add.- Returns:
- This builder for chaining.
-
clearRequirements
Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form <service.name>/<requirement-id>; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.
repeated string requirements = 1;- Returns:
- This builder for chaining.
-
addRequirementsBytes
Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form <service.name>/<requirement-id>; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud". Other Google APIs should include "serviceusage.googleapis.com/tos/universal". Additional ToS can be included based on the business needs.
repeated string requirements = 1;- Parameters:
value- The bytes of the requirements to add.- Returns:
- This builder for chaining.
-
getRulesList
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6;- Specified by:
getRulesListin interfaceUsageOrBuilder
-
getRulesCount
public int getRulesCount()A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6;- Specified by:
getRulesCountin interfaceUsageOrBuilder
-
getRules
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6;- Specified by:
getRulesin interfaceUsageOrBuilder
-
setRules
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
setRules
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
addRules
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
addRules
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
addRules
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
addRules
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
addAllRules
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
clearRules
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
removeRules
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
getRulesBuilder
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
getRulesOrBuilder
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6;- Specified by:
getRulesOrBuilderin interfaceUsageOrBuilder
-
getRulesOrBuilderList
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6;- Specified by:
getRulesOrBuilderListin interfaceUsageOrBuilder
-
addRulesBuilder
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
addRulesBuilder
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
getRulesBuilderList
A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow "last one wins" order.
repeated .google.api.UsageRule rules = 6; -
getProducerNotificationChannel
The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.
string producer_notification_channel = 7;- Specified by:
getProducerNotificationChannelin interfaceUsageOrBuilder- Returns:
- The producerNotificationChannel.
-
getProducerNotificationChannelBytes
public com.google.protobuf.ByteString getProducerNotificationChannelBytes()The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.
string producer_notification_channel = 7;- Specified by:
getProducerNotificationChannelBytesin interfaceUsageOrBuilder- Returns:
- The bytes for producerNotificationChannel.
-
setProducerNotificationChannel
The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.
string producer_notification_channel = 7;- Parameters:
value- The producerNotificationChannel to set.- Returns:
- This builder for chaining.
-
clearProducerNotificationChannel
The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.
string producer_notification_channel = 7;- Returns:
- This builder for chaining.
-
setProducerNotificationChannelBytes
The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.
string producer_notification_channel = 7;- Parameters:
value- The bytes for producerNotificationChannel to set.- Returns:
- This builder for chaining.
-