Class Billing (2.49.0)

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

Implements

BillingOrBuilder

Static Fields

CONSUMER_DESTINATIONS_FIELD_NUMBER

public static final int CONSUMER_DESTINATIONS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Billing getDefaultInstance()
Returns
Type Description
Billing

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Billing.Builder newBuilder()
Returns
Type Description
Billing.Builder

newBuilder(Billing prototype)

public static Billing.Builder newBuilder(Billing prototype)
Parameter
Name Description
prototype Billing
Returns
Type Description
Billing.Builder

parseDelimitedFrom(InputStream input)

public static Billing parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Billing
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Billing parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Billing
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Billing parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Billing
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Billing parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Billing
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Billing parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Billing
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Billing parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Billing
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Billing parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Billing
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Billing parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Billing
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Billing parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Billing
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Billing parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Billing
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Billing parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Billing
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Billing parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Billing
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Billing> parser()
Returns
Type Description
Parser<Billing>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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
Returns
Type Description
Billing.BillingDestination

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;

Returns
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
List<? extends com.google.api.Billing.BillingDestinationOrBuilder>

getDefaultInstanceForType()

public Billing getDefaultInstanceForType()
Returns
Type Description
Billing

getParserForType()

public Parser<Billing> getParserForType()
Returns
Type Description
Parser<Billing>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Billing.Builder newBuilderForType()
Returns
Type Description
Billing.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Billing.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Billing.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Billing.Builder toBuilder()
Returns
Type Description
Billing.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException