All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.BillingKt.kt Maven / Gradle / Ivy

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/billing.proto

// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.api;

@kotlin.jvm.JvmName("-initializebilling")
public inline fun billing(block: com.google.api.BillingKt.Dsl.() -> kotlin.Unit): com.google.api.Billing =
  com.google.api.BillingKt.Dsl._create(com.google.api.Billing.newBuilder()).apply { block() }._build()
/**
 * ```
 * Billing related configuration of the service.
 *
 * The following example shows how to configure monitored resources and metrics
 * for billing:
 *
 *     monitored_resources:
 *     - type: library.googleapis.com/branch
 *       labels:
 *       - key: /city
 *         description: The city where the library branch is located in.
 *       - key: /name
 *         description: The name of the branch.
 *     metrics:
 *     - name: library.googleapis.com/book/borrowed_count
 *       metric_kind: DELTA
 *       value_type: INT64
 *     billing:
 *       consumer_destinations:
 *       - monitored_resource: library.googleapis.com/branch
 *         metrics:
 *         - library.googleapis.com/book/borrowed_count
 * ```
 *
 * Protobuf type `google.api.Billing`
 */
public object BillingKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.google.api.Billing.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.api.Billing.Builder): Dsl = Dsl(builder)
    }

    @kotlin.jvm.JvmSynthetic
    @kotlin.PublishedApi
    internal fun _build(): com.google.api.Billing = _builder.build()

    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class ConsumerDestinationsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * 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;`
     */
     public val consumerDestinations: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.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;`
     * @param value The consumerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addConsumerDestinations")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.google.api.Billing.BillingDestination) {
      _builder.addConsumerDestinations(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;`
     * @param value The consumerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignConsumerDestinations")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.api.Billing.BillingDestination) {
      add(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;`
     * @param values The consumerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllConsumerDestinations")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllConsumerDestinations(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;`
     * @param values The consumerDestinations to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllConsumerDestinations")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(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;`
     * @param index The index to set the value at.
     * @param value The consumerDestinations to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setConsumerDestinations")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.api.Billing.BillingDestination) {
      _builder.setConsumerDestinations(index, 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;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearConsumerDestinations")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearConsumerDestinations()
    }

  }
  @kotlin.jvm.JvmName("-initializebillingDestination")
  public inline fun billingDestination(block: com.google.api.BillingKt.BillingDestinationKt.Dsl.() -> kotlin.Unit): com.google.api.Billing.BillingDestination =
    com.google.api.BillingKt.BillingDestinationKt.Dsl._create(com.google.api.Billing.BillingDestination.newBuilder()).apply { block() }._build()
  /**
   * ```
   * Configuration of a specific billing destination (Currently only support
   * bill against consumer project).
   * ```
   *
   * Protobuf type `google.api.Billing.BillingDestination`
   */
  public object BillingDestinationKt {
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    @com.google.protobuf.kotlin.ProtoDslMarker
    public class Dsl private constructor(
      private val _builder: com.google.api.Billing.BillingDestination.Builder
    ) {
      public companion object {
        @kotlin.jvm.JvmSynthetic
        @kotlin.PublishedApi
        internal fun _create(builder: com.google.api.Billing.BillingDestination.Builder): Dsl = Dsl(builder)
      }

      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _build(): com.google.api.Billing.BillingDestination = _builder.build()

      /**
       * ```
       * The monitored resource type. The type must be defined in
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * ```
       *
       * `string monitored_resource = 1;`
       */
      public var monitoredResource: kotlin.String
        @JvmName("getMonitoredResource")
        get() = _builder.getMonitoredResource()
        @JvmName("setMonitoredResource")
        set(value) {
          _builder.setMonitoredResource(value)
        }
      /**
       * ```
       * The monitored resource type. The type must be defined in
       * [Service.monitored_resources][google.api.Service.monitored_resources] section.
       * ```
       *
       * `string monitored_resource = 1;`
       */
      public fun clearMonitoredResource() {
        _builder.clearMonitoredResource()
      }

      /**
       * An uninstantiable, behaviorless type to represent the field in
       * generics.
       */
      @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
      public class MetricsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
      /**
       * ```
       * Names of the metrics to report to this billing destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * ```
       *
       * `repeated string metrics = 2;`
       * @return A list containing the metrics.
       */
      public val metrics: com.google.protobuf.kotlin.DslList
        @kotlin.jvm.JvmSynthetic
        get() = com.google.protobuf.kotlin.DslList(
          _builder.getMetricsList()
        )
      /**
       * ```
       * Names of the metrics to report to this billing destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * ```
       *
       * `repeated string metrics = 2;`
       * @param value The metrics to add.
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("addMetrics")
      public fun com.google.protobuf.kotlin.DslList.add(value: kotlin.String) {
        _builder.addMetrics(value)
      }
      /**
       * ```
       * Names of the metrics to report to this billing destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * ```
       *
       * `repeated string metrics = 2;`
       * @param value The metrics to add.
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("plusAssignMetrics")
      @Suppress("NOTHING_TO_INLINE")
      public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: kotlin.String) {
        add(value)
      }
      /**
       * ```
       * Names of the metrics to report to this billing destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * ```
       *
       * `repeated string metrics = 2;`
       * @param values The metrics to add.
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("addAllMetrics")
      public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
        _builder.addAllMetrics(values)
      }
      /**
       * ```
       * Names of the metrics to report to this billing destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * ```
       *
       * `repeated string metrics = 2;`
       * @param values The metrics to add.
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("plusAssignAllMetrics")
      @Suppress("NOTHING_TO_INLINE")
      public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
        addAll(values)
      }
      /**
       * ```
       * Names of the metrics to report to this billing destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * ```
       *
       * `repeated string metrics = 2;`
       * @param index The index to set the value at.
       * @param value The metrics to set.
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("setMetrics")
      public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: kotlin.String) {
        _builder.setMetrics(index, value)
      }/**
       * ```
       * Names of the metrics to report to this billing destination.
       * Each name must be defined in [Service.metrics][google.api.Service.metrics] section.
       * ```
       *
       * `repeated string metrics = 2;`
       */
      @kotlin.jvm.JvmSynthetic
      @kotlin.jvm.JvmName("clearMetrics")
      public fun com.google.protobuf.kotlin.DslList.clear() {
        _builder.clearMetrics()
      }}
  }
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.api.Billing.copy(block: `com.google.api`.BillingKt.Dsl.() -> kotlin.Unit): com.google.api.Billing =
  `com.google.api`.BillingKt.Dsl._create(this.toBuilder()).apply { block() }._build()

@kotlin.jvm.JvmSynthetic
public inline fun com.google.api.Billing.BillingDestination.copy(block: `com.google.api`.BillingKt.BillingDestinationKt.Dsl.() -> kotlin.Unit): com.google.api.Billing.BillingDestination =
  `com.google.api`.BillingKt.BillingDestinationKt.Dsl._create(this.toBuilder()).apply { block() }._build()





© 2015 - 2024 Weber Informatics LLC | Privacy Policy