Class Billing (2.30.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
TypeDescription
int

Static Methods

getDefaultInstance()

public static Billing getDefaultInstance()
Returns
TypeDescription
Billing

getDescriptor()

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

newBuilder()

public static Billing.Builder newBuilder()
Returns
TypeDescription
Billing.Builder

newBuilder(Billing prototype)

public static Billing.Builder newBuilder(Billing prototype)
Parameter
NameDescription
prototypeBilling
Returns
TypeDescription
Billing.Builder

parseDelimitedFrom(InputStream input)

public static Billing parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Billing
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Billing parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Billing
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Billing parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Billing
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Billing parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Billing
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Billing parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Billing
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Billing parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Billing
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Billing parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Billing
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Billing parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Billing
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Billing parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Billing
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Billing parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Billing
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Billing parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Billing
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Billing parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Billing
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Billing> parser()
Returns
TypeDescription
Parser<Billing>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
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

getParserForType()

public Parser<Billing> getParserForType()
Returns
TypeDescription
Parser<Billing>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Billing.Builder newBuilderForType()
Returns
TypeDescription
Billing.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Billing.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Billing.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Billing.Builder toBuilder()
Returns
TypeDescription
Billing.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException