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

com.pulumi.awsnative.apigateway.kotlin.outputs.GetMethodResult.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.apigateway.kotlin.outputs

import com.pulumi.core.Either
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map

/**
 *
 * @property apiKeyRequired A boolean flag specifying whether a valid ApiKey is required to invoke this method.
 * @property authorizationScopes A list of authorization scopes configured on the method. The scopes are used with a ``COGNITO_USER_POOLS`` authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
 * @property authorizationType The method's authorization type. This parameter is required. For valid values, see [Method](https://docs.aws.amazon.com/apigateway/latest/api/API_Method.html) in the *API Gateway API Reference*.
 *   If you specify the ``AuthorizerId`` property, specify ``CUSTOM`` or ``COGNITO_USER_POOLS`` for this property.
 * @property authorizerId The identifier of an authorizer to use on this method. The method's authorization type must be ``CUSTOM`` or ``COGNITO_USER_POOLS``.
 * @property integration Represents an ``HTTP``, ``HTTP_PROXY``, ``AWS``, ``AWS_PROXY``, or Mock integration.
 * @property methodResponses Gets a method response associated with a given HTTP status code.
 * @property operationName A human-friendly operation identifier for the method. For example, you can assign the ``operationName`` of ``ListPets`` for the ``GET /pets`` method in the ``PetStore`` example.
 * @property requestModels A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).
 * @property requestParameters A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key is a method request parameter name matching the pattern of ``method.request.{location}.{name}``, where ``location`` is ``querystring``, ``path``, or ``header`` and ``name`` is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (``true``) or optional (``false``). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.
 * @property requestValidatorId The identifier of a RequestValidator for request validation.
 */
public data class GetMethodResult(
    public val apiKeyRequired: Boolean? = null,
    public val authorizationScopes: List? = null,
    public val authorizationType: String? = null,
    public val authorizerId: String? = null,
    public val integration: MethodIntegration? = null,
    public val methodResponses: List? = null,
    public val operationName: String? = null,
    public val requestModels: Map? = null,
    public val requestParameters: Map>? = null,
    public val requestValidatorId: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.apigateway.outputs.GetMethodResult): GetMethodResult = GetMethodResult(
            apiKeyRequired = javaType.apiKeyRequired().map({ args0 -> args0 }).orElse(null),
            authorizationScopes = javaType.authorizationScopes().map({ args0 -> args0 }),
            authorizationType = javaType.authorizationType().map({ args0 -> args0 }).orElse(null),
            authorizerId = javaType.authorizerId().map({ args0 -> args0 }).orElse(null),
            integration = javaType.integration().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.apigateway.kotlin.outputs.MethodIntegration.Companion.toKotlin(args0)
                })
            }).orElse(null),
            methodResponses = javaType.methodResponses().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.apigateway.kotlin.outputs.MethodResponse.Companion.toKotlin(args0)
                })
            }),
            operationName = javaType.operationName().map({ args0 -> args0 }).orElse(null),
            requestModels = javaType.requestModels().map({ args0 -> args0.key.to(args0.value) }).toMap(),
            requestParameters = javaType.requestParameters().map({ args0 ->
                args0.key.to(args0.value.transform({ args0 -> args0 }, { args0 -> args0 }))
            }).toMap(),
            requestValidatorId = javaType.requestValidatorId().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy