com.google.protobuf.FieldKt.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protobuf-kotlin-lite Show documentation
Show all versions of protobuf-kotlin-lite Show documentation
Kotlin lite Protocol Buffers library. Protocol Buffers are a way of encoding structured data in an
efficient yet extensible format.
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/protobuf/type.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.protobuf;
@kotlin.jvm.JvmName("-initializefield")
public inline fun field(block: com.google.protobuf.FieldKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Field =
com.google.protobuf.FieldKt.Dsl._create(com.google.protobuf.Field.newBuilder()).apply { block() }._build()
/**
* Protobuf type `google.protobuf.Field`
*/
public object FieldKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: com.google.protobuf.Field.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.protobuf.Field.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.protobuf.Field = _builder.build()
/**
* `.google.protobuf.Field.Kind kind = 1 [json_name = "kind"];`
*/
public var kind: com.google.protobuf.Field.Kind
@kotlin.jvm.JvmName("getKind")
get() = _builder.kind
@kotlin.jvm.JvmName("setKind")
set(value) {
_builder.kind = value
}
public var kindValue: kotlin.Int
@kotlin.jvm.JvmName("getKindValue")
get() = _builder.kindValue
@kotlin.jvm.JvmName("setKindValue")
set(value) {
_builder.kindValue = value
}
/**
* `.google.protobuf.Field.Kind kind = 1 [json_name = "kind"];`
*/
public fun clearKind() {
_builder.clearKind()
}
/**
* `.google.protobuf.Field.Cardinality cardinality = 2 [json_name = "cardinality"];`
*/
public var cardinality: com.google.protobuf.Field.Cardinality
@kotlin.jvm.JvmName("getCardinality")
get() = _builder.cardinality
@kotlin.jvm.JvmName("setCardinality")
set(value) {
_builder.cardinality = value
}
public var cardinalityValue: kotlin.Int
@kotlin.jvm.JvmName("getCardinalityValue")
get() = _builder.cardinalityValue
@kotlin.jvm.JvmName("setCardinalityValue")
set(value) {
_builder.cardinalityValue = value
}
/**
* `.google.protobuf.Field.Cardinality cardinality = 2 [json_name = "cardinality"];`
*/
public fun clearCardinality() {
_builder.clearCardinality()
}
/**
* int32 number = 3 [json_name = "number"];
*/
public var number: kotlin.Int
@kotlin.jvm.JvmName("getNumber")
get() = _builder.number
@kotlin.jvm.JvmName("setNumber")
set(value) {
_builder.number = value
}
/**
* `int32 number = 3 [json_name = "number"];`
*/
public fun clearNumber() {
_builder.clearNumber()
}
/**
* `string name = 4 [json_name = "name"];`
*/
public var name: kotlin.String
@kotlin.jvm.JvmName("getName")
get() = _builder.name
@kotlin.jvm.JvmName("setName")
set(value) {
_builder.name = value
}
/**
* `string name = 4 [json_name = "name"];`
*/
public fun clearName() {
_builder.clearName()
}
/**
* `string type_url = 6 [json_name = "typeUrl"];`
*/
public var typeUrl: kotlin.String
@kotlin.jvm.JvmName("getTypeUrl")
get() = _builder.typeUrl
@kotlin.jvm.JvmName("setTypeUrl")
set(value) {
_builder.typeUrl = value
}
/**
* `string type_url = 6 [json_name = "typeUrl"];`
*/
public fun clearTypeUrl() {
_builder.clearTypeUrl()
}
/**
* int32 oneof_index = 7 [json_name = "oneofIndex"];
*/
public var oneofIndex: kotlin.Int
@kotlin.jvm.JvmName("getOneofIndex")
get() = _builder.oneofIndex
@kotlin.jvm.JvmName("setOneofIndex")
set(value) {
_builder.oneofIndex = value
}
/**
* `int32 oneof_index = 7 [json_name = "oneofIndex"];`
*/
public fun clearOneofIndex() {
_builder.clearOneofIndex()
}
/**
* bool packed = 8 [json_name = "packed"];
*/
public var packed: kotlin.Boolean
@kotlin.jvm.JvmName("getPacked")
get() = _builder.packed
@kotlin.jvm.JvmName("setPacked")
set(value) {
_builder.packed = value
}
/**
* `bool packed = 8 [json_name = "packed"];`
*/
public fun clearPacked() {
_builder.clearPacked()
}
/**
* An uninstantiable, behaviorless type to represent the field in
* generics.
*/
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
public class OptionsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
/**
* `repeated .google.protobuf.Option options = 9 [json_name = "options"];`
*/
public val options: com.google.protobuf.kotlin.DslList
@kotlin.jvm.JvmSynthetic
get() = com.google.protobuf.kotlin.DslList(
_builder.optionsList
)
/**
* `repeated .google.protobuf.Option options = 9 [json_name = "options"];`
* @param value The options to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addOptions")
public fun com.google.protobuf.kotlin.DslList.add(value: com.google.protobuf.Option) {
_builder.addOptions(value)
}
/**
* `repeated .google.protobuf.Option options = 9 [json_name = "options"];`
* @param value The options to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignOptions")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.protobuf.Option) {
add(value)
}
/**
* `repeated .google.protobuf.Option options = 9 [json_name = "options"];`
* @param values The options to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addAllOptions")
public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
_builder.addAllOptions(values)
}
/**
* `repeated .google.protobuf.Option options = 9 [json_name = "options"];`
* @param values The options to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignAllOptions")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
addAll(values)
}
/**
* `repeated .google.protobuf.Option options = 9 [json_name = "options"];`
* @param index The index to set the value at.
* @param value The options to set.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("setOptions")
public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.protobuf.Option) {
_builder.setOptions(index, value)
}
/**
* `repeated .google.protobuf.Option options = 9 [json_name = "options"];`
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("clearOptions")
public fun com.google.protobuf.kotlin.DslList.clear() {
_builder.clearOptions()
}
/**
* `string json_name = 10 [json_name = "jsonName"];`
*/
public var jsonName: kotlin.String
@kotlin.jvm.JvmName("getJsonName")
get() = _builder.jsonName
@kotlin.jvm.JvmName("setJsonName")
set(value) {
_builder.jsonName = value
}
/**
* `string json_name = 10 [json_name = "jsonName"];`
*/
public fun clearJsonName() {
_builder.clearJsonName()
}
/**
* `string default_value = 11 [json_name = "defaultValue"];`
*/
public var defaultValue: kotlin.String
@kotlin.jvm.JvmName("getDefaultValue")
get() = _builder.defaultValue
@kotlin.jvm.JvmName("setDefaultValue")
set(value) {
_builder.defaultValue = value
}
/**
* `string default_value = 11 [json_name = "defaultValue"];`
*/
public fun clearDefaultValue() {
_builder.clearDefaultValue()
}
}
}
public inline fun com.google.protobuf.Field.copy(block: `com.google.protobuf`.FieldKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Field =
`com.google.protobuf`.FieldKt.Dsl._create(this.toBuilder()).apply { block() }._build()
© 2015 - 2024 Weber Informatics LLC | Privacy Policy