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

com.google.api.OAuthRequirementsKt.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("-initializeoAuthRequirements")
public inline fun oAuthRequirements(block: com.google.api.OAuthRequirementsKt.Dsl.() -> kotlin.Unit): com.google.api.OAuthRequirements =
  com.google.api.OAuthRequirementsKt.Dsl._create(com.google.api.OAuthRequirements.newBuilder()).apply { block() }._build()
/**
 * ```
 * OAuth scopes are a way to define data and permissions on data. For example,
 * there are scopes defined for "Read-only access to Google Calendar" and
 * "Access to Cloud Platform". Users can consent to a scope for an application,
 * giving it permission to access that data on their behalf.
 *
 * OAuth scope specifications should be fairly coarse grained; a user will need
 * to see and understand the text description of what your scope means.
 *
 * In most cases: use one or at most two OAuth scopes for an entire family of
 * products. If your product has multiple APIs, you should probably be sharing
 * the OAuth scope across all of those APIs.
 *
 * When you need finer grained OAuth consent screens: talk with your product
 * management about how developers will use them in practice.
 *
 * Please note that even though each of the canonical scopes is enough for a
 * request to be accepted and passed to the backend, a request can still fail
 * due to the backend requiring additional scopes or permissions.
 * ```
 *
 * Protobuf type `google.api.OAuthRequirements`
 */
public object OAuthRequirementsKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.google.api.OAuthRequirements.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.api.OAuthRequirements.Builder): Dsl = Dsl(builder)
    }

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

    /**
     * ```
     * The list of publicly documented OAuth scopes that are allowed access. An
     * OAuth token containing any of these scopes will be accepted.
     *
     * Example:
     *
     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
     *                        https://www.googleapis.com/auth/calendar.read
     * ```
     *
     * `string canonical_scopes = 1;`
     */
    public var canonicalScopes: kotlin.String
      @JvmName("getCanonicalScopes")
      get() = _builder.getCanonicalScopes()
      @JvmName("setCanonicalScopes")
      set(value) {
        _builder.setCanonicalScopes(value)
      }
    /**
     * ```
     * The list of publicly documented OAuth scopes that are allowed access. An
     * OAuth token containing any of these scopes will be accepted.
     *
     * Example:
     *
     *      canonical_scopes: https://www.googleapis.com/auth/calendar,
     *                        https://www.googleapis.com/auth/calendar.read
     * ```
     *
     * `string canonical_scopes = 1;`
     */
    public fun clearCanonicalScopes() {
      _builder.clearCanonicalScopes()
    }
  }
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.api.OAuthRequirements.copy(block: `com.google.api`.OAuthRequirementsKt.Dsl.() -> kotlin.Unit): com.google.api.OAuthRequirements =
  `com.google.api`.OAuthRequirementsKt.Dsl._create(this.toBuilder()).apply { block() }._build()





© 2015 - 2024 Weber Informatics LLC | Privacy Policy