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

com.google.api.AuthenticationKt.kt Maven / Gradle / Ivy

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/auth.proto

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

@kotlin.jvm.JvmName("-initializeauthentication")
public inline fun authentication(block: com.google.api.AuthenticationKt.Dsl.() -> kotlin.Unit): com.google.api.Authentication =
  com.google.api.AuthenticationKt.Dsl._create(com.google.api.Authentication.newBuilder()).apply { block() }._build()
/**
 * ```
 * `Authentication` defines the authentication configuration for an API.
 *
 * Example for an API targeted for external use:
 *
 *     name: calendar.googleapis.com
 *     authentication:
 *       providers:
 *       - id: google_calendar_auth
 *         jwks_uri: https://www.googleapis.com/oauth2/v1/certs
 *         issuer: https://securetoken.google.com
 *       rules:
 *       - selector: "*"
 *         requirements:
 *           provider_id: google_calendar_auth
 * ```
 *
 * Protobuf type `google.api.Authentication`
 */
public object AuthenticationKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.google.api.Authentication.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.api.Authentication.Builder): Dsl = Dsl(builder)
    }

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

    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class RulesProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * A list of authentication rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.AuthenticationRule rules = 3;`
     */
     public val rules: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getRulesList()
      )
    /**
     * ```
     * A list of authentication rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.AuthenticationRule rules = 3;`
     * @param value The rules to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addRules")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.google.api.AuthenticationRule) {
      _builder.addRules(value)
    }
    /**
     * ```
     * A list of authentication rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.AuthenticationRule rules = 3;`
     * @param value The rules to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignRules")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.api.AuthenticationRule) {
      add(value)
    }
    /**
     * ```
     * A list of authentication rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.AuthenticationRule rules = 3;`
     * @param values The rules to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllRules")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllRules(values)
    }
    /**
     * ```
     * A list of authentication rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.AuthenticationRule rules = 3;`
     * @param values The rules to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllRules")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * A list of authentication rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.AuthenticationRule rules = 3;`
     * @param index The index to set the value at.
     * @param value The rules to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setRules")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.api.AuthenticationRule) {
      _builder.setRules(index, value)
    }
    /**
     * ```
     * A list of authentication rules that apply to individual API methods.
     *
     * **NOTE:** All service configuration rules follow "last one wins" order.
     * ```
     *
     * `repeated .google.api.AuthenticationRule rules = 3;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearRules")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearRules()
    }


    /**
     * An uninstantiable, behaviorless type to represent the field in
     * generics.
     */
    @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
    public class ProvidersProxy private constructor() : com.google.protobuf.kotlin.DslProxy()
    /**
     * ```
     * Defines a set of authentication providers that a service supports.
     * ```
     *
     * `repeated .google.api.AuthProvider providers = 4;`
     */
     public val providers: com.google.protobuf.kotlin.DslList
      @kotlin.jvm.JvmSynthetic
      get() = com.google.protobuf.kotlin.DslList(
        _builder.getProvidersList()
      )
    /**
     * ```
     * Defines a set of authentication providers that a service supports.
     * ```
     *
     * `repeated .google.api.AuthProvider providers = 4;`
     * @param value The providers to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addProviders")
    public fun com.google.protobuf.kotlin.DslList.add(value: com.google.api.AuthProvider) {
      _builder.addProviders(value)
    }
    /**
     * ```
     * Defines a set of authentication providers that a service supports.
     * ```
     *
     * `repeated .google.api.AuthProvider providers = 4;`
     * @param value The providers to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignProviders")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.api.AuthProvider) {
      add(value)
    }
    /**
     * ```
     * Defines a set of authentication providers that a service supports.
     * ```
     *
     * `repeated .google.api.AuthProvider providers = 4;`
     * @param values The providers to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("addAllProviders")
    public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) {
      _builder.addAllProviders(values)
    }
    /**
     * ```
     * Defines a set of authentication providers that a service supports.
     * ```
     *
     * `repeated .google.api.AuthProvider providers = 4;`
     * @param values The providers to add.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("plusAssignAllProviders")
    @Suppress("NOTHING_TO_INLINE")
    public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) {
      addAll(values)
    }
    /**
     * ```
     * Defines a set of authentication providers that a service supports.
     * ```
     *
     * `repeated .google.api.AuthProvider providers = 4;`
     * @param index The index to set the value at.
     * @param value The providers to set.
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("setProviders")
    public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.api.AuthProvider) {
      _builder.setProviders(index, value)
    }
    /**
     * ```
     * Defines a set of authentication providers that a service supports.
     * ```
     *
     * `repeated .google.api.AuthProvider providers = 4;`
     */
    @kotlin.jvm.JvmSynthetic
    @kotlin.jvm.JvmName("clearProviders")
    public fun com.google.protobuf.kotlin.DslList.clear() {
      _builder.clearProviders()
    }

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy