com.google.protobuf.ApiKt.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.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/protobuf/api.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.protobuf;
@kotlin.jvm.JvmName("-initializeapi")
public inline fun api(block: com.google.protobuf.ApiKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Api =
com.google.protobuf.ApiKt.Dsl._create(com.google.protobuf.Api.newBuilder()).apply { block() }._build()
/**
* Protobuf type `google.protobuf.Api`
*/
public object ApiKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: com.google.protobuf.Api.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.protobuf.Api.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.protobuf.Api = _builder.build()
/**
* `string name = 1 [json_name = "name"];`
*/
public var name: kotlin.String
@JvmName("getName")
get() = _builder.name
@JvmName("setName")
set(value) {
_builder.name = value
}
/**
* `string name = 1 [json_name = "name"];`
*/
public fun clearName() {
_builder.clearName()
}
/**
* An uninstantiable, behaviorless type to represent the field in
* generics.
*/
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
public class MethodsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
/**
* `repeated .google.protobuf.Method methods = 2 [json_name = "methods"];`
*/
public val methods: com.google.protobuf.kotlin.DslList
@kotlin.jvm.JvmSynthetic
get() = com.google.protobuf.kotlin.DslList(
_builder.methodsList
)
/**
* `repeated .google.protobuf.Method methods = 2 [json_name = "methods"];`
* @param value The methods to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addMethods")
public fun com.google.protobuf.kotlin.DslList.add(value: com.google.protobuf.Method) {
_builder.addMethods(value)
}
/**
* `repeated .google.protobuf.Method methods = 2 [json_name = "methods"];`
* @param value The methods to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignMethods")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.protobuf.Method) {
add(value)
}
/**
* `repeated .google.protobuf.Method methods = 2 [json_name = "methods"];`
* @param values The methods to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addAllMethods")
public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
_builder.addAllMethods(values)
}
/**
* `repeated .google.protobuf.Method methods = 2 [json_name = "methods"];`
* @param values The methods to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignAllMethods")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
addAll(values)
}
/**
* `repeated .google.protobuf.Method methods = 2 [json_name = "methods"];`
* @param index The index to set the value at.
* @param value The methods to set.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("setMethods")
public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.protobuf.Method) {
_builder.setMethods(index, value)
}
/**
* `repeated .google.protobuf.Method methods = 2 [json_name = "methods"];`
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("clearMethods")
public fun com.google.protobuf.kotlin.DslList.clear() {
_builder.clearMethods()
}
/**
* 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 = 3 [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 = 3 [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 = 3 [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 = 3 [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 = 3 [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 = 3 [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 = 3 [json_name = "options"];`
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("clearOptions")
public fun com.google.protobuf.kotlin.DslList.clear() {
_builder.clearOptions()
}
/**
* `string version = 4 [json_name = "version"];`
*/
public var version: kotlin.String
@JvmName("getVersion")
get() = _builder.version
@JvmName("setVersion")
set(value) {
_builder.version = value
}
/**
* `string version = 4 [json_name = "version"];`
*/
public fun clearVersion() {
_builder.clearVersion()
}
/**
* `.google.protobuf.SourceContext source_context = 5 [json_name = "sourceContext"];`
*/
public var sourceContext: com.google.protobuf.SourceContext
@JvmName("getSourceContext")
get() = _builder.sourceContext
@JvmName("setSourceContext")
set(value) {
_builder.sourceContext = value
}
/**
* `.google.protobuf.SourceContext source_context = 5 [json_name = "sourceContext"];`
*/
public fun clearSourceContext() {
_builder.clearSourceContext()
}
/**
* `.google.protobuf.SourceContext source_context = 5 [json_name = "sourceContext"];`
* @return Whether the sourceContext field is set.
*/
public fun hasSourceContext(): kotlin.Boolean {
return _builder.hasSourceContext()
}
public val ApiKt.Dsl.sourceContextOrNull: com.google.protobuf.SourceContext?
get() = _builder.sourceContextOrNull
/**
* An uninstantiable, behaviorless type to represent the field in
* generics.
*/
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
public class MixinsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
/**
* `repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];`
*/
public val mixins: com.google.protobuf.kotlin.DslList
@kotlin.jvm.JvmSynthetic
get() = com.google.protobuf.kotlin.DslList(
_builder.mixinsList
)
/**
* `repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];`
* @param value The mixins to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addMixins")
public fun com.google.protobuf.kotlin.DslList.add(value: com.google.protobuf.Mixin) {
_builder.addMixins(value)
}
/**
* `repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];`
* @param value The mixins to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignMixins")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.protobuf.Mixin) {
add(value)
}
/**
* `repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];`
* @param values The mixins to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("addAllMixins")
public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
_builder.addAllMixins(values)
}
/**
* `repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];`
* @param values The mixins to add.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("plusAssignAllMixins")
@Suppress("NOTHING_TO_INLINE")
public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
addAll(values)
}
/**
* `repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];`
* @param index The index to set the value at.
* @param value The mixins to set.
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("setMixins")
public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.protobuf.Mixin) {
_builder.setMixins(index, value)
}
/**
* `repeated .google.protobuf.Mixin mixins = 6 [json_name = "mixins"];`
*/
@kotlin.jvm.JvmSynthetic
@kotlin.jvm.JvmName("clearMixins")
public fun com.google.protobuf.kotlin.DslList.clear() {
_builder.clearMixins()
}
/**
* `.google.protobuf.Syntax syntax = 7 [json_name = "syntax"];`
*/
public var syntax: com.google.protobuf.Syntax
@JvmName("getSyntax")
get() = _builder.syntax
@JvmName("setSyntax")
set(value) {
_builder.syntax = value
}
public var syntaxValue: kotlin.Int
@JvmName("getSyntaxValue")
get() = _builder.syntaxValue
@JvmName("setSyntaxValue")
set(value) {
_builder.syntaxValue = value
}
/**
* `.google.protobuf.Syntax syntax = 7 [json_name = "syntax"];`
*/
public fun clearSyntax() {
_builder.clearSyntax()
}
}
}
public inline fun com.google.protobuf.Api.copy(block: `com.google.protobuf`.ApiKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Api =
`com.google.protobuf`.ApiKt.Dsl._create(this.toBuilder()).apply { block() }._build()
public val com.google.protobuf.ApiOrBuilder.sourceContextOrNull: com.google.protobuf.SourceContext?
get() = if (hasSourceContext()) getSourceContext() else null