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

com.google.protobuf.FieldOptionsKt.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("-initializefieldOptions")
public inline fun fieldOptions(block: com.google.protobuf.FieldOptionsKt.Dsl.() -> kotlin.Unit): com.google.protobuf.DescriptorProtos.FieldOptions =
  com.google.protobuf.FieldOptionsKt.Dsl._create(com.google.protobuf.DescriptorProtos.FieldOptions.newBuilder()).apply { block() }._build()
/**
 * Protobuf type `google.protobuf.FieldOptions`
 */
public object FieldOptionsKt {
  @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.FieldOptions.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.protobuf.DescriptorProtos.FieldOptions.Builder): Dsl = Dsl(builder)
    }

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

    /**
     * ```
     * The ctype option instructs the C++ code generator to use a different
     * representation of the field than it normally would.  See the specific
     * options below.  This option is not yet implemented in the open source
     * release -- sorry, we'll try to include it in a future version!
     * ```
     *
     * `optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];`
     */
    public var ctype: com.google.protobuf.DescriptorProtos.FieldOptions.CType
      @JvmName("getCtype")
      get() = _builder.getCtype()
      @JvmName("setCtype")
      set(value) {
        _builder.setCtype(value)
      }
    /**
     * ```
     * The ctype option instructs the C++ code generator to use a different
     * representation of the field than it normally would.  See the specific
     * options below.  This option is not yet implemented in the open source
     * release -- sorry, we'll try to include it in a future version!
     * ```
     *
     * `optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];`
     */
    public fun clearCtype() {
      _builder.clearCtype()
    }
    /**
     * ```
     * The ctype option instructs the C++ code generator to use a different
     * representation of the field than it normally would.  See the specific
     * options below.  This option is not yet implemented in the open source
     * release -- sorry, we'll try to include it in a future version!
     * ```
     *
     * `optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];`
     * @return Whether the ctype field is set.
     */
    public fun hasCtype(): kotlin.Boolean {
      return _builder.hasCtype()
    }

    /**
     * ```
     * The packed option can be enabled for repeated primitive fields to enable
     * a more efficient representation on the wire. Rather than repeatedly
     * writing the tag and type for each element, the entire array is encoded as
     * a single length-delimited blob. In proto3, only explicit setting it to
     * false will avoid using packed encoding.
     * ```
     *
     * `optional bool packed = 2;`
     */
    public var packed: kotlin.Boolean
      @JvmName("getPacked")
      get() = _builder.getPacked()
      @JvmName("setPacked")
      set(value) {
        _builder.setPacked(value)
      }
    /**
     * ```
     * The packed option can be enabled for repeated primitive fields to enable
     * a more efficient representation on the wire. Rather than repeatedly
     * writing the tag and type for each element, the entire array is encoded as
     * a single length-delimited blob. In proto3, only explicit setting it to
     * false will avoid using packed encoding.
     * ```
     *
     * `optional bool packed = 2;`
     */
    public fun clearPacked() {
      _builder.clearPacked()
    }
    /**
     * ```
     * The packed option can be enabled for repeated primitive fields to enable
     * a more efficient representation on the wire. Rather than repeatedly
     * writing the tag and type for each element, the entire array is encoded as
     * a single length-delimited blob. In proto3, only explicit setting it to
     * false will avoid using packed encoding.
     * ```
     *
     * `optional bool packed = 2;`
     * @return Whether the packed field is set.
     */
    public fun hasPacked(): kotlin.Boolean {
      return _builder.hasPacked()
    }

    /**
     * ```
     * The jstype option determines the JavaScript type used for values of the
     * field.  The option is permitted only for 64 bit integral and fixed types
     * (int64, uint64, sint64, fixed64, sfixed64).  A field with jstype JS_STRING
     * is represented as JavaScript string, which avoids loss of precision that
     * can happen when a large value is converted to a floating point JavaScript.
     * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
     * use the JavaScript "number" type.  The behavior of the default option
     * JS_NORMAL is implementation dependent.
     *
     * This option is an enum to permit additional types to be added, e.g.
     * goog.math.Integer.
     * ```
     *
     * `optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];`
     */
    public var jstype: com.google.protobuf.DescriptorProtos.FieldOptions.JSType
      @JvmName("getJstype")
      get() = _builder.getJstype()
      @JvmName("setJstype")
      set(value) {
        _builder.setJstype(value)
      }
    /**
     * ```
     * The jstype option determines the JavaScript type used for values of the
     * field.  The option is permitted only for 64 bit integral and fixed types
     * (int64, uint64, sint64, fixed64, sfixed64).  A field with jstype JS_STRING
     * is represented as JavaScript string, which avoids loss of precision that
     * can happen when a large value is converted to a floating point JavaScript.
     * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
     * use the JavaScript "number" type.  The behavior of the default option
     * JS_NORMAL is implementation dependent.
     *
     * This option is an enum to permit additional types to be added, e.g.
     * goog.math.Integer.
     * ```
     *
     * `optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];`
     */
    public fun clearJstype() {
      _builder.clearJstype()
    }
    /**
     * ```
     * The jstype option determines the JavaScript type used for values of the
     * field.  The option is permitted only for 64 bit integral and fixed types
     * (int64, uint64, sint64, fixed64, sfixed64).  A field with jstype JS_STRING
     * is represented as JavaScript string, which avoids loss of precision that
     * can happen when a large value is converted to a floating point JavaScript.
     * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
     * use the JavaScript "number" type.  The behavior of the default option
     * JS_NORMAL is implementation dependent.
     *
     * This option is an enum to permit additional types to be added, e.g.
     * goog.math.Integer.
     * ```
     *
     * `optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];`
     * @return Whether the jstype field is set.
     */
    public fun hasJstype(): kotlin.Boolean {
      return _builder.hasJstype()
    }

    /**
     * ```
     * Should this field be parsed lazily?  Lazy applies only to message-type
     * fields.  It means that when the outer message is initially parsed, the
     * inner message's contents will not be parsed but instead stored in encoded
     * form.  The inner message will actually be parsed when it is first accessed.
     *
     * This is only a hint.  Implementations are free to choose whether to use
     * eager or lazy parsing regardless of the value of this option.  However,
     * setting this option true suggests that the protocol author believes that
     * using lazy parsing on this field is worth the additional bookkeeping
     * overhead typically needed to implement it.
     *
     * This option does not affect the public interface of any generated code;
     * all method signatures remain the same.  Furthermore, thread-safety of the
     * interface is not affected by this option; const methods remain safe to
     * call from multiple threads concurrently, while non-const methods continue
     * to require exclusive access.
     *
     *
     * Note that implementations may choose not to check required fields within
     * a lazy sub-message.  That is, calling IsInitialized() on the outer message
     * may return true even if the inner message has missing required fields.
     * This is necessary because otherwise the inner message would have to be
     * parsed in order to perform the check, defeating the purpose of lazy
     * parsing.  An implementation which chooses not to check required fields
     * must be consistent about it.  That is, for any particular sub-message, the
     * implementation must either *always* check its required fields, or *never*
     * check its required fields, regardless of whether or not the message has
     * been parsed.
     * ```
     *
     * `optional bool lazy = 5 [default = false];`
     */
    public var lazy: kotlin.Boolean
      @JvmName("getLazy")
      get() = _builder.getLazy()
      @JvmName("setLazy")
      set(value) {
        _builder.setLazy(value)
      }
    /**
     * ```
     * Should this field be parsed lazily?  Lazy applies only to message-type
     * fields.  It means that when the outer message is initially parsed, the
     * inner message's contents will not be parsed but instead stored in encoded
     * form.  The inner message will actually be parsed when it is first accessed.
     *
     * This is only a hint.  Implementations are free to choose whether to use
     * eager or lazy parsing regardless of the value of this option.  However,
     * setting this option true suggests that the protocol author believes that
     * using lazy parsing on this field is worth the additional bookkeeping
     * overhead typically needed to implement it.
     *
     * This option does not affect the public interface of any generated code;
     * all method signatures remain the same.  Furthermore, thread-safety of the
     * interface is not affected by this option; const methods remain safe to
     * call from multiple threads concurrently, while non-const methods continue
     * to require exclusive access.
     *
     *
     * Note that implementations may choose not to check required fields within
     * a lazy sub-message.  That is, calling IsInitialized() on the outer message
     * may return true even if the inner message has missing required fields.
     * This is necessary because otherwise the inner message would have to be
     * parsed in order to perform the check, defeating the purpose of lazy
     * parsing.  An implementation which chooses not to check required fields
     * must be consistent about it.  That is, for any particular sub-message, the
     * implementation must either *always* check its required fields, or *never*
     * check its required fields, regardless of whether or not the message has
     * been parsed.
     * ```
     *
     * `optional bool lazy = 5 [default = false];`
     */
    public fun clearLazy() {
      _builder.clearLazy()
    }
    /**
     * ```
     * Should this field be parsed lazily?  Lazy applies only to message-type
     * fields.  It means that when the outer message is initially parsed, the
     * inner message's contents will not be parsed but instead stored in encoded
     * form.  The inner message will actually be parsed when it is first accessed.
     *
     * This is only a hint.  Implementations are free to choose whether to use
     * eager or lazy parsing regardless of the value of this option.  However,
     * setting this option true suggests that the protocol author believes that
     * using lazy parsing on this field is worth the additional bookkeeping
     * overhead typically needed to implement it.
     *
     * This option does not affect the public interface of any generated code;
     * all method signatures remain the same.  Furthermore, thread-safety of the
     * interface is not affected by this option; const methods remain safe to
     * call from multiple threads concurrently, while non-const methods continue
     * to require exclusive access.
     *
     *
     * Note that implementations may choose not to check required fields within
     * a lazy sub-message.  That is, calling IsInitialized() on the outer message
     * may return true even if the inner message has missing required fields.
     * This is necessary because otherwise the inner message would have to be
     * parsed in order to perform the check, defeating the purpose of lazy
     * parsing.  An implementation which chooses not to check required fields
     * must be consistent about it.  That is, for any particular sub-message, the
     * implementation must either *always* check its required fields, or *never*
     * check its required fields, regardless of whether or not the message has
     * been parsed.
     * ```
     *
     * `optional bool lazy = 5 [default = false];`
     * @return Whether the lazy field is set.
     */
    public fun hasLazy(): kotlin.Boolean {
      return _builder.hasLazy()
    }

    /**
     * ```
     * Is this field deprecated?
     * Depending on the target platform, this can emit Deprecated annotations
     * for accessors, or it will be completely ignored; in the very least, this
     * is a formalization for deprecating fields.
     * ```
     *
     * `optional bool deprecated = 3 [default = false];`
     */
    public var deprecated: kotlin.Boolean
      @JvmName("getDeprecated")
      get() = _builder.getDeprecated()
      @JvmName("setDeprecated")
      set(value) {
        _builder.setDeprecated(value)
      }
    /**
     * ```
     * Is this field deprecated?
     * Depending on the target platform, this can emit Deprecated annotations
     * for accessors, or it will be completely ignored; in the very least, this
     * is a formalization for deprecating fields.
     * ```
     *
     * `optional bool deprecated = 3 [default = false];`
     */
    public fun clearDeprecated() {
      _builder.clearDeprecated()
    }
    /**
     * ```
     * Is this field deprecated?
     * Depending on the target platform, this can emit Deprecated annotations
     * for accessors, or it will be completely ignored; in the very least, this
     * is a formalization for deprecating fields.
     * ```
     *
     * `optional bool deprecated = 3 [default = false];`
     * @return Whether the deprecated field is set.
     */
    public fun hasDeprecated(): kotlin.Boolean {
      return _builder.hasDeprecated()
    }

    /**
     * ```
     * For Google-internal migration only. Do not use.
     * ```
     *
     * `optional bool weak = 10 [default = false];`
     */
    public var weak: kotlin.Boolean
      @JvmName("getWeak")
      get() = _builder.getWeak()
      @JvmName("setWeak")
      set(value) {
        _builder.setWeak(value)
      }
    /**
     * ```
     * For Google-internal migration only. Do not use.
     * ```
     *
     * `optional bool weak = 10 [default = false];`
     */
    public fun clearWeak() {
      _builder.clearWeak()
    }
    /**
     * ```
     * For Google-internal migration only. Do not use.
     * ```
     *
     * `optional bool weak = 10 [default = false];`
     * @return Whether the weak field is set.
     */
    public fun hasWeak(): kotlin.Boolean {
      return _builder.hasWeak()
    }

    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class UninterpretedOptionProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * The parser stores options it doesn't recognize here. See above.
     * ```
     *
     * `repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;`
     */
     public val uninterpretedOption: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getUninterpretedOptionList()
      )
    /**
     * ```
     * The parser stores options it doesn't recognize here. See above.
     * ```
     *
     * `repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;`
     * @param value The uninterpretedOption to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addUninterpretedOption")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.google.protobuf.DescriptorProtos.UninterpretedOption) {
      _builder.addUninterpretedOption(value)
    }
    /**
     * ```
     * The parser stores options it doesn't recognize here. See above.
     * ```
     *
     * `repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;`
     * @param value The uninterpretedOption to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignUninterpretedOption")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.protobuf.DescriptorProtos.UninterpretedOption) {
      add(value)
    }
    /**
     * ```
     * The parser stores options it doesn't recognize here. See above.
     * ```
     *
     * `repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;`
     * @param values The uninterpretedOption to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllUninterpretedOption")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllUninterpretedOption(values)
    }
    /**
     * ```
     * The parser stores options it doesn't recognize here. See above.
     * ```
     *
     * `repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;`
     * @param values The uninterpretedOption to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllUninterpretedOption")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * The parser stores options it doesn't recognize here. See above.
     * ```
     *
     * `repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;`
     * @param index The index to set the value at.
     * @param value The uninterpretedOption to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setUninterpretedOption")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.protobuf.DescriptorProtos.UninterpretedOption) {
      _builder.setUninterpretedOption(index, value)
    }
    /**
     * ```
     * The parser stores options it doesn't recognize here. See above.
     * ```
     *
     * `repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearUninterpretedOption")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearUninterpretedOption()
    }

    @Suppress("UNCHECKED_CAST")
    @kotlin.jvm.JvmSynthetic
    public operator fun  get(extension: com.google.protobuf.ExtensionLite): T {
      return if (extension.isRepeated) {
        get(extension as com.google.protobuf.ExtensionLite>) as T
      } else {
        _builder.getExtension(extension)
      }
    }

    @kotlin.jvm.JvmSynthetic
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    @kotlin.jvm.JvmName("-getRepeatedExtension")
    public operator fun  get(
      extension: com.google.protobuf.ExtensionLite>
    ): com.google.protobuf.kotlin.ExtensionList {
      return com.google.protobuf.kotlin.ExtensionList(extension, _builder.getExtension(extension))
    }

    @kotlin.jvm.JvmSynthetic
    public operator fun contains(extension: com.google.protobuf.ExtensionLite): Boolean {
      return _builder.hasExtension(extension)
    }

    @kotlin.jvm.JvmSynthetic
    public fun clear(extension: com.google.protobuf.ExtensionLite) {
      _builder.clearExtension(extension)
    }

    @kotlin.jvm.JvmSynthetic
    public fun  setExtension(extension: com.google.protobuf.ExtensionLite, value: T) {
      _builder.setExtension(extension, value)
    }

    @kotlin.jvm.JvmSynthetic
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun > set(
      extension: com.google.protobuf.ExtensionLite,
      value: T
    ) {
      setExtension(extension, value)
    }

    @kotlin.jvm.JvmSynthetic
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun set(
      extension: com.google.protobuf.ExtensionLite,
      value: com.google.protobuf.ByteString
    ) {
      setExtension(extension, value)
    }

    @kotlin.jvm.JvmSynthetic
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun  set(
      extension: com.google.protobuf.ExtensionLite,
      value: T
    ) {
      setExtension(extension, value)
    }

    @kotlin.jvm.JvmSynthetic
    public fun  com.google.protobuf.kotlin.ExtensionList.add(value: E) {
      _builder.addExtension(this.extension, value)
    }

    @kotlin.jvm.JvmSynthetic
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun  com.google.protobuf.kotlin.ExtensionList.plusAssign(value: E) {
      add(value)
    }

    @kotlin.jvm.JvmSynthetic
    public fun  com.google.protobuf.kotlin.ExtensionList.addAll(values: Iterable) {
      for (value in values) {
        add(value)
      }
    }

    @kotlin.jvm.JvmSynthetic
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun  com.google.protobuf.kotlin.ExtensionList.plusAssign(values: Iterable) {
      addAll(values)
    }

    @kotlin.jvm.JvmSynthetic
    public operator fun  com.google.protobuf.kotlin.ExtensionList.set(index: Int, value: E) {
      _builder.setExtension(this.extension, index, value)
    }

    @kotlin.jvm.JvmSynthetic
    @Suppress("NOTHING_TO_INLINE")
    public inline fun com.google.protobuf.kotlin.ExtensionList<*, com.google.protobuf.DescriptorProtos.FieldOptions>.clear() {
      clear(extension)
    }

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy