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

com.google.protobuf.EnumKt.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!
// source: google/protobuf/type.proto

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

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

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

    /**
     * `string name = 1 [json_name = "name"];`
     */
    public var name: kotlin.String
      @JvmName("getName")
      get() = _builder.getName()
      @JvmName("setName")
      set(value) {
        _builder.setName(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 EnumvalueProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * `repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];`
     */
     public val enumvalue: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getEnumvalueList()
      )
    /**
     * `repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];`
     * @param value The enumvalue to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addEnumvalue")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.google.protobuf.EnumValue) {
      _builder.addEnumvalue(value)
    }
    /**
     * `repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];`
     * @param value The enumvalue to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignEnumvalue")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.protobuf.EnumValue) {
      add(value)
    }
    /**
     * `repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];`
     * @param values The enumvalue to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllEnumvalue")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllEnumvalue(values)
    }
    /**
     * `repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];`
     * @param values The enumvalue to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllEnumvalue")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * `repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];`
     * @param index The index to set the value at.
     * @param value The enumvalue to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setEnumvalue")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.protobuf.EnumValue) {
      _builder.setEnumvalue(index, value)
    }
    /**
     * `repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearEnumvalue")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearEnumvalue()
    }

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

    /**
     * `.google.protobuf.SourceContext source_context = 4 [json_name = "sourceContext"];`
     */
    public var sourceContext: com.google.protobuf.SourceContext
      @JvmName("getSourceContext")
      get() = _builder.getSourceContext()
      @JvmName("setSourceContext")
      set(value) {
        _builder.setSourceContext(value)
      }
    /**
     * `.google.protobuf.SourceContext source_context = 4 [json_name = "sourceContext"];`
     */
    public fun clearSourceContext() {
      _builder.clearSourceContext()
    }
    /**
     * `.google.protobuf.SourceContext source_context = 4 [json_name = "sourceContext"];`
     * @return Whether the sourceContext field is set.
     */
    public fun hasSourceContext(): kotlin.Boolean {
      return _builder.hasSourceContext()
    }
    public val EnumKt.Dsl.sourceContextOrNull: com.google.protobuf.SourceContext?
      get() = _builder.sourceContextOrNull

    /**
     * `.google.protobuf.Syntax syntax = 5 [json_name = "syntax"];`
     */
    public var syntax: com.google.protobuf.Syntax
      @JvmName("getSyntax")
      get() = _builder.getSyntax()
      @JvmName("setSyntax")
      set(value) {
        _builder.setSyntax(value)
      }
    public var syntaxValue: kotlin.Int
      @JvmName("getSyntaxValue")
      get() = _builder.getSyntaxValue()
      @JvmName("setSyntaxValue")
      set(value) {
        _builder.setSyntaxValue(value)
      }
    /**
     * `.google.protobuf.Syntax syntax = 5 [json_name = "syntax"];`
     */
    public fun clearSyntax() {
      _builder.clearSyntax()
    }

    /**
     * `string edition = 6 [json_name = "edition"];`
     */
    public var edition: kotlin.String
      @JvmName("getEdition")
      get() = _builder.getEdition()
      @JvmName("setEdition")
      set(value) {
        _builder.setEdition(value)
      }
    /**
     * `string edition = 6 [json_name = "edition"];`
     */
    public fun clearEdition() {
      _builder.clearEdition()
    }
  }
}
public inline fun com.google.protobuf.Enum.copy(block: `com.google.protobuf`.EnumKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Enum =
  `com.google.protobuf`.EnumKt.Dsl._create(this.toBuilder()).apply { block() }._build()

public val com.google.protobuf.EnumOrBuilder.sourceContextOrNull: com.google.protobuf.SourceContext?
  get() = if (hasSourceContext()) getSourceContext() else null





© 2015 - 2024 Weber Informatics LLC | Privacy Policy