Package com.google.api
Class Usage.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.addRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) 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()
clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) 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.clone()
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
The full resource name of a channel used for sending notifications to the service producer.com.google.protobuf.ByteString
The 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.ByteString
getRequirementsBytes
(int index) Requirements that must be satisfied before a consumer project can use the service.int
Requirements that must be satisfied before a consumer project can use the service.com.google.protobuf.ProtocolStringList
Requirements 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.int
A 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.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) final Usage.Builder
mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) 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.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) 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.final Usage.Builder
setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods 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.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-
setField
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-
clearField
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-
clearOneof
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-
setRepeatedField
public Usage.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-
addRepeatedField
public Usage.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Usage.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-
mergeFrom
public Usage.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
getRequirementsList
in 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:
getRequirementsCount
in 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:
getRequirements
in 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:
getRequirementsBytes
in 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:
getRulesList
in 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:
getRulesCount
in 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:
getRules
in 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:
getRulesOrBuilder
in 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:
getRulesOrBuilderList
in 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:
getProducerNotificationChannel
in 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:
getProducerNotificationChannelBytes
in 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.
-
setUnknownFields
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Usage.Builder>
-