module Stratosphere.ApiGatewayV2.Authorizer ( module Exports, Authorizer(..), mkAuthorizer ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.ApiGatewayV2.Authorizer.JWTConfigurationProperty as Exports import Stratosphere.ResourceProperties import Stratosphere.Value data Authorizer = -- | See: Authorizer {haddock_workaround_ :: (), -- | See: apiId :: (Value Prelude.Text), -- | See: authorizerCredentialsArn :: (Prelude.Maybe (Value Prelude.Text)), -- | See: authorizerPayloadFormatVersion :: (Prelude.Maybe (Value Prelude.Text)), -- | See: authorizerResultTtlInSeconds :: (Prelude.Maybe (Value Prelude.Integer)), -- | See: authorizerType :: (Value Prelude.Text), -- | See: authorizerUri :: (Prelude.Maybe (Value Prelude.Text)), -- | See: enableSimpleResponses :: (Prelude.Maybe (Value Prelude.Bool)), -- | See: identitySource :: (Prelude.Maybe (ValueList Prelude.Text)), -- | See: identityValidationExpression :: (Prelude.Maybe (Value Prelude.Text)), -- | See: jwtConfiguration :: (Prelude.Maybe JWTConfigurationProperty), -- | See: name :: (Value Prelude.Text)} deriving stock (Prelude.Eq, Prelude.Show) mkAuthorizer :: Value Prelude.Text -> Value Prelude.Text -> Value Prelude.Text -> Authorizer mkAuthorizer apiId authorizerType name = Authorizer {haddock_workaround_ = (), apiId = apiId, authorizerType = authorizerType, name = name, authorizerCredentialsArn = Prelude.Nothing, authorizerPayloadFormatVersion = Prelude.Nothing, authorizerResultTtlInSeconds = Prelude.Nothing, authorizerUri = Prelude.Nothing, enableSimpleResponses = Prelude.Nothing, identitySource = Prelude.Nothing, identityValidationExpression = Prelude.Nothing, jwtConfiguration = Prelude.Nothing} instance ToResourceProperties Authorizer where toResourceProperties Authorizer {..} = ResourceProperties {awsType = "AWS::ApiGatewayV2::Authorizer", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["ApiId" JSON..= apiId, "AuthorizerType" JSON..= authorizerType, "Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "AuthorizerCredentialsArn" Prelude.<$> authorizerCredentialsArn, (JSON..=) "AuthorizerPayloadFormatVersion" Prelude.<$> authorizerPayloadFormatVersion, (JSON..=) "AuthorizerResultTtlInSeconds" Prelude.<$> authorizerResultTtlInSeconds, (JSON..=) "AuthorizerUri" Prelude.<$> authorizerUri, (JSON..=) "EnableSimpleResponses" Prelude.<$> enableSimpleResponses, (JSON..=) "IdentitySource" Prelude.<$> identitySource, (JSON..=) "IdentityValidationExpression" Prelude.<$> identityValidationExpression, (JSON..=) "JwtConfiguration" Prelude.<$> jwtConfiguration]))} instance JSON.ToJSON Authorizer where toJSON Authorizer {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["ApiId" JSON..= apiId, "AuthorizerType" JSON..= authorizerType, "Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "AuthorizerCredentialsArn" Prelude.<$> authorizerCredentialsArn, (JSON..=) "AuthorizerPayloadFormatVersion" Prelude.<$> authorizerPayloadFormatVersion, (JSON..=) "AuthorizerResultTtlInSeconds" Prelude.<$> authorizerResultTtlInSeconds, (JSON..=) "AuthorizerUri" Prelude.<$> authorizerUri, (JSON..=) "EnableSimpleResponses" Prelude.<$> enableSimpleResponses, (JSON..=) "IdentitySource" Prelude.<$> identitySource, (JSON..=) "IdentityValidationExpression" Prelude.<$> identityValidationExpression, (JSON..=) "JwtConfiguration" Prelude.<$> jwtConfiguration]))) instance Property "ApiId" Authorizer where type PropertyType "ApiId" Authorizer = Value Prelude.Text set newValue Authorizer {..} = Authorizer {apiId = newValue, ..} instance Property "AuthorizerCredentialsArn" Authorizer where type PropertyType "AuthorizerCredentialsArn" Authorizer = Value Prelude.Text set newValue Authorizer {..} = Authorizer {authorizerCredentialsArn = Prelude.pure newValue, ..} instance Property "AuthorizerPayloadFormatVersion" Authorizer where type PropertyType "AuthorizerPayloadFormatVersion" Authorizer = Value Prelude.Text set newValue Authorizer {..} = Authorizer {authorizerPayloadFormatVersion = Prelude.pure newValue, ..} instance Property "AuthorizerResultTtlInSeconds" Authorizer where type PropertyType "AuthorizerResultTtlInSeconds" Authorizer = Value Prelude.Integer set newValue Authorizer {..} = Authorizer {authorizerResultTtlInSeconds = Prelude.pure newValue, ..} instance Property "AuthorizerType" Authorizer where type PropertyType "AuthorizerType" Authorizer = Value Prelude.Text set newValue Authorizer {..} = Authorizer {authorizerType = newValue, ..} instance Property "AuthorizerUri" Authorizer where type PropertyType "AuthorizerUri" Authorizer = Value Prelude.Text set newValue Authorizer {..} = Authorizer {authorizerUri = Prelude.pure newValue, ..} instance Property "EnableSimpleResponses" Authorizer where type PropertyType "EnableSimpleResponses" Authorizer = Value Prelude.Bool set newValue Authorizer {..} = Authorizer {enableSimpleResponses = Prelude.pure newValue, ..} instance Property "IdentitySource" Authorizer where type PropertyType "IdentitySource" Authorizer = ValueList Prelude.Text set newValue Authorizer {..} = Authorizer {identitySource = Prelude.pure newValue, ..} instance Property "IdentityValidationExpression" Authorizer where type PropertyType "IdentityValidationExpression" Authorizer = Value Prelude.Text set newValue Authorizer {..} = Authorizer {identityValidationExpression = Prelude.pure newValue, ..} instance Property "JwtConfiguration" Authorizer where type PropertyType "JwtConfiguration" Authorizer = JWTConfigurationProperty set newValue Authorizer {..} = Authorizer {jwtConfiguration = Prelude.pure newValue, ..} instance Property "Name" Authorizer where type PropertyType "Name" Authorizer = Value Prelude.Text set newValue Authorizer {..} = Authorizer {name = newValue, ..}