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

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

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

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

@kotlin.jvm.JvmName("-initializeusage")
public inline fun usage(block: com.google.api.UsageKt.Dsl.() -> kotlin.Unit): com.google.api.Usage =
  com.google.api.UsageKt.Dsl._create(com.google.api.Usage.newBuilder()).apply { block() }._build()
/**
 * ```
 * Configuration controlling usage of a service.
 * ```
 *
 * Protobuf type `google.api.Usage`
 */
public object UsageKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.google.api.Usage.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.api.Usage.Builder): Dsl = Dsl(builder)
    }

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

    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class RequirementsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form /;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * ```
     *
     * `repeated string requirements = 1;`
     * @return A list containing the requirements.
     */
    public val requirements: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getRequirementsList()
      )
    /**
     * ```
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form /;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * ```
     *
     * `repeated string requirements = 1;`
     * @param value The requirements to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addRequirements")
    public fun com.google.protobuf.kotlin.DslList.add(value: kotlin.String) {
      _builder.addRequirements(value)
    }
    /**
     * ```
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form /;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * ```
     *
     * `repeated string requirements = 1;`
     * @param value The requirements to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignRequirements")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: kotlin.String) {
      add(value)
    }
    /**
     * ```
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form /;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * ```
     *
     * `repeated string requirements = 1;`
     * @param values The requirements to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllRequirements")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllRequirements(values)
    }
    /**
     * ```
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form /;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * ```
     *
     * `repeated string requirements = 1;`
     * @param values The requirements to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllRequirements")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form /;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * ```
     *
     * `repeated string requirements = 1;`
     * @param index The index to set the value at.
     * @param value The requirements to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setRequirements")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: kotlin.String) {
      _builder.setRequirements(index, value)
    }/**
     * ```
     * Requirements that must be satisfied before a consumer project can use the
     * service. Each requirement is of the form /;
     * for example 'serviceusage.googleapis.com/billing-enabled'.
     * ```
     *
     * `repeated string requirements = 1;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearRequirements")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearRequirements()
    }
    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class RulesProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * A list of usage rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.UsageRule rules = 6;`
     */
     public val rules: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getRulesList()
      )
    /**
     * ```
     * A list of usage rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.UsageRule rules = 6;`
     * @param value The rules to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addRules")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.google.api.UsageRule) {
      _builder.addRules(value)
    }
    /**
     * ```
     * A list of usage rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.UsageRule rules = 6;`
     * @param value The rules to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignRules")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.api.UsageRule) {
      add(value)
    }
    /**
     * ```
     * A list of usage rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.UsageRule rules = 6;`
     * @param values The rules to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllRules")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllRules(values)
    }
    /**
     * ```
     * A list of usage rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.UsageRule rules = 6;`
     * @param values The rules to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllRules")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * A list of usage rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.UsageRule rules = 6;`
     * @param index The index to set the value at.
     * @param value The rules to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setRules")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.api.UsageRule) {
      _builder.setRules(index, value)
    }
    /**
     * ```
     * A list of usage rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.UsageRule rules = 6;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearRules")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearRules()
    }


    /**
     * ```
     * The full resource name of a channel used for sending notifications to the
     * service producer.
     *
     * Google Service Management currently only supports
     * [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
     * channel. To use Google Cloud Pub/Sub as the channel, this must be the name
     * of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
     * documented in https://cloud.google.com/pubsub/docs/overview.
     * ```
     *
     * `string producer_notification_channel = 7;`
     */
    public var producerNotificationChannel: kotlin.String
      @JvmName("getProducerNotificationChannel")
      get() = _builder.getProducerNotificationChannel()
      @JvmName("setProducerNotificationChannel")
      set(value) {
        _builder.setProducerNotificationChannel(value)
      }
    /**
     * ```
     * The full resource name of a channel used for sending notifications to the
     * service producer.
     *
     * Google Service Management currently only supports
     * [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
     * channel. To use Google Cloud Pub/Sub as the channel, this must be the name
     * of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
     * documented in https://cloud.google.com/pubsub/docs/overview.
     * ```
     *
     * `string producer_notification_channel = 7;`
     */
    public fun clearProducerNotificationChannel() {
      _builder.clearProducerNotificationChannel()
    }
  }
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.api.Usage.copy(block: `com.google.api`.UsageKt.Dsl.() -> kotlin.Unit): com.google.api.Usage =
  `com.google.api`.UsageKt.Dsl._create(this.toBuilder()).apply { block() }._build()





© 2015 - 2024 Weber Informatics LLC | Privacy Policy