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

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

Go to download

Lite version of Kotlin Protocol Buffers library. This version is optimized for code size, but does not guarantee API/ABI stability.

The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/api.proto

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

@kotlin.jvm.JvmName("-initializeapi")
public inline fun api(block: com.google.protobuf.ApiKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Api =
  com.google.protobuf.ApiKt.Dsl._create(com.google.protobuf.Api.newBuilder()).apply { block() }._build()
/**
 * ```
 * Api is a light-weight descriptor for an API Interface.
 *
 * Interfaces are also described as "protocol buffer services" in some contexts,
 * such as by the "service" keyword in a .proto file, but they are different
 * from API Services, which represent a concrete implementation of an interface
 * as opposed to simply a description of methods and bindings. They are also
 * sometimes simply referred to as "APIs" in other contexts, such as the name of
 * this message itself. See https://cloud.google.com/apis/design/glossary for
 * detailed terminology.
 * ```
 *
 * Protobuf type `google.protobuf.Api`
 */
public object ApiKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.google.protobuf.Api.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.protobuf.Api.Builder): Dsl = Dsl(builder)
    }

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

    /**
     * ```
     * The fully qualified name of this interface, including package name
     * followed by the interface's simple name.
     * ```
     *
     * `string name = 1;`
     */
    public var name: kotlin.String
      @JvmName("getName")
      get() = _builder.getName()
      @JvmName("setName")
      set(value) {
        _builder.setName(value)
      }
    /**
     * ```
     * The fully qualified name of this interface, including package name
     * followed by the interface's simple name.
     * ```
     *
     * `string name = 1;`
     */
    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 MethodsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * The methods of this interface, in unspecified order.
     * ```
     *
     * `repeated .google.protobuf.Method methods = 2;`
     */
     public val methods: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getMethodsList()
      )
    /**
     * ```
     * The methods of this interface, in unspecified order.
     * ```
     *
     * `repeated .google.protobuf.Method methods = 2;`
     * @param value The methods to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addMethods")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.google.protobuf.Method) {
      _builder.addMethods(value)
    }
    /**
     * ```
     * The methods of this interface, in unspecified order.
     * ```
     *
     * `repeated .google.protobuf.Method methods = 2;`
     * @param value The methods to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignMethods")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.protobuf.Method) {
      add(value)
    }
    /**
     * ```
     * The methods of this interface, in unspecified order.
     * ```
     *
     * `repeated .google.protobuf.Method methods = 2;`
     * @param values The methods to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllMethods")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllMethods(values)
    }
    /**
     * ```
     * The methods of this interface, in unspecified order.
     * ```
     *
     * `repeated .google.protobuf.Method methods = 2;`
     * @param values The methods to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllMethods")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * The methods of this interface, in unspecified order.
     * ```
     *
     * `repeated .google.protobuf.Method methods = 2;`
     * @param index The index to set the value at.
     * @param value The methods to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setMethods")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.protobuf.Method) {
      _builder.setMethods(index, value)
    }
    /**
     * ```
     * The methods of this interface, in unspecified order.
     * ```
     *
     * `repeated .google.protobuf.Method methods = 2;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearMethods")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearMethods()
    }

    /**
     * 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()
    /**
     * ```
     * Any metadata attached to the interface.
     * ```
     *
     * `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()
      )
    /**
     * ```
     * Any metadata attached to the interface.
     * ```
     *
     * `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)
    }
    /**
     * ```
     * Any metadata attached to the interface.
     * ```
     *
     * `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)
    }
    /**
     * ```
     * Any metadata attached to the interface.
     * ```
     *
     * `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)
    }
    /**
     * ```
     * Any metadata attached to the interface.
     * ```
     *
     * `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)
    }
    /**
     * ```
     * Any metadata attached to the interface.
     * ```
     *
     * `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)
    }
    /**
     * ```
     * Any metadata attached to the interface.
     * ```
     *
     * `repeated .google.protobuf.Option options = 3;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearOptions")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearOptions()
    }

    /**
     * ```
     * A version string for this interface. If specified, must have the form
     * `major-version.minor-version`, as in `1.10`. If the minor version is
     * omitted, it defaults to zero. If the entire version field is empty, the
     * major version is derived from the package name, as outlined below. If the
     * field is not empty, the version in the package name will be verified to be
     * consistent with what is provided here.
     *
     * The versioning schema uses [semantic
     * versioning](http://semver.org) where the major version number
     * indicates a breaking change and the minor version an additive,
     * non-breaking change. Both version numbers are signals to users
     * what to expect from different versions, and should be carefully
     * chosen based on the product plan.
     *
     * The major version is also reflected in the package name of the
     * interface, which must end in `v`, as in
     * `google.feature.v1`. For major versions 0 and 1, the suffix can
     * be omitted. Zero major versions must only be used for
     * experimental, non-GA interfaces.
     * ```
     *
     * `string version = 4;`
     */
    public var version: kotlin.String
      @JvmName("getVersion")
      get() = _builder.getVersion()
      @JvmName("setVersion")
      set(value) {
        _builder.setVersion(value)
      }
    /**
     * ```
     * A version string for this interface. If specified, must have the form
     * `major-version.minor-version`, as in `1.10`. If the minor version is
     * omitted, it defaults to zero. If the entire version field is empty, the
     * major version is derived from the package name, as outlined below. If the
     * field is not empty, the version in the package name will be verified to be
     * consistent with what is provided here.
     *
     * The versioning schema uses [semantic
     * versioning](http://semver.org) where the major version number
     * indicates a breaking change and the minor version an additive,
     * non-breaking change. Both version numbers are signals to users
     * what to expect from different versions, and should be carefully
     * chosen based on the product plan.
     *
     * The major version is also reflected in the package name of the
     * interface, which must end in `v`, as in
     * `google.feature.v1`. For major versions 0 and 1, the suffix can
     * be omitted. Zero major versions must only be used for
     * experimental, non-GA interfaces.
     * ```
     *
     * `string version = 4;`
     */
    public fun clearVersion() {
      _builder.clearVersion()
    }

    /**
     * ```
     * Source context for the protocol buffer service represented by this
     * message.
     * ```
     *
     * `.google.protobuf.SourceContext source_context = 5;`
     */
    public var sourceContext: com.google.protobuf.SourceContext
      @JvmName("getSourceContext")
      get() = _builder.getSourceContext()
      @JvmName("setSourceContext")
      set(value) {
        _builder.setSourceContext(value)
      }
    /**
     * ```
     * Source context for the protocol buffer service represented by this
     * message.
     * ```
     *
     * `.google.protobuf.SourceContext source_context = 5;`
     */
    public fun clearSourceContext() {
      _builder.clearSourceContext()
    }
    /**
     * ```
     * Source context for the protocol buffer service represented by this
     * message.
     * ```
     *
     * `.google.protobuf.SourceContext source_context = 5;`
     * @return Whether the sourceContext field is set.
     */
    public fun hasSourceContext(): kotlin.Boolean {
      return _builder.hasSourceContext()
    }

    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class MixinsProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * Included interfaces. See [Mixin][].
     * ```
     *
     * `repeated .google.protobuf.Mixin mixins = 6;`
     */
     public val mixins: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getMixinsList()
      )
    /**
     * ```
     * Included interfaces. See [Mixin][].
     * ```
     *
     * `repeated .google.protobuf.Mixin mixins = 6;`
     * @param value The mixins to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addMixins")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.google.protobuf.Mixin) {
      _builder.addMixins(value)
    }
    /**
     * ```
     * Included interfaces. See [Mixin][].
     * ```
     *
     * `repeated .google.protobuf.Mixin mixins = 6;`
     * @param value The mixins to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignMixins")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.protobuf.Mixin) {
      add(value)
    }
    /**
     * ```
     * Included interfaces. See [Mixin][].
     * ```
     *
     * `repeated .google.protobuf.Mixin mixins = 6;`
     * @param values The mixins to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllMixins")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllMixins(values)
    }
    /**
     * ```
     * Included interfaces. See [Mixin][].
     * ```
     *
     * `repeated .google.protobuf.Mixin mixins = 6;`
     * @param values The mixins to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllMixins")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * Included interfaces. See [Mixin][].
     * ```
     *
     * `repeated .google.protobuf.Mixin mixins = 6;`
     * @param index The index to set the value at.
     * @param value The mixins to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setMixins")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.protobuf.Mixin) {
      _builder.setMixins(index, value)
    }
    /**
     * ```
     * Included interfaces. See [Mixin][].
     * ```
     *
     * `repeated .google.protobuf.Mixin mixins = 6;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearMixins")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearMixins()
    }

    /**
     * ```
     * The source syntax of the service.
     * ```
     *
     * `.google.protobuf.Syntax syntax = 7;`
     */
    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)
      }
    /**
     * ```
     * The source syntax of the service.
     * ```
     *
     * `.google.protobuf.Syntax syntax = 7;`
     */
    public fun clearSyntax() {
      _builder.clearSyntax()
    }
  }
}
public inline fun com.google.protobuf.Api.copy(block: com.google.protobuf.ApiKt.Dsl.() -> kotlin.Unit): com.google.protobuf.Api =
  com.google.protobuf.ApiKt.Dsl._create(this.toBuilder()).apply { block() }._build()

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy