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

com.pulumi.azurenative.apimanagement.kotlin.WorkspaceApiArgs.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.WorkspaceApiArgs.builder
import com.pulumi.azurenative.apimanagement.kotlin.enums.ApiType
import com.pulumi.azurenative.apimanagement.kotlin.enums.ContentFormat
import com.pulumi.azurenative.apimanagement.kotlin.enums.Protocol
import com.pulumi.azurenative.apimanagement.kotlin.enums.SoapApiType
import com.pulumi.azurenative.apimanagement.kotlin.enums.TranslateRequiredQueryParametersConduct
import com.pulumi.azurenative.apimanagement.kotlin.inputs.ApiContactInformationArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.ApiContactInformationArgsBuilder
import com.pulumi.azurenative.apimanagement.kotlin.inputs.ApiCreateOrUpdatePropertiesWsdlSelectorArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.ApiCreateOrUpdatePropertiesWsdlSelectorArgsBuilder
import com.pulumi.azurenative.apimanagement.kotlin.inputs.ApiLicenseInformationArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.ApiLicenseInformationArgsBuilder
import com.pulumi.azurenative.apimanagement.kotlin.inputs.ApiVersionSetContractDetailsArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.ApiVersionSetContractDetailsArgsBuilder
import com.pulumi.azurenative.apimanagement.kotlin.inputs.AuthenticationSettingsContractArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.AuthenticationSettingsContractArgsBuilder
import com.pulumi.azurenative.apimanagement.kotlin.inputs.SubscriptionKeyParameterNamesContractArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.SubscriptionKeyParameterNamesContractArgsBuilder
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

/**
 * API details.
 * Azure REST API version: 2022-09-01-preview.
 * Other available API versions: 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
 * ## Example Usage
 * ### ApiManagementCreateWorkspaceApi
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var workspaceApi = new AzureNative.ApiManagement.WorkspaceApi("workspaceApi", new()
 *     {
 *         ApiId = "tempgroup",
 *         AuthenticationSettings = new AzureNative.ApiManagement.Inputs.AuthenticationSettingsContractArgs
 *         {
 *             OAuth2 = new AzureNative.ApiManagement.Inputs.OAuth2AuthenticationSettingsContractArgs
 *             {
 *                 AuthorizationServerId = "authorizationServerId2283",
 *                 Scope = "oauth2scope2580",
 *             },
 *         },
 *         Description = "apidescription5200",
 *         DisplayName = "apiname1463",
 *         Path = "newapiPath",
 *         Protocols = new[]
 *         {
 *             AzureNative.ApiManagement.Protocol.Https,
 *             AzureNative.ApiManagement.Protocol.Http,
 *         },
 *         ResourceGroupName = "rg1",
 *         ServiceName = "apimService1",
 *         ServiceUrl = "http://newechoapi.cloudapp.net/api",
 *         SubscriptionKeyParameterNames = new AzureNative.ApiManagement.Inputs.SubscriptionKeyParameterNamesContractArgs
 *         {
 *             Header = "header4520",
 *             Query = "query3037",
 *         },
 *         WorkspaceId = "wks1",
 *     });
 * });
 * ```
 * ```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.NewWorkspaceApi(ctx, "workspaceApi", &apimanagement.WorkspaceApiArgs{
 * 			ApiId: pulumi.String("tempgroup"),
 * 			AuthenticationSettings: &apimanagement.AuthenticationSettingsContractArgs{
 * 				OAuth2: &apimanagement.OAuth2AuthenticationSettingsContractArgs{
 * 					AuthorizationServerId: pulumi.String("authorizationServerId2283"),
 * 					Scope:                 pulumi.String("oauth2scope2580"),
 * 				},
 * 			},
 * 			Description: pulumi.String("apidescription5200"),
 * 			DisplayName: pulumi.String("apiname1463"),
 * 			Path:        pulumi.String("newapiPath"),
 * 			Protocols: pulumi.StringArray{
 * 				pulumi.String(apimanagement.ProtocolHttps),
 * 				pulumi.String(apimanagement.ProtocolHttp),
 * 			},
 * 			ResourceGroupName: pulumi.String("rg1"),
 * 			ServiceName:       pulumi.String("apimService1"),
 * 			ServiceUrl:        pulumi.String("http://newechoapi.cloudapp.net/api"),
 * 			SubscriptionKeyParameterNames: &apimanagement.SubscriptionKeyParameterNamesContractArgs{
 * 				Header: pulumi.String("header4520"),
 * 				Query:  pulumi.String("query3037"),
 * 			},
 * 			WorkspaceId: pulumi.String("wks1"),
 * 		})
 * 		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.WorkspaceApi;
 * import com.pulumi.azurenative.apimanagement.WorkspaceApiArgs;
 * import com.pulumi.azurenative.apimanagement.inputs.AuthenticationSettingsContractArgs;
 * import com.pulumi.azurenative.apimanagement.inputs.OAuth2AuthenticationSettingsContractArgs;
 * import com.pulumi.azurenative.apimanagement.inputs.SubscriptionKeyParameterNamesContractArgs;
 * 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 workspaceApi = new WorkspaceApi("workspaceApi", WorkspaceApiArgs.builder()
 *             .apiId("tempgroup")
 *             .authenticationSettings(AuthenticationSettingsContractArgs.builder()
 *                 .oAuth2(OAuth2AuthenticationSettingsContractArgs.builder()
 *                     .authorizationServerId("authorizationServerId2283")
 *                     .scope("oauth2scope2580")
 *                     .build())
 *                 .build())
 *             .description("apidescription5200")
 *             .displayName("apiname1463")
 *             .path("newapiPath")
 *             .protocols(
 *                 "https",
 *                 "http")
 *             .resourceGroupName("rg1")
 *             .serviceName("apimService1")
 *             .serviceUrl("http://newechoapi.cloudapp.net/api")
 *             .subscriptionKeyParameterNames(SubscriptionKeyParameterNamesContractArgs.builder()
 *                 .header("header4520")
 *                 .query("query3037")
 *                 .build())
 *             .workspaceId("wks1")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:apimanagement:WorkspaceApi apiid9419 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}
 * ```
 * @property apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
 * @property apiRevision Describes the revision of the API. If no value is provided, default revision 1 is created
 * @property apiRevisionDescription Description of the API Revision.
 * @property apiType Type of API.
 * @property apiVersion Indicates the version identifier of the API if the API is versioned
 * @property apiVersionDescription Description of the API Version.
 * @property apiVersionSet Version set details
 * @property apiVersionSetId A resource identifier for the related ApiVersionSet.
 * @property authenticationSettings Collection of authentication settings included into this API.
 * @property contact Contact information for the API.
 * @property description Description of the API. May include HTML formatting tags.
 * @property displayName API name. Must be 1 to 300 characters long.
 * @property format Format of the Content in which the API is getting imported.
 * @property isCurrent Indicates if API revision is current api revision.
 * @property license License information for the API.
 * @property path Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.
 * @property protocols Describes on which protocols the operations in this API can be invoked.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property serviceName The name of the API Management service.
 * @property serviceUrl Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
 * @property soapApiType Type of API to create.
 *  * `http` creates a REST API
 *  * `soap` creates a SOAP pass-through API
 *  * `websocket` creates websocket API
 *  * `graphql` creates GraphQL API.
 * @property sourceApiId API identifier of the source API.
 * @property subscriptionKeyParameterNames Protocols over which API is made available.
 * @property subscriptionRequired Specifies whether an API or Product subscription is required for accessing the API.
 * @property termsOfServiceUrl  A URL to the Terms of Service for the API. MUST be in the format of a URL.
 * @property translateRequiredQueryParametersConduct Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'
 * @property value Content value when Importing an API.
 * @property workspaceId Workspace identifier. Must be unique in the current API Management service instance.
 * @property wsdlSelector Criteria to limit import of WSDL to a subset of the document.
 */
public data class WorkspaceApiArgs(
    public val apiId: Output? = null,
    public val apiRevision: Output? = null,
    public val apiRevisionDescription: Output? = null,
    public val apiType: Output>? = null,
    public val apiVersion: Output? = null,
    public val apiVersionDescription: Output? = null,
    public val apiVersionSet: Output? = null,
    public val apiVersionSetId: Output? = null,
    public val authenticationSettings: Output? = null,
    public val contact: Output? = null,
    public val description: Output? = null,
    public val displayName: Output? = null,
    public val format: Output>? = null,
    public val isCurrent: Output? = null,
    public val license: Output? = null,
    public val path: Output? = null,
    public val protocols: Output>>? = null,
    public val resourceGroupName: Output? = null,
    public val serviceName: Output? = null,
    public val serviceUrl: Output? = null,
    public val soapApiType: Output>? = null,
    public val sourceApiId: Output? = null,
    public val subscriptionKeyParameterNames: Output? =
        null,
    public val subscriptionRequired: Output? = null,
    public val termsOfServiceUrl: Output? = null,
    public val translateRequiredQueryParametersConduct: Output>? = null,
    public val `value`: Output? = null,
    public val workspaceId: Output? = null,
    public val wsdlSelector: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.apimanagement.WorkspaceApiArgs =
        com.pulumi.azurenative.apimanagement.WorkspaceApiArgs.builder()
            .apiId(apiId?.applyValue({ args0 -> args0 }))
            .apiRevision(apiRevision?.applyValue({ args0 -> args0 }))
            .apiRevisionDescription(apiRevisionDescription?.applyValue({ args0 -> args0 }))
            .apiType(
                apiType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .apiVersion(apiVersion?.applyValue({ args0 -> args0 }))
            .apiVersionDescription(apiVersionDescription?.applyValue({ args0 -> args0 }))
            .apiVersionSet(apiVersionSet?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .apiVersionSetId(apiVersionSetId?.applyValue({ args0 -> args0 }))
            .authenticationSettings(
                authenticationSettings?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .contact(contact?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .format(
                format?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .isCurrent(isCurrent?.applyValue({ args0 -> args0 }))
            .license(license?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .path(path?.applyValue({ args0 -> args0 }))
            .protocols(
                protocols?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform(
                            { args0 -> args0 },
                            { args0 -> args0.let({ args0 -> args0.toJava() }) },
                        )
                    })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .serviceName(serviceName?.applyValue({ args0 -> args0 }))
            .serviceUrl(serviceUrl?.applyValue({ args0 -> args0 }))
            .soapApiType(
                soapApiType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .sourceApiId(sourceApiId?.applyValue({ args0 -> args0 }))
            .subscriptionKeyParameterNames(
                subscriptionKeyParameterNames?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .subscriptionRequired(subscriptionRequired?.applyValue({ args0 -> args0 }))
            .termsOfServiceUrl(termsOfServiceUrl?.applyValue({ args0 -> args0 }))
            .translateRequiredQueryParametersConduct(
                translateRequiredQueryParametersConduct?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .`value`(`value`?.applyValue({ args0 -> args0 }))
            .workspaceId(workspaceId?.applyValue({ args0 -> args0 }))
            .wsdlSelector(wsdlSelector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [WorkspaceApiArgs].
 */
@PulumiTagMarker
public class WorkspaceApiArgsBuilder internal constructor() {
    private var apiId: Output? = null

    private var apiRevision: Output? = null

    private var apiRevisionDescription: Output? = null

    private var apiType: Output>? = null

    private var apiVersion: Output? = null

    private var apiVersionDescription: Output? = null

    private var apiVersionSet: Output? = null

    private var apiVersionSetId: Output? = null

    private var authenticationSettings: Output? = null

    private var contact: Output? = null

    private var description: Output? = null

    private var displayName: Output? = null

    private var format: Output>? = null

    private var isCurrent: Output? = null

    private var license: Output? = null

    private var path: Output? = null

    private var protocols: Output>>? = null

    private var resourceGroupName: Output? = null

    private var serviceName: Output? = null

    private var serviceUrl: Output? = null

    private var soapApiType: Output>? = null

    private var sourceApiId: Output? = null

    private var subscriptionKeyParameterNames: Output? =
        null

    private var subscriptionRequired: Output? = null

    private var termsOfServiceUrl: Output? = null

    private var translateRequiredQueryParametersConduct:
        Output>? = null

    private var `value`: Output? = null

    private var workspaceId: Output? = null

    private var wsdlSelector: Output? = null

    /**
     * @param value API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
     */
    @JvmName("xbyjundidxdvhakp")
    public suspend fun apiId(`value`: Output) {
        this.apiId = value
    }

    /**
     * @param value Describes the revision of the API. If no value is provided, default revision 1 is created
     */
    @JvmName("nnnhxsdkwbtcolvf")
    public suspend fun apiRevision(`value`: Output) {
        this.apiRevision = value
    }

    /**
     * @param value Description of the API Revision.
     */
    @JvmName("fqubhioklpoaqqiv")
    public suspend fun apiRevisionDescription(`value`: Output) {
        this.apiRevisionDescription = value
    }

    /**
     * @param value Type of API.
     */
    @JvmName("aerkcaiuyedwsxay")
    public suspend fun apiType(`value`: Output>) {
        this.apiType = value
    }

    /**
     * @param value Indicates the version identifier of the API if the API is versioned
     */
    @JvmName("xtgfcpswhfcjeobn")
    public suspend fun apiVersion(`value`: Output) {
        this.apiVersion = value
    }

    /**
     * @param value Description of the API Version.
     */
    @JvmName("cvrelfeatiyouduv")
    public suspend fun apiVersionDescription(`value`: Output) {
        this.apiVersionDescription = value
    }

    /**
     * @param value Version set details
     */
    @JvmName("hgucomldljhuxaff")
    public suspend fun apiVersionSet(`value`: Output) {
        this.apiVersionSet = value
    }

    /**
     * @param value A resource identifier for the related ApiVersionSet.
     */
    @JvmName("sbhdtpgcsnonaimr")
    public suspend fun apiVersionSetId(`value`: Output) {
        this.apiVersionSetId = value
    }

    /**
     * @param value Collection of authentication settings included into this API.
     */
    @JvmName("kesmpvnetcbjechf")
    public suspend fun authenticationSettings(`value`: Output) {
        this.authenticationSettings = value
    }

    /**
     * @param value Contact information for the API.
     */
    @JvmName("sywcfxokshgohcbi")
    public suspend fun contact(`value`: Output) {
        this.contact = value
    }

    /**
     * @param value Description of the API. May include HTML formatting tags.
     */
    @JvmName("eoxvoheaweifstxb")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value API name. Must be 1 to 300 characters long.
     */
    @JvmName("wcawdqnmmjcamcyp")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Format of the Content in which the API is getting imported.
     */
    @JvmName("qjiguwgckpmlpepa")
    public suspend fun format(`value`: Output>) {
        this.format = value
    }

    /**
     * @param value Indicates if API revision is current api revision.
     */
    @JvmName("tsgbrmuwhyrgqmsy")
    public suspend fun isCurrent(`value`: Output) {
        this.isCurrent = value
    }

    /**
     * @param value License information for the API.
     */
    @JvmName("visihbvwphgfhvcg")
    public suspend fun license(`value`: Output) {
        this.license = value
    }

    /**
     * @param value Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.
     */
    @JvmName("dlnufnwujorvagbm")
    public suspend fun path(`value`: Output) {
        this.path = value
    }

    /**
     * @param value Describes on which protocols the operations in this API can be invoked.
     */
    @JvmName("cpghxeqktqbxepuj")
    public suspend fun protocols(`value`: Output>>) {
        this.protocols = value
    }

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

    /**
     * @param values Describes on which protocols the operations in this API can be invoked.
     */
    @JvmName("bgstrplpsklknbbj")
    public suspend fun protocols(values: List>>) {
        this.protocols = Output.all(values)
    }

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

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

    /**
     * @param value Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
     */
    @JvmName("ceanrhbkmjydqtmj")
    public suspend fun serviceUrl(`value`: Output) {
        this.serviceUrl = value
    }

    /**
     * @param value Type of API to create.
     *  * `http` creates a REST API
     *  * `soap` creates a SOAP pass-through API
     *  * `websocket` creates websocket API
     *  * `graphql` creates GraphQL API.
     */
    @JvmName("ichhbcdrbbablogi")
    public suspend fun soapApiType(`value`: Output>) {
        this.soapApiType = value
    }

    /**
     * @param value API identifier of the source API.
     */
    @JvmName("pyjwpsarylwnnsbq")
    public suspend fun sourceApiId(`value`: Output) {
        this.sourceApiId = value
    }

    /**
     * @param value Protocols over which API is made available.
     */
    @JvmName("hihpavrigsmyqxsq")
    public suspend fun subscriptionKeyParameterNames(`value`: Output) {
        this.subscriptionKeyParameterNames = value
    }

    /**
     * @param value Specifies whether an API or Product subscription is required for accessing the API.
     */
    @JvmName("qjpfggoyimwerghh")
    public suspend fun subscriptionRequired(`value`: Output) {
        this.subscriptionRequired = value
    }

    /**
     * @param value  A URL to the Terms of Service for the API. MUST be in the format of a URL.
     */
    @JvmName("otdsrjtdpviuljth")
    public suspend fun termsOfServiceUrl(`value`: Output) {
        this.termsOfServiceUrl = value
    }

    /**
     * @param value Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'
     */
    @JvmName("bfayrpyepkpdcija")
    public suspend fun translateRequiredQueryParametersConduct(`value`: Output>) {
        this.translateRequiredQueryParametersConduct = value
    }

    /**
     * @param value Content value when Importing an API.
     */
    @JvmName("sskabhdyklvggmsn")
    public suspend fun `value`(`value`: Output) {
        this.`value` = value
    }

    /**
     * @param value Workspace identifier. Must be unique in the current API Management service instance.
     */
    @JvmName("tratfuqhnuqminpv")
    public suspend fun workspaceId(`value`: Output) {
        this.workspaceId = value
    }

    /**
     * @param value Criteria to limit import of WSDL to a subset of the document.
     */
    @JvmName("kgymxaxwdfvpaqnk")
    public suspend fun wsdlSelector(`value`: Output) {
        this.wsdlSelector = value
    }

    /**
     * @param value API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
     */
    @JvmName("qilogsnvlohcesbg")
    public suspend fun apiId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiId = mapped
    }

    /**
     * @param value Describes the revision of the API. If no value is provided, default revision 1 is created
     */
    @JvmName("olnedsxofqpncxmv")
    public suspend fun apiRevision(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiRevision = mapped
    }

    /**
     * @param value Description of the API Revision.
     */
    @JvmName("hdkljinsfvyqabdf")
    public suspend fun apiRevisionDescription(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiRevisionDescription = mapped
    }

    /**
     * @param value Type of API.
     */
    @JvmName("rniywliwblipbjee")
    public suspend fun apiType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiType = mapped
    }

    /**
     * @param value Type of API.
     */
    @JvmName("ioffmymstwlpeknq")
    public fun apiType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.apiType = mapped
    }

    /**
     * @param value Type of API.
     */
    @JvmName("efucclpsywciukpa")
    public fun apiType(`value`: ApiType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.apiType = mapped
    }

    /**
     * @param value Indicates the version identifier of the API if the API is versioned
     */
    @JvmName("eopieebokqfgwopn")
    public suspend fun apiVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiVersion = mapped
    }

    /**
     * @param value Description of the API Version.
     */
    @JvmName("nioatbogicjxnlje")
    public suspend fun apiVersionDescription(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiVersionDescription = mapped
    }

    /**
     * @param value Version set details
     */
    @JvmName("iksetektjerglxve")
    public suspend fun apiVersionSet(`value`: ApiVersionSetContractDetailsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiVersionSet = mapped
    }

    /**
     * @param argument Version set details
     */
    @JvmName("viiosauxdhpmykqp")
    public suspend fun apiVersionSet(argument: suspend ApiVersionSetContractDetailsArgsBuilder.() -> Unit) {
        val toBeMapped = ApiVersionSetContractDetailsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.apiVersionSet = mapped
    }

    /**
     * @param value A resource identifier for the related ApiVersionSet.
     */
    @JvmName("ixqpouprhgodgpuj")
    public suspend fun apiVersionSetId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiVersionSetId = mapped
    }

    /**
     * @param value Collection of authentication settings included into this API.
     */
    @JvmName("tkgmuwjankkfbapk")
    public suspend fun authenticationSettings(`value`: AuthenticationSettingsContractArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authenticationSettings = mapped
    }

    /**
     * @param argument Collection of authentication settings included into this API.
     */
    @JvmName("fhkrviccwjgnkulo")
    public suspend fun authenticationSettings(argument: suspend AuthenticationSettingsContractArgsBuilder.() -> Unit) {
        val toBeMapped = AuthenticationSettingsContractArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.authenticationSettings = mapped
    }

    /**
     * @param value Contact information for the API.
     */
    @JvmName("xtwecnrpkndwixyk")
    public suspend fun contact(`value`: ApiContactInformationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contact = mapped
    }

    /**
     * @param argument Contact information for the API.
     */
    @JvmName("bixsehnefjpavdgl")
    public suspend fun contact(argument: suspend ApiContactInformationArgsBuilder.() -> Unit) {
        val toBeMapped = ApiContactInformationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.contact = mapped
    }

    /**
     * @param value Description of the API. May include HTML formatting tags.
     */
    @JvmName("gocreaaavemwxisu")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value API name. Must be 1 to 300 characters long.
     */
    @JvmName("rxlijvvtxwvnaudu")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Format of the Content in which the API is getting imported.
     */
    @JvmName("jexwydvqeukkpgmf")
    public suspend fun format(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.format = mapped
    }

    /**
     * @param value Format of the Content in which the API is getting imported.
     */
    @JvmName("mgdhbmpssgppkfah")
    public fun format(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.format = mapped
    }

    /**
     * @param value Format of the Content in which the API is getting imported.
     */
    @JvmName("pohujjitsiuqdjon")
    public fun format(`value`: ContentFormat) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.format = mapped
    }

    /**
     * @param value Indicates if API revision is current api revision.
     */
    @JvmName("doifwtpykhnkadar")
    public suspend fun isCurrent(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isCurrent = mapped
    }

    /**
     * @param value License information for the API.
     */
    @JvmName("oqeqgwrtnenxhiff")
    public suspend fun license(`value`: ApiLicenseInformationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.license = mapped
    }

    /**
     * @param argument License information for the API.
     */
    @JvmName("dclgjxymfqrnxedm")
    public suspend fun license(argument: suspend ApiLicenseInformationArgsBuilder.() -> Unit) {
        val toBeMapped = ApiLicenseInformationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.license = mapped
    }

    /**
     * @param value Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.
     */
    @JvmName("vfilkyihoxrhwsoa")
    public suspend fun path(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.path = mapped
    }

    /**
     * @param value Describes on which protocols the operations in this API can be invoked.
     */
    @JvmName("jsgriytgjjtlbmtu")
    public suspend fun protocols(`value`: List>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protocols = mapped
    }

    /**
     * @param values Describes on which protocols the operations in this API can be invoked.
     */
    @JvmName("axnifpjswateugsv")
    public suspend fun protocols(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocols = mapped
    }

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

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

    /**
     * @param value Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
     */
    @JvmName("gfdhrodwwehbpcpm")
    public suspend fun serviceUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceUrl = mapped
    }

    /**
     * @param value Type of API to create.
     *  * `http` creates a REST API
     *  * `soap` creates a SOAP pass-through API
     *  * `websocket` creates websocket API
     *  * `graphql` creates GraphQL API.
     */
    @JvmName("gopbjqtuivkawnpq")
    public suspend fun soapApiType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.soapApiType = mapped
    }

    /**
     * @param value Type of API to create.
     *  * `http` creates a REST API
     *  * `soap` creates a SOAP pass-through API
     *  * `websocket` creates websocket API
     *  * `graphql` creates GraphQL API.
     */
    @JvmName("nkobnvxtlojaafgh")
    public fun soapApiType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.soapApiType = mapped
    }

    /**
     * @param value Type of API to create.
     *  * `http` creates a REST API
     *  * `soap` creates a SOAP pass-through API
     *  * `websocket` creates websocket API
     *  * `graphql` creates GraphQL API.
     */
    @JvmName("sbvqwiijhdbvlnwp")
    public fun soapApiType(`value`: SoapApiType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.soapApiType = mapped
    }

    /**
     * @param value API identifier of the source API.
     */
    @JvmName("skfjkcjerdhxbifp")
    public suspend fun sourceApiId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceApiId = mapped
    }

    /**
     * @param value Protocols over which API is made available.
     */
    @JvmName("buuqoicsqxdfvqyr")
    public suspend fun subscriptionKeyParameterNames(`value`: SubscriptionKeyParameterNamesContractArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subscriptionKeyParameterNames = mapped
    }

    /**
     * @param argument Protocols over which API is made available.
     */
    @JvmName("bufkfkixivtadein")
    public suspend fun subscriptionKeyParameterNames(argument: suspend SubscriptionKeyParameterNamesContractArgsBuilder.() -> Unit) {
        val toBeMapped = SubscriptionKeyParameterNamesContractArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.subscriptionKeyParameterNames = mapped
    }

    /**
     * @param value Specifies whether an API or Product subscription is required for accessing the API.
     */
    @JvmName("exqiobwvafjqurpe")
    public suspend fun subscriptionRequired(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subscriptionRequired = mapped
    }

    /**
     * @param value  A URL to the Terms of Service for the API. MUST be in the format of a URL.
     */
    @JvmName("ptalxaadqblslyuv")
    public suspend fun termsOfServiceUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.termsOfServiceUrl = mapped
    }

    /**
     * @param value Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'
     */
    @JvmName("akovaeaxiaijbyvf")
    public suspend fun translateRequiredQueryParametersConduct(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.translateRequiredQueryParametersConduct = mapped
    }

    /**
     * @param value Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'
     */
    @JvmName("eacmjbcyrnrhuaje")
    public fun translateRequiredQueryParametersConduct(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.translateRequiredQueryParametersConduct = mapped
    }

    /**
     * @param value Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'
     */
    @JvmName("lysxjxmthbppadch")
    public fun translateRequiredQueryParametersConduct(`value`: TranslateRequiredQueryParametersConduct) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.translateRequiredQueryParametersConduct = mapped
    }

    /**
     * @param value Content value when Importing an API.
     */
    @JvmName("ldldmwmhxdldqamm")
    public suspend fun `value`(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`value` = mapped
    }

    /**
     * @param value Workspace identifier. Must be unique in the current API Management service instance.
     */
    @JvmName("wtatakssfrnsvduo")
    public suspend fun workspaceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workspaceId = mapped
    }

    /**
     * @param value Criteria to limit import of WSDL to a subset of the document.
     */
    @JvmName("mfbegrohbvoxhsau")
    public suspend fun wsdlSelector(`value`: ApiCreateOrUpdatePropertiesWsdlSelectorArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.wsdlSelector = mapped
    }

    /**
     * @param argument Criteria to limit import of WSDL to a subset of the document.
     */
    @JvmName("fwncuebbwqyqiley")
    public suspend fun wsdlSelector(argument: suspend ApiCreateOrUpdatePropertiesWsdlSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = ApiCreateOrUpdatePropertiesWsdlSelectorArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.wsdlSelector = mapped
    }

    internal fun build(): WorkspaceApiArgs = WorkspaceApiArgs(
        apiId = apiId,
        apiRevision = apiRevision,
        apiRevisionDescription = apiRevisionDescription,
        apiType = apiType,
        apiVersion = apiVersion,
        apiVersionDescription = apiVersionDescription,
        apiVersionSet = apiVersionSet,
        apiVersionSetId = apiVersionSetId,
        authenticationSettings = authenticationSettings,
        contact = contact,
        description = description,
        displayName = displayName,
        format = format,
        isCurrent = isCurrent,
        license = license,
        path = path,
        protocols = protocols,
        resourceGroupName = resourceGroupName,
        serviceName = serviceName,
        serviceUrl = serviceUrl,
        soapApiType = soapApiType,
        sourceApiId = sourceApiId,
        subscriptionKeyParameterNames = subscriptionKeyParameterNames,
        subscriptionRequired = subscriptionRequired,
        termsOfServiceUrl = termsOfServiceUrl,
        translateRequiredQueryParametersConduct = translateRequiredQueryParametersConduct,
        `value` = `value`,
        workspaceId = workspaceId,
        wsdlSelector = wsdlSelector,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy