com.google.protobuf.StructKt.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protobuf-kotlin Show documentation
Show all versions of protobuf-kotlin Show documentation
Kotlin core Protocol Buffers library. Protocol Buffers are a way of encoding structured data in an
efficient yet extensible format.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/protobuf/struct.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.protobuf;
@kotlin.jvm.JvmName("-initializestruct")
public inline fun struct(block: com.google.protobuf.StructKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Struct =
com.google.protobuf.StructKt.Dsl._create(com.google.protobuf.Struct.newBuilder()).apply { block() }._build()
/**
* Protobuf type `google.protobuf.Struct`
*/
public object StructKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: com.google.protobuf.Struct.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.protobuf.Struct.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.protobuf.Struct = _builder.build()
/**
* An uninstantiable, behaviorless type to represent the field in
* generics.
*/
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
public class FieldsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
/**
* `map fields = 1 [json_name = "fields"];`
*/
public val fields: com.google.protobuf.kotlin.DslMap
@kotlin.jvm.JvmSynthetic
@JvmName("getFieldsMap")
get() = com.google.protobuf.kotlin.DslMap(
_builder.getFieldsMap()
)
/**
* `map fields = 1 [json_name = "fields"];`
*/
@JvmName("putFields")
public fun com.google.protobuf.kotlin.DslMap
.put(key: kotlin.String, value: com.google.protobuf.Value) {
_builder.putFields(key, value)
}
/**
* `map fields = 1 [json_name = "fields"];`
*/
@kotlin.jvm.JvmSynthetic
@JvmName("setFields")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslMap
.set(key: kotlin.String, value: com.google.protobuf.Value) {
put(key, value)
}
/**
* `map fields = 1 [json_name = "fields"];`
*/
@kotlin.jvm.JvmSynthetic
@JvmName("removeFields")
public fun com.google.protobuf.kotlin.DslMap
.remove(key: kotlin.String) {
_builder.removeFields(key)
}
/**
* `map fields = 1 [json_name = "fields"];`
*/
@kotlin.jvm.JvmSynthetic
@JvmName("putAllFields")
public fun com.google.protobuf.kotlin.DslMap
.putAll(map: kotlin.collections.Map) {
_builder.putAllFields(map)
}
/**
* `map fields = 1 [json_name = "fields"];`
*/
@kotlin.jvm.JvmSynthetic
@JvmName("clearFields")
public fun com.google.protobuf.kotlin.DslMap
.clear() {
_builder.clearFields()
}
}
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.protobuf.Struct.copy(block: `com.google.protobuf`.StructKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Struct =
`com.google.protobuf`.StructKt.Dsl._create(this.toBuilder()).apply { block() }._build()