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.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()
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>
|
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;
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;
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;
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;
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;
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 |
Name |
Description |
index |
int
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Billing.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
buildPartial()
public Billing buildPartial()
clear()
public Billing.Builder clear()
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;
clearField(Descriptors.FieldDescriptor field)
public Billing.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public Billing.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public Billing.Builder clone()
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 |
Name |
Description |
index |
int
|
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 |
Name |
Description |
index |
int
|
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;
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 |
Type |
Description |
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;
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 |
Name |
Description |
index |
int
|
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()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(Billing other)
public Billing.Builder mergeFrom(Billing other)
Parameter |
Name |
Description |
other |
Billing
|
public Billing.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Billing.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Billing.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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 |
Name |
Description |
index |
int
|
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;
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;
setField(Descriptors.FieldDescriptor field, Object value)
public Billing.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Billing.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Billing.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides