public final class Billing extends GeneratedMessageV3 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
Static Fields
CONSUMER_DESTINATIONS_FIELD_NUMBER
public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Billing getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Billing.Builder newBuilder()
Returns
newBuilder(Billing prototype)
public static Billing.Builder newBuilder(Billing prototype)
Parameter
Returns
public static Billing parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Billing parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Billing parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Billing parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Billing parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Billing parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Billing parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Billing parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Billing parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Billing parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Billing parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Billing parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Billing> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
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
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
getParserForType()
public Parser<Billing> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Billing.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Billing.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Billing.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions