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

com.google.protobuf.FieldKt.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("-initializefield")
public inline fun field(block: com.google.protobuf.FieldKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Field =
  com.google.protobuf.FieldKt.Dsl._create(com.google.protobuf.Field.newBuilder()).apply { block() }._build()
/**
 * ```
 * A single field of a message type.
 * ```
 *
 * Protobuf type `google.protobuf.Field`
 */
public object FieldKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.google.protobuf.Field.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.protobuf.Field.Builder): Dsl = Dsl(builder)
    }

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

    /**
     * ```
     * The field type.
     * ```
     *
     * `.google.protobuf.Field.Kind kind = 1;`
     */
    public var kind: com.google.protobuf.Field.Kind
      @JvmName("getKind")
      get() = _builder.getKind()
      @JvmName("setKind")
      set(value) {
        _builder.setKind(value)
      }
    public var kindValue: kotlin.Int
      @JvmName("getKindValue")
      get() = _builder.getKindValue()
      @JvmName("setKindValue")
      set(value) {
        _builder.setKindValue(value)
      }
    /**
     * ```
     * The field type.
     * ```
     *
     * `.google.protobuf.Field.Kind kind = 1;`
     */
    public fun clearKind() {
      _builder.clearKind()
    }

    /**
     * ```
     * The field cardinality.
     * ```
     *
     * `.google.protobuf.Field.Cardinality cardinality = 2;`
     */
    public var cardinality: com.google.protobuf.Field.Cardinality
      @JvmName("getCardinality")
      get() = _builder.getCardinality()
      @JvmName("setCardinality")
      set(value) {
        _builder.setCardinality(value)
      }
    public var cardinalityValue: kotlin.Int
      @JvmName("getCardinalityValue")
      get() = _builder.getCardinalityValue()
      @JvmName("setCardinalityValue")
      set(value) {
        _builder.setCardinalityValue(value)
      }
    /**
     * ```
     * The field cardinality.
     * ```
     *
     * `.google.protobuf.Field.Cardinality cardinality = 2;`
     */
    public fun clearCardinality() {
      _builder.clearCardinality()
    }

    /**
     * 
     * The field number.
     * 
* * int32 number = 3; */ public var number: kotlin.Int @JvmName("getNumber") get() = _builder.getNumber() @JvmName("setNumber") set(value) { _builder.setNumber(value) } /** * ``` * The field number. * ``` * * `int32 number = 3;` */ public fun clearNumber() { _builder.clearNumber() } /** * ``` * The field name. * ``` * * `string name = 4;` */ public var name: kotlin.String @JvmName("getName") get() = _builder.getName() @JvmName("setName") set(value) { _builder.setName(value) } /** * ``` * The field name. * ``` * * `string name = 4;` */ public fun clearName() { _builder.clearName() } /** * ``` * The field type URL, without the scheme, for message or enumeration * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. * ``` * * `string type_url = 6;` */ public var typeUrl: kotlin.String @JvmName("getTypeUrl") get() = _builder.getTypeUrl() @JvmName("setTypeUrl") set(value) { _builder.setTypeUrl(value) } /** * ``` * The field type URL, without the scheme, for message or enumeration * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. * ``` * * `string type_url = 6;` */ public fun clearTypeUrl() { _builder.clearTypeUrl() } /** *
     * The index of the field type in `Type.oneofs`, for message or enumeration
     * types. The first type has index 1; zero means the type is not in the list.
     * 
* * int32 oneof_index = 7; */ public var oneofIndex: kotlin.Int @JvmName("getOneofIndex") get() = _builder.getOneofIndex() @JvmName("setOneofIndex") set(value) { _builder.setOneofIndex(value) } /** * ``` * The index of the field type in `Type.oneofs`, for message or enumeration * types. The first type has index 1; zero means the type is not in the list. * ``` * * `int32 oneof_index = 7;` */ public fun clearOneofIndex() { _builder.clearOneofIndex() } /** *
     * Whether to use alternative packed wire representation.
     * 
* * bool packed = 8; */ public var packed: kotlin.Boolean @JvmName("getPacked") get() = _builder.getPacked() @JvmName("setPacked") set(value) { _builder.setPacked(value) } /** * ``` * Whether to use alternative packed wire representation. * ``` * * `bool packed = 8;` */ public fun clearPacked() { _builder.clearPacked() } /** * 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() /** * ``` * The protocol buffer options. * ``` * * `repeated .google.protobuf.Option options = 9;` */ public val options: com.google.protobuf.kotlin.DslList @kotlin.jvm.JvmSynthetic get() = com.google.protobuf.kotlin.DslList( _builder.getOptionsList() ) /** * ``` * The protocol buffer options. * ``` * * `repeated .google.protobuf.Option options = 9;` * @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) } /** * ``` * The protocol buffer options. * ``` * * `repeated .google.protobuf.Option options = 9;` * @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) } /** * ``` * The protocol buffer options. * ``` * * `repeated .google.protobuf.Option options = 9;` * @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) } /** * ``` * The protocol buffer options. * ``` * * `repeated .google.protobuf.Option options = 9;` * @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) } /** * ``` * The protocol buffer options. * ``` * * `repeated .google.protobuf.Option options = 9;` * @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) } /** * ``` * The protocol buffer options. * ``` * * `repeated .google.protobuf.Option options = 9;` */ @kotlin.jvm.JvmSynthetic @kotlin.jvm.JvmName("clearOptions") public fun com.google.protobuf.kotlin.DslList.clear() { _builder.clearOptions() } /** * ``` * The field JSON name. * ``` * * `string json_name = 10;` */ public var jsonName: kotlin.String @JvmName("getJsonName") get() = _builder.getJsonName() @JvmName("setJsonName") set(value) { _builder.setJsonName(value) } /** * ``` * The field JSON name. * ``` * * `string json_name = 10;` */ public fun clearJsonName() { _builder.clearJsonName() } /** * ``` * The string value of the default value of this field. Proto2 syntax only. * ``` * * `string default_value = 11;` */ public var defaultValue: kotlin.String @JvmName("getDefaultValue") get() = _builder.getDefaultValue() @JvmName("setDefaultValue") set(value) { _builder.setDefaultValue(value) } /** * ``` * The string value of the default value of this field. Proto2 syntax only. * ``` * * `string default_value = 11;` */ public fun clearDefaultValue() { _builder.clearDefaultValue() } } } public inline fun com.google.protobuf.Field.copy(block: com.google.protobuf.FieldKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Field = com.google.protobuf.FieldKt.Dsl._create(this.toBuilder()).apply { block() }._build()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy