public static final class Usage.Builder extends GeneratedMessageV3.Builder<Usage.Builder> implements UsageOrBuilder
Configuration controlling usage of a service.
Protobuf type google.api.Usage
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Usage.BuilderImplements
UsageOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllRequirements(Iterable<String> values)
public Usage.Builder addAllRequirements(Iterable<String> values)
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;
Name | Description |
values | Iterable<String> The requirements to add. |
Type | Description |
Usage.Builder | This builder for chaining. |
addAllRules(Iterable<? extends UsageRule> values)
public Usage.Builder addAllRules(Iterable<? extends UsageRule> values)
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;
Name | Description |
values | Iterable<? extends com.google.api.UsageRule> |
Type | Description |
Usage.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Usage.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Usage.Builder |
addRequirements(String value)
public Usage.Builder addRequirements(String value)
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;
Name | Description |
value | String The requirements to add. |
Type | Description |
Usage.Builder | This builder for chaining. |
addRequirementsBytes(ByteString value)
public Usage.Builder addRequirementsBytes(ByteString value)
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;
Name | Description |
value | ByteString The bytes of the requirements to add. |
Type | Description |
Usage.Builder | This builder for chaining. |
addRules(UsageRule value)
public Usage.Builder addRules(UsageRule value)
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;
Name | Description |
value | UsageRule |
Type | Description |
Usage.Builder |
addRules(UsageRule.Builder builderForValue)
public Usage.Builder addRules(UsageRule.Builder builderForValue)
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;
Name | Description |
builderForValue | UsageRule.Builder |
Type | Description |
Usage.Builder |
addRules(int index, UsageRule value)
public Usage.Builder addRules(int index, UsageRule value)
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;
Name | Description |
index | int |
value | UsageRule |
Type | Description |
Usage.Builder |
addRules(int index, UsageRule.Builder builderForValue)
public Usage.Builder addRules(int index, UsageRule.Builder builderForValue)
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;
Name | Description |
index | int |
builderForValue | UsageRule.Builder |
Type | Description |
Usage.Builder |
addRulesBuilder()
public UsageRule.Builder 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;
Type | Description |
UsageRule.Builder |
addRulesBuilder(int index)
public UsageRule.Builder addRulesBuilder(int index)
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;
Name | Description |
index | int |
Type | Description |
UsageRule.Builder |
build()
public Usage build()
Type | Description |
Usage |
buildPartial()
public Usage buildPartial()
Type | Description |
Usage |
clear()
public Usage.Builder clear()
Type | Description |
Usage.Builder |
clearField(Descriptors.FieldDescriptor field)
public Usage.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
Usage.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public Usage.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
Usage.Builder |
clearProducerNotificationChannel()
public Usage.Builder 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 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;
Type | Description |
Usage.Builder | This builder for chaining. |
clearRequirements()
public Usage.Builder 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;
Type | Description |
Usage.Builder | This builder for chaining. |
clearRules()
public Usage.Builder 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;
Type | Description |
Usage.Builder |
clone()
public Usage.Builder clone()
Type | Description |
Usage.Builder |
getDefaultInstanceForType()
public Usage getDefaultInstanceForType()
Type | Description |
Usage |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getProducerNotificationChannel()
public String 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 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;
Type | Description |
String | The producerNotificationChannel. |
getProducerNotificationChannelBytes()
public 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 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;
Type | Description |
ByteString | The bytes for producerNotificationChannel. |
getRequirements(int index)
public String getRequirements(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;
Name | Description |
index | int The index of the element to return. |
Type | Description |
String | The requirements at the given index. |
getRequirementsBytes(int index)
public 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;
Name | Description |
index | int The index of the value to return. |
Type | Description |
ByteString | The bytes of the requirements at the given index. |
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;
Type | Description |
int | The count of requirements. |
getRequirementsList()
public 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;
Type | Description |
ProtocolStringList | A list containing the requirements. |
getRules(int index)
public UsageRule getRules(int index)
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;
Name | Description |
index | int |
Type | Description |
UsageRule |
getRulesBuilder(int index)
public UsageRule.Builder getRulesBuilder(int index)
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;
Name | Description |
index | int |
Type | Description |
UsageRule.Builder |
getRulesBuilderList()
public List<UsageRule.Builder> 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;
Type | Description |
List<Builder> |
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;
Type | Description |
int |
getRulesList()
public List<UsageRule> 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;
Type | Description |
List<UsageRule> |
getRulesOrBuilder(int index)
public UsageRuleOrBuilder getRulesOrBuilder(int index)
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;
Name | Description |
index | int |
Type | Description |
UsageRuleOrBuilder |
getRulesOrBuilderList()
public List<? extends UsageRuleOrBuilder> 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;
Type | Description |
List<? extends com.google.api.UsageRuleOrBuilder> |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(Usage other)
public Usage.Builder mergeFrom(Usage other)
Name | Description |
other | Usage |
Type | Description |
Usage.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Usage.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Usage.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public Usage.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
Usage.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Usage.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Usage.Builder |
removeRules(int index)
public Usage.Builder removeRules(int index)
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;
Name | Description |
index | int |
Type | Description |
Usage.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Usage.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Usage.Builder |
setProducerNotificationChannel(String value)
public Usage.Builder setProducerNotificationChannel(String value)
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 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;
Name | Description |
value | String The producerNotificationChannel to set. |
Type | Description |
Usage.Builder | This builder for chaining. |
setProducerNotificationChannelBytes(ByteString value)
public Usage.Builder setProducerNotificationChannelBytes(ByteString value)
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 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;
Name | Description |
value | ByteString The bytes for producerNotificationChannel to set. |
Type | Description |
Usage.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Usage.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
Usage.Builder |
setRequirements(int index, String value)
public Usage.Builder setRequirements(int index, String value)
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;
Name | Description |
index | int The index to set the value at. |
value | String The requirements to set. |
Type | Description |
Usage.Builder | This builder for chaining. |
setRules(int index, UsageRule value)
public Usage.Builder setRules(int index, UsageRule value)
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;
Name | Description |
index | int |
value | UsageRule |
Type | Description |
Usage.Builder |
setRules(int index, UsageRule.Builder builderForValue)
public Usage.Builder setRules(int index, UsageRule.Builder builderForValue)
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;
Name | Description |
index | int |
builderForValue | UsageRule.Builder |
Type | Description |
Usage.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Usage.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Usage.Builder |