com.google.api.HttpKt.kt Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/http.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.api;
@kotlin.jvm.JvmName("-initializehttp")
public inline fun http(block: com.google.api.HttpKt.Dsl.() -> kotlin.Unit): com.google.api.Http =
com.google.api.HttpKt.Dsl._create(com.google.api.Http.newBuilder()).apply { block() }._build()
/**
* ```
* Defines the HTTP configuration for an API service. It contains a list of
* [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
* to one or more HTTP REST API methods.
* ```
*
* Protobuf type `google.api.Http`
*/
public object HttpKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: com.google.api.Http.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.api.Http.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.api.Http = _builder.build()
/**
* 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 HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* ```
*
* `repeated .google.api.HttpRule rules = 1;`
*/
public val rules: com.google.protobuf.kotlin.DslList
@kotlin.jvm.JvmSynthetic
get() = com.google.protobuf.kotlin.DslList(
_builder.getRulesList()
)
/**
* ```
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* ```
*
* `repeated .google.api.HttpRule rules = 1;`
* @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.HttpRule) {
_builder.addRules(value)
}
/**
* ```
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* ```
*
* `repeated .google.api.HttpRule rules = 1;`
* @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.HttpRule) {
add(value)
}
/**
* ```
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* ```
*
* `repeated .google.api.HttpRule rules = 1;`
* @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 HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* ```
*
* `repeated .google.api.HttpRule rules = 1;`
* @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 HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* ```
*
* `repeated .google.api.HttpRule rules = 1;`
* @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.HttpRule) {
_builder.setRules(index, value)
}
/**
* ```
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
* ```
*
* `repeated .google.api.HttpRule rules = 1;`
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("clearRules")
public fun com.google.protobuf.kotlin.DslList.clear() {
_builder.clearRules()
}
/**
* ```
* When set to true, URL path parmeters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
*
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
* ```
*
* `bool fully_decode_reserved_expansion = 2;`
*/
public var fullyDecodeReservedExpansion: kotlin.Boolean
@JvmName("getFullyDecodeReservedExpansion")
get() = _builder.getFullyDecodeReservedExpansion()
@JvmName("setFullyDecodeReservedExpansion")
set(value) {
_builder.setFullyDecodeReservedExpansion(value)
}
/**
* ```
* When set to true, URL path parmeters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
*
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
* ```
*
* `bool fully_decode_reserved_expansion = 2;`
*/
public fun clearFullyDecodeReservedExpansion() {
_builder.clearFullyDecodeReservedExpansion()
}
}
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.api.Http.copy(block: `com.google.api`.HttpKt.Dsl.() -> kotlin.Unit): com.google.api.Http =
`com.google.api`.HttpKt.Dsl._create(this.toBuilder()).apply { block() }._build()