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()
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
values |
Iterable<String> The requirements to add. |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
values |
Iterable<? extends com.google.api.UsageRule> |
Returns | |
---|---|
Type | Description |
Usage.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Usage.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value |
String The requirements to add. |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes of the requirements to add. |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value |
UsageRule |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
builderForValue |
UsageRule.Builder |
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
index |
int |
value |
UsageRule |
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
index |
int |
builderForValue |
UsageRule.Builder |
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
UsageRule.Builder |
build()
public Usage build()
Returns | |
---|---|
Type | Description |
Usage |
buildPartial()
public Usage buildPartial()
Returns | |
---|---|
Type | Description |
Usage |
clear()
public Usage.Builder clear()
Returns | |
---|---|
Type | Description |
Usage.Builder |
clearField(Descriptors.FieldDescriptor field)
public Usage.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
Usage.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public Usage.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
Usage.Builder |
clone()
public Usage.Builder clone()
Returns | |
---|---|
Type | Description |
Usage.Builder |
getDefaultInstanceForType()
public Usage getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
Usage |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
index |
int The index of the element to return. |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
index |
int The index of the value to return. |
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
List<? extends com.google.api.UsageRuleOrBuilder> |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(Usage other)
public Usage.Builder mergeFrom(Usage other)
Parameter | |
---|---|
Name | Description |
other |
Usage |
Returns | |
---|---|
Type | Description |
Usage.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Usage.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Usage.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public Usage.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
Usage.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Usage.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
Usage.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Usage.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value |
String The producerNotificationChannel to set. |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for producerNotificationChannel to set. |
Returns | |
---|---|
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)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
index |
int The index to set the value at. |
value |
String The requirements to set. |
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
index |
int |
value |
UsageRule |
Returns | |
---|---|
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;
Parameters | |
---|---|
Name | Description |
index |
int |
builderForValue |
UsageRule.Builder |
Returns | |
---|---|
Type | Description |
Usage.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Usage.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Usage.Builder |