protobuf_unittest.TestAnyKt.kt Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/any_test.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package protobuf_unittest;
@kotlin.jvm.JvmName("-initializetestAny")
public inline fun testAny(block: protobuf_unittest.TestAnyKt.Dsl.() -> kotlin.Unit): protobuf_unittest.TestAnyProto.TestAny =
protobuf_unittest.TestAnyKt.Dsl._create(protobuf_unittest.TestAnyProto.TestAny.newBuilder()).apply { block() }._build()
/**
* Protobuf type `protobuf_unittest.TestAny`
*/
public object TestAnyKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: protobuf_unittest.TestAnyProto.TestAny.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: protobuf_unittest.TestAnyProto.TestAny.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): protobuf_unittest.TestAnyProto.TestAny = _builder.build()
/**
* `int32 int32_value = 1;`
*/
public var int32Value: kotlin.Int
@JvmName("getInt32Value")
get() = _builder.getInt32Value()
@JvmName("setInt32Value")
set(value) {
_builder.setInt32Value(value)
}
/**
* `int32 int32_value = 1;`
*/
public fun clearInt32Value() {
_builder.clearInt32Value()
}
/**
* `.google.protobuf.Any any_value = 2;`
*/
public var anyValue: com.google.protobuf.Any
@JvmName("getAnyValue")
get() = _builder.getAnyValue()
@JvmName("setAnyValue")
set(value) {
_builder.setAnyValue(value)
}
/**
* `.google.protobuf.Any any_value = 2;`
*/
public fun clearAnyValue() {
_builder.clearAnyValue()
}
/**
* `.google.protobuf.Any any_value = 2;`
* @return Whether the anyValue field is set.
*/
public fun hasAnyValue(): kotlin.Boolean {
return _builder.hasAnyValue()
}
/**
* An uninstantiable, behaviorless type to represent the field in
* generics.
*/
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
public class RepeatedAnyValueProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
/**
* `repeated .google.protobuf.Any repeated_any_value = 3;`
*/
public val repeatedAnyValue: com.google.protobuf.kotlin.DslList
@kotlin.jvm.JvmSynthetic
get() = com.google.protobuf.kotlin.DslList(
_builder.getRepeatedAnyValueList()
)
/**
* `repeated .google.protobuf.Any repeated_any_value = 3;`
* @param value The repeatedAnyValue to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addRepeatedAnyValue")
public fun com.google.protobuf.kotlin.DslList.add(value: com.google.protobuf.Any) {
_builder.addRepeatedAnyValue(value)
}
/**
* `repeated .google.protobuf.Any repeated_any_value = 3;`
* @param value The repeatedAnyValue to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignRepeatedAnyValue")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.protobuf.Any) {
add(value)
}
/**
* `repeated .google.protobuf.Any repeated_any_value = 3;`
* @param values The repeatedAnyValue to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addAllRepeatedAnyValue")
public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
_builder.addAllRepeatedAnyValue(values)
}
/**
* `repeated .google.protobuf.Any repeated_any_value = 3;`
* @param values The repeatedAnyValue to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignAllRepeatedAnyValue")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
addAll(values)
}
/**
* `repeated .google.protobuf.Any repeated_any_value = 3;`
* @param index The index to set the value at.
* @param value The repeatedAnyValue to set.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("setRepeatedAnyValue")
public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.protobuf.Any) {
_builder.setRepeatedAnyValue(index, value)
}
/**
* `repeated .google.protobuf.Any repeated_any_value = 3;`
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("clearRepeatedAnyValue")
public fun com.google.protobuf.kotlin.DslList.clear() {
_builder.clearRepeatedAnyValue()
}
/**
* `string text = 4;`
*/
public var text: kotlin.String
@JvmName("getText")
get() = _builder.getText()
@JvmName("setText")
set(value) {
_builder.setText(value)
}
/**
* `string text = 4;`
*/
public fun clearText() {
_builder.clearText()
}
}
}
@kotlin.jvm.JvmSynthetic
public inline fun protobuf_unittest.TestAnyProto.TestAny.copy(block: `protobuf_unittest`.TestAnyKt.Dsl.() -> kotlin.Unit): protobuf_unittest.TestAnyProto.TestAny =
`protobuf_unittest`.TestAnyKt.Dsl._create(this.toBuilder()).apply { block() }._build()
public val protobuf_unittest.TestAnyProto.TestAnyOrBuilder.anyValueOrNull: com.google.protobuf.Any?
get() = if (hasAnyValue()) getAnyValue() else null