com.google.api.ControlKt.kt Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/control.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.api;
@kotlin.jvm.JvmName("-initializecontrol")
public inline fun control(block: com.google.api.ControlKt.Dsl.() -> kotlin.Unit): com.google.api.Control =
com.google.api.ControlKt.Dsl._create(com.google.api.Control.newBuilder()).apply { block() }._build()
/**
* ```
* Selects and configures the service controller used by the service. The
* service controller handles features like abuse, quota, billing, logging,
* monitoring, etc.
* ```
*
* Protobuf type `google.api.Control`
*/
public object ControlKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: com.google.api.Control.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.api.Control.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.api.Control = _builder.build()
/**
* ```
* The service control environment to use. If empty, no control plane
* feature (like quota and billing) will be enabled.
* ```
*
* `string environment = 1;`
*/
public var environment: kotlin.String
@JvmName("getEnvironment")
get() = _builder.getEnvironment()
@JvmName("setEnvironment")
set(value) {
_builder.setEnvironment(value)
}
/**
* ```
* The service control environment to use. If empty, no control plane
* feature (like quota and billing) will be enabled.
* ```
*
* `string environment = 1;`
*/
public fun clearEnvironment() {
_builder.clearEnvironment()
}
}
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.api.Control.copy(block: `com.google.api`.ControlKt.Dsl.() -> kotlin.Unit): com.google.api.Control =
`com.google.api`.ControlKt.Dsl._create(this.toBuilder()).apply { block() }._build()