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

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

Go to download

Kotlin lite Protocol Buffers library. Protocol Buffers are a way of encoding structured data in an efficient yet extensible format.

There is a newer version: 4.29.0-RC3
Show 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("-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()
/**
 * 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()

    /**
     * `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()
    }

    /**
     * int32 number = 2 [json_name = "number"];
     */
    public var number: kotlin.Int
      @JvmName("getNumber")
      get() = _builder.number
      @JvmName("setNumber")
      set(value) {
        _builder.number = value
      }
    /**
     * `int32 number = 2 [json_name = "number"];`
     */
    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()
    /**
     * `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()
    }
  }
}
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