com.google.protobuf.OneofDescriptorProtoKt.kt Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/descriptor.proto
// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.protobuf;
@kotlin.jvm.JvmName("-initializeoneofDescriptorProto")
public inline fun oneofDescriptorProto(block: com.google.protobuf.OneofDescriptorProtoKt.Dsl.() -> kotlin.Unit): com.google.protobuf.DescriptorProtos.OneofDescriptorProto =
com.google.protobuf.OneofDescriptorProtoKt.Dsl._create(com.google.protobuf.DescriptorProtos.OneofDescriptorProto.newBuilder()).apply { block() }._build()
/**
* ```
* Describes a oneof.
* ```
*
* Protobuf type `google.protobuf.OneofDescriptorProto`
*/
public object OneofDescriptorProtoKt {
@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
@com.google.protobuf.kotlin.ProtoDslMarker
public class Dsl private constructor(
private val _builder: com.google.protobuf.DescriptorProtos.OneofDescriptorProto.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.protobuf.DescriptorProtos.OneofDescriptorProto.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.protobuf.DescriptorProtos.OneofDescriptorProto = _builder.build()
/**
* `optional string name = 1;`
*/
public var name: kotlin.String
@JvmName("getName")
get() = _builder.getName()
@JvmName("setName")
set(value) {
_builder.setName(value)
}
/**
* `optional string name = 1;`
*/
public fun clearName() {
_builder.clearName()
}
/**
* `optional string name = 1;`
* @return Whether the name field is set.
*/
public fun hasName(): kotlin.Boolean {
return _builder.hasName()
}
/**
* `optional .google.protobuf.OneofOptions options = 2;`
*/
public var options: com.google.protobuf.DescriptorProtos.OneofOptions
@JvmName("getOptions")
get() = _builder.getOptions()
@JvmName("setOptions")
set(value) {
_builder.setOptions(value)
}
/**
* `optional .google.protobuf.OneofOptions options = 2;`
*/
public fun clearOptions() {
_builder.clearOptions()
}
/**
* `optional .google.protobuf.OneofOptions options = 2;`
* @return Whether the options field is set.
*/
public fun hasOptions(): kotlin.Boolean {
return _builder.hasOptions()
}
public val OneofDescriptorProtoKt.Dsl.optionsOrNull: com.google.protobuf.DescriptorProtos.OneofOptions?
get() = _builder.optionsOrNull
}
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.protobuf.DescriptorProtos.OneofDescriptorProto.copy(block: `com.google.protobuf`.OneofDescriptorProtoKt.Dsl.() -> kotlin.Unit): com.google.protobuf.DescriptorProtos.OneofDescriptorProto =
`com.google.protobuf`.OneofDescriptorProtoKt.Dsl._create(this.toBuilder()).apply { block() }._build()
public val com.google.protobuf.DescriptorProtos.OneofDescriptorProtoOrBuilder.optionsOrNull: com.google.protobuf.DescriptorProtos.OneofOptions?
get() = if (hasOptions()) getOptions() else null