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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
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
Name | Description |
values | Iterable<? extends com.google.api.Billing.BillingDestination>
|
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
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
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Billing.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public Billing buildPartial()
Returns
clear()
public Billing.Builder clear()
Returns
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
clearField(Descriptors.FieldDescriptor field)
public Billing.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Billing.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public Billing.Builder clone()
Returns
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
Returns
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
Returns
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
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
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
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
Returns
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
Type | Description |
List<? extends com.google.api.Billing.BillingDestinationOrBuilder> | |
getDefaultInstanceForType()
public Billing getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(Billing other)
public Billing.Builder mergeFrom(Billing other)
Parameter
Returns
public Billing.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Billing.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Billing.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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
Returns
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
Returns
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
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Billing.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Billing.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Billing.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides