All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.protobuf.EnumValueKt.kt Maven / Gradle / Ivy

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/type.proto

// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.protobuf;

@kotlin.jvm.JvmName("-initializeenumValue")
public inline fun enumValue(block: com.google.protobuf.EnumValueKt.Dsl.() -> kotlin.Unit): com.google.protobuf.EnumValue =
  com.google.protobuf.EnumValueKt.Dsl._create(com.google.protobuf.EnumValue.newBuilder()).apply { block() }._build()
/**
 * ```
 * Enum value definition.
 * ```
 *
 * Protobuf type `google.protobuf.EnumValue`
 */
public object EnumValueKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.google.protobuf.EnumValue.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.protobuf.EnumValue.Builder): Dsl = Dsl(builder)
    }

    @kotlin.jvm.JvmSynthetic
    @kotlin.PublishedApi
    internal fun _build(): com.google.protobuf.EnumValue = _builder.build()

    /**
     * ```
     * Enum value name.
     * ```
     *
     * `string name = 1;`
     */
    public var name: kotlin.String
      @JvmName("getName")
      get() = _builder.getName()
      @JvmName("setName")
      set(value) {
        _builder.setName(value)
      }
    /**
     * ```
     * Enum value name.
     * ```
     *
     * `string name = 1;`
     */
    public fun clearName() {
      _builder.clearName()
    }

    /**
     * ```
     * Enum value number.
     * ```
     *
     * `int32 number = 2;`
     */
    public var number: kotlin.Int
      @JvmName("getNumber")
      get() = _builder.getNumber()
      @JvmName("setNumber")
      set(value) {
        _builder.setNumber(value)
      }
    /**
     * ```
     * Enum value number.
     * ```
     *
     * `int32 number = 2;`
     */
    public fun clearNumber() {
      _builder.clearNumber()
    }

    /**
     * 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()
    /**
     * ```
     * Protocol buffer options.
     * ```
     *
     * `repeated .google.protobuf.Option options = 3;`
     */
     public val options: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getOptionsList()
      )
    /**
     * ```
     * Protocol buffer options.
     * ```
     *
     * `repeated .google.protobuf.Option options = 3;`
     * @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)
    }
    /**
     * ```
     * Protocol buffer options.
     * ```
     *
     * `repeated .google.protobuf.Option options = 3;`
     * @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)
    }
    /**
     * ```
     * Protocol buffer options.
     * ```
     *
     * `repeated .google.protobuf.Option options = 3;`
     * @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)
    }
    /**
     * ```
     * Protocol buffer options.
     * ```
     *
     * `repeated .google.protobuf.Option options = 3;`
     * @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)
    }
    /**
     * ```
     * Protocol buffer options.
     * ```
     *
     * `repeated .google.protobuf.Option options = 3;`
     * @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)
    }
    /**
     * ```
     * Protocol buffer options.
     * ```
     *
     * `repeated .google.protobuf.Option options = 3;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearOptions")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearOptions()
    }

  }
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.protobuf.EnumValue.copy(block: `com.google.protobuf`.EnumValueKt.Dsl.() -> kotlin.Unit): com.google.protobuf.EnumValue =
  `com.google.protobuf`.EnumValueKt.Dsl._create(this.toBuilder()).apply { block() }._build()





© 2015 - 2024 Weber Informatics LLC | Privacy Policy