Class Usage.Builder (2.9.5)

public static final class Usage.Builder extends GeneratedMessageV3.Builder<Usage.Builder> implements UsageOrBuilder

Configuration controlling usage of a service.

Protobuf type google.api.Usage

Implements

UsageOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The requirements to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.api.UsageRule>
Returns
TypeDescription
Usage.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Usage.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Usage.Builder
Overrides

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
NameDescription
valueString

The requirements to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the requirements to add.

Returns
TypeDescription
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
NameDescription
valueUsageRule
Returns
TypeDescription
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
NameDescription
builderForValueUsageRule.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueUsageRule
Returns
TypeDescription
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
NameDescription
indexint
builderForValueUsageRule.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
UsageRule.Builder

build()

public Usage build()
Returns
TypeDescription
Usage

buildPartial()

public Usage buildPartial()
Returns
TypeDescription
Usage

clear()

public Usage.Builder clear()
Returns
TypeDescription
Usage.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Usage.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Usage.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Usage.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Usage.Builder
Overrides

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
TypeDescription
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
TypeDescription
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
TypeDescription
Usage.Builder

clone()

public Usage.Builder clone()
Returns
TypeDescription
Usage.Builder
Overrides

getDefaultInstanceForType()

public Usage getDefaultInstanceForType()
Returns
TypeDescription
Usage

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.api.UsageRuleOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Usage other)

public Usage.Builder mergeFrom(Usage other)
Parameter
NameDescription
otherUsage
Returns
TypeDescription
Usage.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Usage.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Usage.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Usage.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Usage.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Usage.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Usage.Builder
Overrides

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
NameDescription
indexint
Returns
TypeDescription
Usage.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Usage.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Usage.Builder
Overrides

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
NameDescription
valueString

The producerNotificationChannel to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for producerNotificationChannel to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Usage.Builder
Overrides

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
NameDescription
indexint

The index to set the value at.

valueString

The requirements to set.

Returns
TypeDescription
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
NameDescription
indexint
valueUsageRule
Returns
TypeDescription
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
NameDescription
indexint
builderForValueUsageRule.Builder
Returns
TypeDescription
Usage.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Usage.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Usage.Builder
Overrides