Class Billing.Builder (2.37.1)

public static final class Billing.Builder extends GeneratedMessageV3.Builder<Billing.Builder> implements BillingOrBuilder

Billing related configuration of the service.

The following example shows how to configure monitored resources and metrics for billing, consumer_destinations is the only supported destination and the monitored resources need at least one label key cloud.googleapis.com/location to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently:

 monitored_resources:
 - type: library.googleapis.com/billing_branch
   labels:
   - key: cloud.googleapis.com/location
     description: |
       Predefined label to support billing location restriction.
   - key: city
     description: |
       Custom label to define the city where the library branch is located
       in.
   - key: name
     description: Custom label to define the name of the library branch.
 metrics:
 - name: library.googleapis.com/book/borrowed_count
   metric_kind: DELTA
   value_type: INT64
   unit: "1"
 billing:
   consumer_destinations:
   - monitored_resource: library.googleapis.com/billing_branch
     metrics:
     - library.googleapis.com/book/borrowed_count

Protobuf type google.api.Billing

Implements

BillingOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllConsumerDestinations(Iterable<? extends Billing.BillingDestination> values)

public Billing.Builder addAllConsumerDestinations(Iterable<? extends Billing.BillingDestination> values)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameter
NameDescription
valuesIterable<? extends com.google.api.Billing.BillingDestination>
Returns
TypeDescription
Billing.Builder

addConsumerDestinations(Billing.BillingDestination value)

public Billing.Builder addConsumerDestinations(Billing.BillingDestination value)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameter
NameDescription
valueBilling.BillingDestination
Returns
TypeDescription
Billing.Builder

addConsumerDestinations(Billing.BillingDestination.Builder builderForValue)

public Billing.Builder addConsumerDestinations(Billing.BillingDestination.Builder builderForValue)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameter
NameDescription
builderForValueBilling.BillingDestination.Builder
Returns
TypeDescription
Billing.Builder

addConsumerDestinations(int index, Billing.BillingDestination value)

public Billing.Builder addConsumerDestinations(int index, Billing.BillingDestination value)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameters
NameDescription
indexint
valueBilling.BillingDestination
Returns
TypeDescription
Billing.Builder

addConsumerDestinations(int index, Billing.BillingDestination.Builder builderForValue)

public Billing.Builder addConsumerDestinations(int index, Billing.BillingDestination.Builder builderForValue)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameters
NameDescription
indexint
builderForValueBilling.BillingDestination.Builder
Returns
TypeDescription
Billing.Builder

addConsumerDestinationsBuilder()

public Billing.BillingDestination.Builder addConsumerDestinationsBuilder()

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Returns
TypeDescription
Billing.BillingDestination.Builder

addConsumerDestinationsBuilder(int index)

public Billing.BillingDestination.Builder addConsumerDestinationsBuilder(int index)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Billing.BillingDestination.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Billing build()
Returns
TypeDescription
Billing

buildPartial()

public Billing buildPartial()
Returns
TypeDescription
Billing

clear()

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

clearConsumerDestinations()

public Billing.Builder clearConsumerDestinations()

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Returns
TypeDescription
Billing.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getConsumerDestinations(int index)

public Billing.BillingDestination getConsumerDestinations(int index)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Billing.BillingDestination

getConsumerDestinationsBuilder(int index)

public Billing.BillingDestination.Builder getConsumerDestinationsBuilder(int index)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Billing.BillingDestination.Builder

getConsumerDestinationsBuilderList()

public List<Billing.BillingDestination.Builder> getConsumerDestinationsBuilderList()

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Returns
TypeDescription
List<Builder>

getConsumerDestinationsCount()

public int getConsumerDestinationsCount()

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Returns
TypeDescription
int

getConsumerDestinationsList()

public List<Billing.BillingDestination> getConsumerDestinationsList()

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Returns
TypeDescription
List<BillingDestination>

getConsumerDestinationsOrBuilder(int index)

public Billing.BillingDestinationOrBuilder getConsumerDestinationsOrBuilder(int index)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Billing.BillingDestinationOrBuilder

getConsumerDestinationsOrBuilderList()

public List<? extends Billing.BillingDestinationOrBuilder> getConsumerDestinationsOrBuilderList()

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Returns
TypeDescription
List<? extends com.google.api.Billing.BillingDestinationOrBuilder>

getDefaultInstanceForType()

public Billing getDefaultInstanceForType()
Returns
TypeDescription
Billing

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Billing other)

public Billing.Builder mergeFrom(Billing other)
Parameter
NameDescription
otherBilling
Returns
TypeDescription
Billing.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeConsumerDestinations(int index)

public Billing.Builder removeConsumerDestinations(int index)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Billing.Builder

setConsumerDestinations(int index, Billing.BillingDestination value)

public Billing.Builder setConsumerDestinations(int index, Billing.BillingDestination value)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameters
NameDescription
indexint
valueBilling.BillingDestination
Returns
TypeDescription
Billing.Builder

setConsumerDestinations(int index, Billing.BillingDestination.Builder builderForValue)

public Billing.Builder setConsumerDestinations(int index, Billing.BillingDestination.Builder builderForValue)

Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

repeated .google.api.Billing.BillingDestination consumer_destinations = 8;

Parameters
NameDescription
indexint
builderForValueBilling.BillingDestination.Builder
Returns
TypeDescription
Billing.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Billing.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Billing.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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