com.google.protobuf.EnumValueDescriptorProtoKt.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("-initializeenumValueDescriptorProto")
public inline fun enumValueDescriptorProto(block: com.google.protobuf.EnumValueDescriptorProtoKt.Dsl.() -> kotlin.Unit): com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto =
com.google.protobuf.EnumValueDescriptorProtoKt.Dsl._create(com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto.newBuilder()).apply { block() }._build()
/**
* ```
* Describes a value within an enum.
* ```
*
* Protobuf type `google.protobuf.EnumValueDescriptorProto`
*/
public object EnumValueDescriptorProtoKt {
@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.EnumValueDescriptorProto.Builder
) {
public companion object {
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _create(builder: com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto.Builder): Dsl = Dsl(builder)
}
@kotlin.jvm.JvmSynthetic
@kotlin.PublishedApi
internal fun _build(): com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto = _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 int32 number = 2;`
*/
public var number: kotlin.Int
@JvmName("getNumber")
get() = _builder.getNumber()
@JvmName("setNumber")
set(value) {
_builder.setNumber(value)
}
/**
* `optional int32 number = 2;`
*/
public fun clearNumber() {
_builder.clearNumber()
}
/**
* `optional int32 number = 2;`
* @return Whether the number field is set.
*/
public fun hasNumber(): kotlin.Boolean {
return _builder.hasNumber()
}
/**
* `optional .google.protobuf.EnumValueOptions options = 3;`
*/
public var options: com.google.protobuf.DescriptorProtos.EnumValueOptions
@JvmName("getOptions")
get() = _builder.getOptions()
@JvmName("setOptions")
set(value) {
_builder.setOptions(value)
}
/**
* `optional .google.protobuf.EnumValueOptions options = 3;`
*/
public fun clearOptions() {
_builder.clearOptions()
}
/**
* `optional .google.protobuf.EnumValueOptions options = 3;`
* @return Whether the options field is set.
*/
public fun hasOptions(): kotlin.Boolean {
return _builder.hasOptions()
}
public val EnumValueDescriptorProtoKt.Dsl.optionsOrNull: com.google.protobuf.DescriptorProtos.EnumValueOptions?
get() = _builder.optionsOrNull
}
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto.copy(block: `com.google.protobuf`.EnumValueDescriptorProtoKt.Dsl.() -> kotlin.Unit): com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto =
`com.google.protobuf`.EnumValueDescriptorProtoKt.Dsl._create(this.toBuilder()).apply { block() }._build()
public val com.google.protobuf.DescriptorProtos.EnumValueDescriptorProtoOrBuilder.optionsOrNull: com.google.protobuf.DescriptorProtos.EnumValueOptions?
get() = if (hasOptions()) getOptions() else null