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

com.pulumi.azurenative.apimanagement.kotlin.AuthorizationServerArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.apimanagement.kotlin

import com.pulumi.azurenative.apimanagement.AuthorizationServerArgs.builder
import com.pulumi.azurenative.apimanagement.kotlin.enums.AuthorizationMethod
import com.pulumi.azurenative.apimanagement.kotlin.enums.BearerTokenSendingMethod
import com.pulumi.azurenative.apimanagement.kotlin.enums.ClientAuthenticationMethod
import com.pulumi.azurenative.apimanagement.kotlin.enums.GrantType
import com.pulumi.azurenative.apimanagement.kotlin.inputs.TokenBodyParameterContractArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.TokenBodyParameterContractArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * External OAuth authorization server settings.
 * Azure REST API version: 2022-08-01. Prior API version in Azure Native 1.x: 2020-12-01.
 * Other available API versions: 2016-07-07, 2016-10-10, 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
 * ## Example Usage
 * ### ApiManagementCreateAuthorizationServer
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var authorizationServer = new AzureNative.ApiManagement.AuthorizationServer("authorizationServer", new()
 *     {
 *         AuthorizationEndpoint = "https://www.contoso.com/oauth2/auth",
 *         AuthorizationMethods = new[]
 *         {
 *             AzureNative.ApiManagement.AuthorizationMethod.GET,
 *         },
 *         Authsid = "newauthServer",
 *         BearerTokenSendingMethods = new[]
 *         {
 *             AzureNative.ApiManagement.BearerTokenSendingMethod.AuthorizationHeader,
 *         },
 *         ClientId = "1",
 *         ClientRegistrationEndpoint = "https://www.contoso.com/apps",
 *         ClientSecret = "2",
 *         DefaultScope = "read write",
 *         Description = "test server",
 *         DisplayName = "test2",
 *         GrantTypes = new[]
 *         {
 *             AzureNative.ApiManagement.GrantType.AuthorizationCode,
 *             AzureNative.ApiManagement.GrantType.@Implicit,
 *         },
 *         ResourceGroupName = "rg1",
 *         ResourceOwnerPassword = "pwd",
 *         ResourceOwnerUsername = "un",
 *         ServiceName = "apimService1",
 *         SupportState = true,
 *         TokenEndpoint = "https://www.contoso.com/oauth2/token",
 *         UseInApiDocumentation = true,
 *         UseInTestConsole = false,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := apimanagement.NewAuthorizationServer(ctx, "authorizationServer", &apimanagement.AuthorizationServerArgs{
 * 			AuthorizationEndpoint: pulumi.String("https://www.contoso.com/oauth2/auth"),
 * 			AuthorizationMethods: apimanagement.AuthorizationMethodArray{
 * 				apimanagement.AuthorizationMethodGET,
 * 			},
 * 			Authsid: pulumi.String("newauthServer"),
 * 			BearerTokenSendingMethods: pulumi.StringArray{
 * 				pulumi.String(apimanagement.BearerTokenSendingMethodAuthorizationHeader),
 * 			},
 * 			ClientId:                   pulumi.String("1"),
 * 			ClientRegistrationEndpoint: pulumi.String("https://www.contoso.com/apps"),
 * 			ClientSecret:               pulumi.String("2"),
 * 			DefaultScope:               pulumi.String("read write"),
 * 			Description:                pulumi.String("test server"),
 * 			DisplayName:                pulumi.String("test2"),
 * 			GrantTypes: pulumi.StringArray{
 * 				pulumi.String(apimanagement.GrantTypeAuthorizationCode),
 * 				pulumi.String(apimanagement.GrantTypeImplicit),
 * 			},
 * 			ResourceGroupName:     pulumi.String("rg1"),
 * 			ResourceOwnerPassword: pulumi.String("pwd"),
 * 			ResourceOwnerUsername: pulumi.String("un"),
 * 			ServiceName:           pulumi.String("apimService1"),
 * 			SupportState:          pulumi.Bool(true),
 * 			TokenEndpoint:         pulumi.String("https://www.contoso.com/oauth2/token"),
 * 			UseInApiDocumentation: pulumi.Bool(true),
 * 			UseInTestConsole:      pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.apimanagement.AuthorizationServer;
 * import com.pulumi.azurenative.apimanagement.AuthorizationServerArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var authorizationServer = new AuthorizationServer("authorizationServer", AuthorizationServerArgs.builder()
 *             .authorizationEndpoint("https://www.contoso.com/oauth2/auth")
 *             .authorizationMethods("GET")
 *             .authsid("newauthServer")
 *             .bearerTokenSendingMethods("authorizationHeader")
 *             .clientId("1")
 *             .clientRegistrationEndpoint("https://www.contoso.com/apps")
 *             .clientSecret("2")
 *             .defaultScope("read write")
 *             .description("test server")
 *             .displayName("test2")
 *             .grantTypes(
 *                 "authorizationCode",
 *                 "implicit")
 *             .resourceGroupName("rg1")
 *             .resourceOwnerPassword("pwd")
 *             .resourceOwnerUsername("un")
 *             .serviceName("apimService1")
 *             .supportState(true)
 *             .tokenEndpoint("https://www.contoso.com/oauth2/token")
 *             .useInApiDocumentation(true)
 *             .useInTestConsole(false)
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:apimanagement:AuthorizationServer newauthServer /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}
 * ```
 * @property authorizationEndpoint OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
 * @property authorizationMethods HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
 * @property authsid Identifier of the authorization server.
 * @property bearerTokenSendingMethods Specifies the mechanism by which access token is passed to the API.
 * @property clientAuthenticationMethod Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
 * @property clientId Client or app id registered with this authorization server.
 * @property clientRegistrationEndpoint Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
 * @property clientSecret Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
 * @property defaultScope Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
 * @property description Description of the authorization server. Can contain HTML formatting tags.
 * @property displayName User-friendly authorization server name.
 * @property grantTypes Form of an authorization grant, which the client uses to request the access token.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property resourceOwnerPassword Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
 * @property resourceOwnerUsername Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
 * @property serviceName The name of the API Management service.
 * @property supportState If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
 * @property tokenBodyParameters Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
 * @property tokenEndpoint OAuth token endpoint. Contains absolute URI to entity being referenced.
 * @property useInApiDocumentation If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided.
 * @property useInTestConsole If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.
 */
public data class AuthorizationServerArgs(
    public val authorizationEndpoint: Output? = null,
    public val authorizationMethods: Output>? = null,
    public val authsid: Output? = null,
    public val bearerTokenSendingMethods: Output>>? =
        null,
    public val clientAuthenticationMethod: Output>>? =
        null,
    public val clientId: Output? = null,
    public val clientRegistrationEndpoint: Output? = null,
    public val clientSecret: Output? = null,
    public val defaultScope: Output? = null,
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val grantTypes: Output>>? = null,
    public val resourceGroupName: Output? = null,
    public val resourceOwnerPassword: Output? = null,
    public val resourceOwnerUsername: Output? = null,
    public val serviceName: Output? = null,
    public val supportState: Output? = null,
    public val tokenBodyParameters: Output>? = null,
    public val tokenEndpoint: Output? = null,
    public val useInApiDocumentation: Output? = null,
    public val useInTestConsole: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.apimanagement.AuthorizationServerArgs =
        com.pulumi.azurenative.apimanagement.AuthorizationServerArgs.builder()
            .authorizationEndpoint(authorizationEndpoint?.applyValue({ args0 -> args0 }))
            .authorizationMethods(
                authorizationMethods?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .authsid(authsid?.applyValue({ args0 -> args0 }))
            .bearerTokenSendingMethods(
                bearerTokenSendingMethods?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                    })
                }),
            )
            .clientAuthenticationMethod(
                clientAuthenticationMethod?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                    })
                }),
            )
            .clientId(clientId?.applyValue({ args0 -> args0 }))
            .clientRegistrationEndpoint(clientRegistrationEndpoint?.applyValue({ args0 -> args0 }))
            .clientSecret(clientSecret?.applyValue({ args0 -> args0 }))
            .defaultScope(defaultScope?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .grantTypes(
                grantTypes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform(
                            { args0 -> args0 },
                            { args0 -> args0.let({ args0 -> args0.toJava() }) },
                        )
                    })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .resourceOwnerPassword(resourceOwnerPassword?.applyValue({ args0 -> args0 }))
            .resourceOwnerUsername(resourceOwnerUsername?.applyValue({ args0 -> args0 }))
            .serviceName(serviceName?.applyValue({ args0 -> args0 }))
            .supportState(supportState?.applyValue({ args0 -> args0 }))
            .tokenBodyParameters(
                tokenBodyParameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .tokenEndpoint(tokenEndpoint?.applyValue({ args0 -> args0 }))
            .useInApiDocumentation(useInApiDocumentation?.applyValue({ args0 -> args0 }))
            .useInTestConsole(useInTestConsole?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AuthorizationServerArgs].
 */
@PulumiTagMarker
public class AuthorizationServerArgsBuilder internal constructor() {
    private var authorizationEndpoint: Output? = null

    private var authorizationMethods: Output>? = null

    private var authsid: Output? = null

    private var bearerTokenSendingMethods: Output>>? =
        null

    private var clientAuthenticationMethod: Output>>? =
        null

    private var clientId: Output? = null

    private var clientRegistrationEndpoint: Output? = null

    private var clientSecret: Output? = null

    private var defaultScope: Output? = null

    private var description: Output? = null

    private var displayName: Output? = null

    private var grantTypes: Output>>? = null

    private var resourceGroupName: Output? = null

    private var resourceOwnerPassword: Output? = null

    private var resourceOwnerUsername: Output? = null

    private var serviceName: Output? = null

    private var supportState: Output? = null

    private var tokenBodyParameters: Output>? = null

    private var tokenEndpoint: Output? = null

    private var useInApiDocumentation: Output? = null

    private var useInTestConsole: Output? = null

    /**
     * @param value OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
     */
    @JvmName("gngmbyfyjlqiygee")
    public suspend fun authorizationEndpoint(`value`: Output) {
        this.authorizationEndpoint = value
    }

    /**
     * @param value HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
     */
    @JvmName("qcilrinblpdepvgf")
    public suspend fun authorizationMethods(`value`: Output>) {
        this.authorizationMethods = value
    }

    @JvmName("ukrgfwdhinawafqn")
    public suspend fun authorizationMethods(vararg values: Output) {
        this.authorizationMethods = Output.all(values.asList())
    }

    /**
     * @param values HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
     */
    @JvmName("oymvdkxpybehvpfi")
    public suspend fun authorizationMethods(values: List>) {
        this.authorizationMethods = Output.all(values)
    }

    /**
     * @param value Identifier of the authorization server.
     */
    @JvmName("xchyaydbmexfifys")
    public suspend fun authsid(`value`: Output) {
        this.authsid = value
    }

    /**
     * @param value Specifies the mechanism by which access token is passed to the API.
     */
    @JvmName("ywolhpphalpjkilk")
    public suspend fun bearerTokenSendingMethods(`value`: Output>>) {
        this.bearerTokenSendingMethods = value
    }

    @JvmName("sfwxwrcemsmdpthl")
    public suspend fun bearerTokenSendingMethods(vararg values: Output>) {
        this.bearerTokenSendingMethods = Output.all(values.asList())
    }

    /**
     * @param values Specifies the mechanism by which access token is passed to the API.
     */
    @JvmName("sifsxohuuglpbglb")
    public suspend fun bearerTokenSendingMethods(values: List>>) {
        this.bearerTokenSendingMethods = Output.all(values)
    }

    /**
     * @param value Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
     */
    @JvmName("dfskgbfcwncvacft")
    public suspend fun clientAuthenticationMethod(`value`: Output>>) {
        this.clientAuthenticationMethod = value
    }

    @JvmName("sucusrmavlpyludh")
    public suspend fun clientAuthenticationMethod(vararg values: Output>) {
        this.clientAuthenticationMethod = Output.all(values.asList())
    }

    /**
     * @param values Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
     */
    @JvmName("reelkkuvmgsfagpt")
    public suspend fun clientAuthenticationMethod(values: List>>) {
        this.clientAuthenticationMethod = Output.all(values)
    }

    /**
     * @param value Client or app id registered with this authorization server.
     */
    @JvmName("sduuhmrrnoninopw")
    public suspend fun clientId(`value`: Output) {
        this.clientId = value
    }

    /**
     * @param value Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
     */
    @JvmName("qgibkrmlraysceuf")
    public suspend fun clientRegistrationEndpoint(`value`: Output) {
        this.clientRegistrationEndpoint = value
    }

    /**
     * @param value Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
     */
    @JvmName("kyondjcfpjabglpr")
    public suspend fun clientSecret(`value`: Output) {
        this.clientSecret = value
    }

    /**
     * @param value Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
     */
    @JvmName("cicrjwcpkrkxoxgn")
    public suspend fun defaultScope(`value`: Output) {
        this.defaultScope = value
    }

    /**
     * @param value Description of the authorization server. Can contain HTML formatting tags.
     */
    @JvmName("jauuamprgfqgaqyf")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value User-friendly authorization server name.
     */
    @JvmName("ktoxhhvkrldnpecp")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Form of an authorization grant, which the client uses to request the access token.
     */
    @JvmName("pjhlqpjekasasfse")
    public suspend fun grantTypes(`value`: Output>>) {
        this.grantTypes = value
    }

    @JvmName("vggmjfhpsvtcfkkt")
    public suspend fun grantTypes(vararg values: Output>) {
        this.grantTypes = Output.all(values.asList())
    }

    /**
     * @param values Form of an authorization grant, which the client uses to request the access token.
     */
    @JvmName("obarbovjjxukeubo")
    public suspend fun grantTypes(values: List>>) {
        this.grantTypes = Output.all(values)
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("rdognycuusfbjyiv")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
     */
    @JvmName("qvpceyyytrxbavku")
    public suspend fun resourceOwnerPassword(`value`: Output) {
        this.resourceOwnerPassword = value
    }

    /**
     * @param value Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
     */
    @JvmName("jcewufmwokjojtyr")
    public suspend fun resourceOwnerUsername(`value`: Output) {
        this.resourceOwnerUsername = value
    }

    /**
     * @param value The name of the API Management service.
     */
    @JvmName("wlnvuouigsphxvkk")
    public suspend fun serviceName(`value`: Output) {
        this.serviceName = value
    }

    /**
     * @param value If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
     */
    @JvmName("lukrsqhuvdxaqkoi")
    public suspend fun supportState(`value`: Output) {
        this.supportState = value
    }

    /**
     * @param value Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
     */
    @JvmName("dyqunpjjxwekhipu")
    public suspend fun tokenBodyParameters(`value`: Output>) {
        this.tokenBodyParameters = value
    }

    @JvmName("ecysgglfiakrgksd")
    public suspend fun tokenBodyParameters(vararg values: Output) {
        this.tokenBodyParameters = Output.all(values.asList())
    }

    /**
     * @param values Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
     */
    @JvmName("lbctgkhkjvrtwbtj")
    public suspend fun tokenBodyParameters(values: List>) {
        this.tokenBodyParameters = Output.all(values)
    }

    /**
     * @param value OAuth token endpoint. Contains absolute URI to entity being referenced.
     */
    @JvmName("bjomxcaykkobppbc")
    public suspend fun tokenEndpoint(`value`: Output) {
        this.tokenEndpoint = value
    }

    /**
     * @param value If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided.
     */
    @JvmName("tpgryyfxxnkxnbbo")
    public suspend fun useInApiDocumentation(`value`: Output) {
        this.useInApiDocumentation = value
    }

    /**
     * @param value If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.
     */
    @JvmName("onsylkbujekbbgdw")
    public suspend fun useInTestConsole(`value`: Output) {
        this.useInTestConsole = value
    }

    /**
     * @param value OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
     */
    @JvmName("vmmjyuhcqeofaqxj")
    public suspend fun authorizationEndpoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizationEndpoint = mapped
    }

    /**
     * @param value HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
     */
    @JvmName("yscgkbxyqlfoeeuw")
    public suspend fun authorizationMethods(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizationMethods = mapped
    }

    /**
     * @param values HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
     */
    @JvmName("whodqcxqrjhwlech")
    public suspend fun authorizationMethods(vararg values: AuthorizationMethod) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.authorizationMethods = mapped
    }

    /**
     * @param value Identifier of the authorization server.
     */
    @JvmName("mmnhjxrfnogkxxbl")
    public suspend fun authsid(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authsid = mapped
    }

    /**
     * @param value Specifies the mechanism by which access token is passed to the API.
     */
    @JvmName("cwmxmtslkhyktubt")
    public suspend fun bearerTokenSendingMethods(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bearerTokenSendingMethods = mapped
    }

    /**
     * @param values Specifies the mechanism by which access token is passed to the API.
     */
    @JvmName("onuymcyruqkuljtq")
    public suspend fun bearerTokenSendingMethods(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.bearerTokenSendingMethods = mapped
    }

    /**
     * @param value Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
     */
    @JvmName("rlvigkpqdylckyld")
    public suspend fun clientAuthenticationMethod(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientAuthenticationMethod = mapped
    }

    /**
     * @param values Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
     */
    @JvmName("oaryxxudbuypwbvi")
    public suspend fun clientAuthenticationMethod(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clientAuthenticationMethod = mapped
    }

    /**
     * @param value Client or app id registered with this authorization server.
     */
    @JvmName("gafselinlajmmviy")
    public suspend fun clientId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientId = mapped
    }

    /**
     * @param value Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
     */
    @JvmName("mspfbbmdqavewneo")
    public suspend fun clientRegistrationEndpoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientRegistrationEndpoint = mapped
    }

    /**
     * @param value Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
     */
    @JvmName("vocyqdkmcrnadogg")
    public suspend fun clientSecret(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientSecret = mapped
    }

    /**
     * @param value Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
     */
    @JvmName("koyffvaqelctgnhb")
    public suspend fun defaultScope(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultScope = mapped
    }

    /**
     * @param value Description of the authorization server. Can contain HTML formatting tags.
     */
    @JvmName("qeyowqhmcukosshr")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value User-friendly authorization server name.
     */
    @JvmName("gfklhcjoopqakwvn")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Form of an authorization grant, which the client uses to request the access token.
     */
    @JvmName("stjxfbhimfvhdqsr")
    public suspend fun grantTypes(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.grantTypes = mapped
    }

    /**
     * @param values Form of an authorization grant, which the client uses to request the access token.
     */
    @JvmName("huvyvigqgkduwxay")
    public suspend fun grantTypes(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.grantTypes = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("itsrrhyqyiqacjaw")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
     */
    @JvmName("eqfnvdvljikomacs")
    public suspend fun resourceOwnerPassword(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceOwnerPassword = mapped
    }

    /**
     * @param value Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
     */
    @JvmName("ocludlftlgojrpxt")
    public suspend fun resourceOwnerUsername(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceOwnerUsername = mapped
    }

    /**
     * @param value The name of the API Management service.
     */
    @JvmName("whyltupaioaklfgx")
    public suspend fun serviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceName = mapped
    }

    /**
     * @param value If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
     */
    @JvmName("amtlcylsggbqimfp")
    public suspend fun supportState(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.supportState = mapped
    }

    /**
     * @param value Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
     */
    @JvmName("hbwxfrtgbjwnjclf")
    public suspend fun tokenBodyParameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenBodyParameters = mapped
    }

    /**
     * @param argument Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
     */
    @JvmName("mibojsggsdxpddnj")
    public suspend fun tokenBodyParameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TokenBodyParameterContractArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tokenBodyParameters = mapped
    }

    /**
     * @param argument Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
     */
    @JvmName("rqmypkdmomevaixp")
    public suspend fun tokenBodyParameters(vararg argument: suspend TokenBodyParameterContractArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TokenBodyParameterContractArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tokenBodyParameters = mapped
    }

    /**
     * @param argument Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
     */
    @JvmName("vgdbkaoarnwgklsy")
    public suspend fun tokenBodyParameters(argument: suspend TokenBodyParameterContractArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TokenBodyParameterContractArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.tokenBodyParameters = mapped
    }

    /**
     * @param values Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
     */
    @JvmName("kdipetbiyolwktjk")
    public suspend fun tokenBodyParameters(vararg values: TokenBodyParameterContractArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tokenBodyParameters = mapped
    }

    /**
     * @param value OAuth token endpoint. Contains absolute URI to entity being referenced.
     */
    @JvmName("eklasvxwvkhdtxyh")
    public suspend fun tokenEndpoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenEndpoint = mapped
    }

    /**
     * @param value If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided.
     */
    @JvmName("fjoqywluqlgweedl")
    public suspend fun useInApiDocumentation(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.useInApiDocumentation = mapped
    }

    /**
     * @param value If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.
     */
    @JvmName("dnudggpbkexqrgan")
    public suspend fun useInTestConsole(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.useInTestConsole = mapped
    }

    internal fun build(): AuthorizationServerArgs = AuthorizationServerArgs(
        authorizationEndpoint = authorizationEndpoint,
        authorizationMethods = authorizationMethods,
        authsid = authsid,
        bearerTokenSendingMethods = bearerTokenSendingMethods,
        clientAuthenticationMethod = clientAuthenticationMethod,
        clientId = clientId,
        clientRegistrationEndpoint = clientRegistrationEndpoint,
        clientSecret = clientSecret,
        defaultScope = defaultScope,
        description = description,
        displayName = displayName,
        grantTypes = grantTypes,
        resourceGroupName = resourceGroupName,
        resourceOwnerPassword = resourceOwnerPassword,
        resourceOwnerUsername = resourceOwnerUsername,
        serviceName = serviceName,
        supportState = supportState,
        tokenBodyParameters = tokenBodyParameters,
        tokenEndpoint = tokenEndpoint,
        useInApiDocumentation = useInApiDocumentation,
        useInTestConsole = useInTestConsole,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy