com.google.api.ProjectPropertiesKt.kt Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/consumer.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.api;
@kotlin.jvm.JvmName("-initializeprojectProperties")
public inline fun projectProperties(block: com.google.api.ProjectPropertiesKt.Dsl.() -> kotlin.Unit): com.google.api.ProjectProperties =
com.google.api.ProjectPropertiesKt.Dsl._create(com.google.api.ProjectProperties.newBuilder()).apply { block() }._build()
/**
* ```
* A descriptor for defining project properties for a service. One service may
* have many consumer projects, and the service may want to behave differently
* depending on some properties on the project. For example, a project may be
* associated with a school, or a business, or a government agency, a business
* type property on the project may affect how a service responds to the client.
* This descriptor defines which properties are allowed to be set on a project.
*
* Example:
*
* project_properties:
* properties:
* - name: NO_WATERMARK
* type: BOOL
* description: Allows usage of the API without watermarks.
* - name: EXTENDED_TILE_CACHE_PERIOD
* type: INT64
* ```
*
* Protobuf type `google.api.ProjectProperties`
*/
public object ProjectPropertiesKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: com.google.api.ProjectProperties.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.api.ProjectProperties.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.api.ProjectProperties = _builder.build()
/**
* An uninstantiable, behaviorless type to represent the field in
* generics.
*/
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
public class PropertiesProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
/**
* ```
* List of per consumer project-specific properties.
* ```
*
* `repeated .google.api.Property properties = 1;`
*/
public val properties: com.google.protobuf.kotlin.DslList
@kotlin.jvm.JvmSynthetic
get() = com.google.protobuf.kotlin.DslList(
_builder.getPropertiesList()
)
/**
* ```
* List of per consumer project-specific properties.
* ```
*
* `repeated .google.api.Property properties = 1;`
* @param value The properties to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addProperties")
public fun com.google.protobuf.kotlin.DslList.add(value: com.google.api.Property) {
_builder.addProperties(value)
}
/**
* ```
* List of per consumer project-specific properties.
* ```
*
* `repeated .google.api.Property properties = 1;`
* @param value The properties to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignProperties")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.api.Property) {
add(value)
}
/**
* ```
* List of per consumer project-specific properties.
* ```
*
* `repeated .google.api.Property properties = 1;`
* @param values The properties to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addAllProperties")
public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
_builder.addAllProperties(values)
}
/**
* ```
* List of per consumer project-specific properties.
* ```
*
* `repeated .google.api.Property properties = 1;`
* @param values The properties to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignAllProperties")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
addAll(values)
}
/**
* ```
* List of per consumer project-specific properties.
* ```
*
* `repeated .google.api.Property properties = 1;`
* @param index The index to set the value at.
* @param value The properties to set.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("setProperties")
public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.api.Property) {
_builder.setProperties(index, value)
}
/**
* ```
* List of per consumer project-specific properties.
* ```
*
* `repeated .google.api.Property properties = 1;`
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("clearProperties")
public fun com.google.protobuf.kotlin.DslList.clear() {
_builder.clearProperties()
}
}
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.api.ProjectProperties.copy(block: `com.google.api`.ProjectPropertiesKt.Dsl.() -> kotlin.Unit): com.google.api.ProjectProperties =
`com.google.api`.ProjectPropertiesKt.Dsl._create(this.toBuilder()).apply { block() }._build()