{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ApiGatewayV2.CreateApi
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an Api resource.
module Amazonka.ApiGatewayV2.CreateApi
  ( -- * Creating a Request
    CreateApi (..),
    newCreateApi,

    -- * Request Lenses
    createApi_apiKeySelectionExpression,
    createApi_corsConfiguration,
    createApi_credentialsArn,
    createApi_description,
    createApi_disableExecuteApiEndpoint,
    createApi_disableSchemaValidation,
    createApi_routeKey,
    createApi_routeSelectionExpression,
    createApi_tags,
    createApi_target,
    createApi_version,
    createApi_protocolType,
    createApi_name,

    -- * Destructuring the Response
    CreateApiResponse (..),
    newCreateApiResponse,

    -- * Response Lenses
    createApiResponse_apiEndpoint,
    createApiResponse_apiGatewayManaged,
    createApiResponse_apiId,
    createApiResponse_apiKeySelectionExpression,
    createApiResponse_corsConfiguration,
    createApiResponse_createdDate,
    createApiResponse_description,
    createApiResponse_disableExecuteApiEndpoint,
    createApiResponse_disableSchemaValidation,
    createApiResponse_importInfo,
    createApiResponse_name,
    createApiResponse_protocolType,
    createApiResponse_routeSelectionExpression,
    createApiResponse_tags,
    createApiResponse_version,
    createApiResponse_warnings,
    createApiResponse_httpStatus,
  )
where

import Amazonka.ApiGatewayV2.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Creates a new Api resource to represent an API.
--
-- /See:/ 'newCreateApi' smart constructor.
data CreateApi = CreateApi'
  { -- | An API key selection expression. Supported only for WebSocket APIs. See
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions API Key Selection Expressions>.
    CreateApi -> Maybe Text
apiKeySelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | A CORS configuration. Supported only for HTTP APIs. See
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-cors.html Configuring CORS>
    -- for more information.
    CreateApi -> Maybe Cors
corsConfiguration :: Prelude.Maybe Cors,
    -- | This property is part of quick create. It specifies the credentials
    -- required for the integration, if any. For a Lambda integration, three
    -- options are available. To specify an IAM Role for API Gateway to assume,
    -- use the role\'s Amazon Resource Name (ARN). To require that the
    -- caller\'s identity be passed through from the request, specify
    -- arn:aws:iam::*:user\/*. To use resource-based permissions on supported
    -- AWS services, specify null. Currently, this property is not used for
    -- HTTP integrations. Supported only for HTTP APIs.
    CreateApi -> Maybe Text
credentialsArn :: Prelude.Maybe Prelude.Text,
    -- | The description of the API.
    CreateApi -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether clients can invoke your API by using the default
    -- execute-api endpoint. By default, clients can invoke your API with the
    -- default https:\/\/{api_id}.execute-api.{region}.amazonaws.com endpoint.
    -- To require that clients use a custom domain name to invoke your API,
    -- disable the default endpoint.
    CreateApi -> Maybe Bool
disableExecuteApiEndpoint :: Prelude.Maybe Prelude.Bool,
    -- | Avoid validating models when creating a deployment. Supported only for
    -- WebSocket APIs.
    CreateApi -> Maybe Bool
disableSchemaValidation :: Prelude.Maybe Prelude.Bool,
    -- | This property is part of quick create. If you don\'t specify a routeKey,
    -- a default route of $default is created. The $default route acts as a
    -- catch-all for any request made to your API, for a particular stage. The
    -- \$default route key can\'t be modified. You can add routes after creating
    -- the API, and you can update the route keys of additional routes.
    -- Supported only for HTTP APIs.
    CreateApi -> Maybe Text
routeKey :: Prelude.Maybe Prelude.Text,
    -- | The route selection expression for the API. For HTTP APIs, the
    -- routeSelectionExpression must be ${request.method} ${request.path}. If
    -- not provided, this will be the default for HTTP APIs. This property is
    -- required for WebSocket APIs.
    CreateApi -> Maybe Text
routeSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | The collection of tags. Each tag element is associated with a given
    -- resource.
    CreateApi -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | This property is part of quick create. Quick create produces an API with
    -- an integration, a default catch-all route, and a default stage which is
    -- configured to automatically deploy changes. For HTTP integrations,
    -- specify a fully qualified URL. For Lambda integrations, specify a
    -- function ARN. The type of the integration will be HTTP_PROXY or
    -- AWS_PROXY, respectively. Supported only for HTTP APIs.
    CreateApi -> Maybe Text
target :: Prelude.Maybe Prelude.Text,
    -- | A version identifier for the API.
    CreateApi -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The API protocol.
    CreateApi -> ProtocolType
protocolType :: ProtocolType,
    -- | The name of the API.
    CreateApi -> Text
name :: Prelude.Text
  }
  deriving (CreateApi -> CreateApi -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateApi -> CreateApi -> Bool
$c/= :: CreateApi -> CreateApi -> Bool
== :: CreateApi -> CreateApi -> Bool
$c== :: CreateApi -> CreateApi -> Bool
Prelude.Eq, ReadPrec [CreateApi]
ReadPrec CreateApi
Int -> ReadS CreateApi
ReadS [CreateApi]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateApi]
$creadListPrec :: ReadPrec [CreateApi]
readPrec :: ReadPrec CreateApi
$creadPrec :: ReadPrec CreateApi
readList :: ReadS [CreateApi]
$creadList :: ReadS [CreateApi]
readsPrec :: Int -> ReadS CreateApi
$creadsPrec :: Int -> ReadS CreateApi
Prelude.Read, Int -> CreateApi -> ShowS
[CreateApi] -> ShowS
CreateApi -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateApi] -> ShowS
$cshowList :: [CreateApi] -> ShowS
show :: CreateApi -> String
$cshow :: CreateApi -> String
showsPrec :: Int -> CreateApi -> ShowS
$cshowsPrec :: Int -> CreateApi -> ShowS
Prelude.Show, forall x. Rep CreateApi x -> CreateApi
forall x. CreateApi -> Rep CreateApi x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateApi x -> CreateApi
$cfrom :: forall x. CreateApi -> Rep CreateApi x
Prelude.Generic)

-- |
-- Create a value of 'CreateApi' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'apiKeySelectionExpression', 'createApi_apiKeySelectionExpression' - An API key selection expression. Supported only for WebSocket APIs. See
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions API Key Selection Expressions>.
--
-- 'corsConfiguration', 'createApi_corsConfiguration' - A CORS configuration. Supported only for HTTP APIs. See
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-cors.html Configuring CORS>
-- for more information.
--
-- 'credentialsArn', 'createApi_credentialsArn' - This property is part of quick create. It specifies the credentials
-- required for the integration, if any. For a Lambda integration, three
-- options are available. To specify an IAM Role for API Gateway to assume,
-- use the role\'s Amazon Resource Name (ARN). To require that the
-- caller\'s identity be passed through from the request, specify
-- arn:aws:iam::*:user\/*. To use resource-based permissions on supported
-- AWS services, specify null. Currently, this property is not used for
-- HTTP integrations. Supported only for HTTP APIs.
--
-- 'description', 'createApi_description' - The description of the API.
--
-- 'disableExecuteApiEndpoint', 'createApi_disableExecuteApiEndpoint' - Specifies whether clients can invoke your API by using the default
-- execute-api endpoint. By default, clients can invoke your API with the
-- default https:\/\/{api_id}.execute-api.{region}.amazonaws.com endpoint.
-- To require that clients use a custom domain name to invoke your API,
-- disable the default endpoint.
--
-- 'disableSchemaValidation', 'createApi_disableSchemaValidation' - Avoid validating models when creating a deployment. Supported only for
-- WebSocket APIs.
--
-- 'routeKey', 'createApi_routeKey' - This property is part of quick create. If you don\'t specify a routeKey,
-- a default route of $default is created. The $default route acts as a
-- catch-all for any request made to your API, for a particular stage. The
-- \$default route key can\'t be modified. You can add routes after creating
-- the API, and you can update the route keys of additional routes.
-- Supported only for HTTP APIs.
--
-- 'routeSelectionExpression', 'createApi_routeSelectionExpression' - The route selection expression for the API. For HTTP APIs, the
-- routeSelectionExpression must be ${request.method} ${request.path}. If
-- not provided, this will be the default for HTTP APIs. This property is
-- required for WebSocket APIs.
--
-- 'tags', 'createApi_tags' - The collection of tags. Each tag element is associated with a given
-- resource.
--
-- 'target', 'createApi_target' - This property is part of quick create. Quick create produces an API with
-- an integration, a default catch-all route, and a default stage which is
-- configured to automatically deploy changes. For HTTP integrations,
-- specify a fully qualified URL. For Lambda integrations, specify a
-- function ARN. The type of the integration will be HTTP_PROXY or
-- AWS_PROXY, respectively. Supported only for HTTP APIs.
--
-- 'version', 'createApi_version' - A version identifier for the API.
--
-- 'protocolType', 'createApi_protocolType' - The API protocol.
--
-- 'name', 'createApi_name' - The name of the API.
newCreateApi ::
  -- | 'protocolType'
  ProtocolType ->
  -- | 'name'
  Prelude.Text ->
  CreateApi
newCreateApi :: ProtocolType -> Text -> CreateApi
newCreateApi ProtocolType
pProtocolType_ Text
pName_ =
  CreateApi'
    { $sel:apiKeySelectionExpression:CreateApi' :: Maybe Text
apiKeySelectionExpression =
        forall a. Maybe a
Prelude.Nothing,
      $sel:corsConfiguration:CreateApi' :: Maybe Cors
corsConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:credentialsArn:CreateApi' :: Maybe Text
credentialsArn = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateApi' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:disableExecuteApiEndpoint:CreateApi' :: Maybe Bool
disableExecuteApiEndpoint = forall a. Maybe a
Prelude.Nothing,
      $sel:disableSchemaValidation:CreateApi' :: Maybe Bool
disableSchemaValidation = forall a. Maybe a
Prelude.Nothing,
      $sel:routeKey:CreateApi' :: Maybe Text
routeKey = forall a. Maybe a
Prelude.Nothing,
      $sel:routeSelectionExpression:CreateApi' :: Maybe Text
routeSelectionExpression = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateApi' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:target:CreateApi' :: Maybe Text
target = forall a. Maybe a
Prelude.Nothing,
      $sel:version:CreateApi' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing,
      $sel:protocolType:CreateApi' :: ProtocolType
protocolType = ProtocolType
pProtocolType_,
      $sel:name:CreateApi' :: Text
name = Text
pName_
    }

-- | An API key selection expression. Supported only for WebSocket APIs. See
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions API Key Selection Expressions>.
createApi_apiKeySelectionExpression :: Lens.Lens' CreateApi (Prelude.Maybe Prelude.Text)
createApi_apiKeySelectionExpression :: Lens' CreateApi (Maybe Text)
createApi_apiKeySelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Maybe Text
apiKeySelectionExpression :: Maybe Text
$sel:apiKeySelectionExpression:CreateApi' :: CreateApi -> Maybe Text
apiKeySelectionExpression} -> Maybe Text
apiKeySelectionExpression) (\s :: CreateApi
s@CreateApi' {} Maybe Text
a -> CreateApi
s {$sel:apiKeySelectionExpression:CreateApi' :: Maybe Text
apiKeySelectionExpression = Maybe Text
a} :: CreateApi)

-- | A CORS configuration. Supported only for HTTP APIs. See
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-cors.html Configuring CORS>
-- for more information.
createApi_corsConfiguration :: Lens.Lens' CreateApi (Prelude.Maybe Cors)
createApi_corsConfiguration :: Lens' CreateApi (Maybe Cors)
createApi_corsConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Maybe Cors
corsConfiguration :: Maybe Cors
$sel:corsConfiguration:CreateApi' :: CreateApi -> Maybe Cors
corsConfiguration} -> Maybe Cors
corsConfiguration) (\s :: CreateApi
s@CreateApi' {} Maybe Cors
a -> CreateApi
s {$sel:corsConfiguration:CreateApi' :: Maybe Cors
corsConfiguration = Maybe Cors
a} :: CreateApi)

-- | This property is part of quick create. It specifies the credentials
-- required for the integration, if any. For a Lambda integration, three
-- options are available. To specify an IAM Role for API Gateway to assume,
-- use the role\'s Amazon Resource Name (ARN). To require that the
-- caller\'s identity be passed through from the request, specify
-- arn:aws:iam::*:user\/*. To use resource-based permissions on supported
-- AWS services, specify null. Currently, this property is not used for
-- HTTP integrations. Supported only for HTTP APIs.
createApi_credentialsArn :: Lens.Lens' CreateApi (Prelude.Maybe Prelude.Text)
createApi_credentialsArn :: Lens' CreateApi (Maybe Text)
createApi_credentialsArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Maybe Text
credentialsArn :: Maybe Text
$sel:credentialsArn:CreateApi' :: CreateApi -> Maybe Text
credentialsArn} -> Maybe Text
credentialsArn) (\s :: CreateApi
s@CreateApi' {} Maybe Text
a -> CreateApi
s {$sel:credentialsArn:CreateApi' :: Maybe Text
credentialsArn = Maybe Text
a} :: CreateApi)

-- | The description of the API.
createApi_description :: Lens.Lens' CreateApi (Prelude.Maybe Prelude.Text)
createApi_description :: Lens' CreateApi (Maybe Text)
createApi_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Maybe Text
description :: Maybe Text
$sel:description:CreateApi' :: CreateApi -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateApi
s@CreateApi' {} Maybe Text
a -> CreateApi
s {$sel:description:CreateApi' :: Maybe Text
description = Maybe Text
a} :: CreateApi)

-- | Specifies whether clients can invoke your API by using the default
-- execute-api endpoint. By default, clients can invoke your API with the
-- default https:\/\/{api_id}.execute-api.{region}.amazonaws.com endpoint.
-- To require that clients use a custom domain name to invoke your API,
-- disable the default endpoint.
createApi_disableExecuteApiEndpoint :: Lens.Lens' CreateApi (Prelude.Maybe Prelude.Bool)
createApi_disableExecuteApiEndpoint :: Lens' CreateApi (Maybe Bool)
createApi_disableExecuteApiEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Maybe Bool
disableExecuteApiEndpoint :: Maybe Bool
$sel:disableExecuteApiEndpoint:CreateApi' :: CreateApi -> Maybe Bool
disableExecuteApiEndpoint} -> Maybe Bool
disableExecuteApiEndpoint) (\s :: CreateApi
s@CreateApi' {} Maybe Bool
a -> CreateApi
s {$sel:disableExecuteApiEndpoint:CreateApi' :: Maybe Bool
disableExecuteApiEndpoint = Maybe Bool
a} :: CreateApi)

-- | Avoid validating models when creating a deployment. Supported only for
-- WebSocket APIs.
createApi_disableSchemaValidation :: Lens.Lens' CreateApi (Prelude.Maybe Prelude.Bool)
createApi_disableSchemaValidation :: Lens' CreateApi (Maybe Bool)
createApi_disableSchemaValidation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Maybe Bool
disableSchemaValidation :: Maybe Bool
$sel:disableSchemaValidation:CreateApi' :: CreateApi -> Maybe Bool
disableSchemaValidation} -> Maybe Bool
disableSchemaValidation) (\s :: CreateApi
s@CreateApi' {} Maybe Bool
a -> CreateApi
s {$sel:disableSchemaValidation:CreateApi' :: Maybe Bool
disableSchemaValidation = Maybe Bool
a} :: CreateApi)

-- | This property is part of quick create. If you don\'t specify a routeKey,
-- a default route of $default is created. The $default route acts as a
-- catch-all for any request made to your API, for a particular stage. The
-- \$default route key can\'t be modified. You can add routes after creating
-- the API, and you can update the route keys of additional routes.
-- Supported only for HTTP APIs.
createApi_routeKey :: Lens.Lens' CreateApi (Prelude.Maybe Prelude.Text)
createApi_routeKey :: Lens' CreateApi (Maybe Text)
createApi_routeKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Maybe Text
routeKey :: Maybe Text
$sel:routeKey:CreateApi' :: CreateApi -> Maybe Text
routeKey} -> Maybe Text
routeKey) (\s :: CreateApi
s@CreateApi' {} Maybe Text
a -> CreateApi
s {$sel:routeKey:CreateApi' :: Maybe Text
routeKey = Maybe Text
a} :: CreateApi)

-- | The route selection expression for the API. For HTTP APIs, the
-- routeSelectionExpression must be ${request.method} ${request.path}. If
-- not provided, this will be the default for HTTP APIs. This property is
-- required for WebSocket APIs.
createApi_routeSelectionExpression :: Lens.Lens' CreateApi (Prelude.Maybe Prelude.Text)
createApi_routeSelectionExpression :: Lens' CreateApi (Maybe Text)
createApi_routeSelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Maybe Text
routeSelectionExpression :: Maybe Text
$sel:routeSelectionExpression:CreateApi' :: CreateApi -> Maybe Text
routeSelectionExpression} -> Maybe Text
routeSelectionExpression) (\s :: CreateApi
s@CreateApi' {} Maybe Text
a -> CreateApi
s {$sel:routeSelectionExpression:CreateApi' :: Maybe Text
routeSelectionExpression = Maybe Text
a} :: CreateApi)

-- | The collection of tags. Each tag element is associated with a given
-- resource.
createApi_tags :: Lens.Lens' CreateApi (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createApi_tags :: Lens' CreateApi (Maybe (HashMap Text Text))
createApi_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateApi' :: CreateApi -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateApi
s@CreateApi' {} Maybe (HashMap Text Text)
a -> CreateApi
s {$sel:tags:CreateApi' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateApi) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | This property is part of quick create. Quick create produces an API with
-- an integration, a default catch-all route, and a default stage which is
-- configured to automatically deploy changes. For HTTP integrations,
-- specify a fully qualified URL. For Lambda integrations, specify a
-- function ARN. The type of the integration will be HTTP_PROXY or
-- AWS_PROXY, respectively. Supported only for HTTP APIs.
createApi_target :: Lens.Lens' CreateApi (Prelude.Maybe Prelude.Text)
createApi_target :: Lens' CreateApi (Maybe Text)
createApi_target = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Maybe Text
target :: Maybe Text
$sel:target:CreateApi' :: CreateApi -> Maybe Text
target} -> Maybe Text
target) (\s :: CreateApi
s@CreateApi' {} Maybe Text
a -> CreateApi
s {$sel:target:CreateApi' :: Maybe Text
target = Maybe Text
a} :: CreateApi)

-- | A version identifier for the API.
createApi_version :: Lens.Lens' CreateApi (Prelude.Maybe Prelude.Text)
createApi_version :: Lens' CreateApi (Maybe Text)
createApi_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Maybe Text
version :: Maybe Text
$sel:version:CreateApi' :: CreateApi -> Maybe Text
version} -> Maybe Text
version) (\s :: CreateApi
s@CreateApi' {} Maybe Text
a -> CreateApi
s {$sel:version:CreateApi' :: Maybe Text
version = Maybe Text
a} :: CreateApi)

-- | The API protocol.
createApi_protocolType :: Lens.Lens' CreateApi ProtocolType
createApi_protocolType :: Lens' CreateApi ProtocolType
createApi_protocolType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {ProtocolType
protocolType :: ProtocolType
$sel:protocolType:CreateApi' :: CreateApi -> ProtocolType
protocolType} -> ProtocolType
protocolType) (\s :: CreateApi
s@CreateApi' {} ProtocolType
a -> CreateApi
s {$sel:protocolType:CreateApi' :: ProtocolType
protocolType = ProtocolType
a} :: CreateApi)

-- | The name of the API.
createApi_name :: Lens.Lens' CreateApi Prelude.Text
createApi_name :: Lens' CreateApi Text
createApi_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApi' {Text
name :: Text
$sel:name:CreateApi' :: CreateApi -> Text
name} -> Text
name) (\s :: CreateApi
s@CreateApi' {} Text
a -> CreateApi
s {$sel:name:CreateApi' :: Text
name = Text
a} :: CreateApi)

instance Core.AWSRequest CreateApi where
  type AWSResponse CreateApi = CreateApiResponse
  request :: (Service -> Service) -> CreateApi -> Request CreateApi
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateApi
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateApi)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Cors
-> Maybe ISO8601
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe ProtocolType
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe [Text]
-> Int
-> CreateApiResponse
CreateApiResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"apiEndpoint")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"apiGatewayManaged")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"apiId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"apiKeySelectionExpression")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"corsConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"createdDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"disableExecuteApiEndpoint")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"disableSchemaValidation")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"importInfo" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"protocolType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"routeSelectionExpression")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"version")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"warnings" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateApi where
  hashWithSalt :: Int -> CreateApi -> Int
hashWithSalt Int
_salt CreateApi' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe Cors
Text
ProtocolType
name :: Text
protocolType :: ProtocolType
version :: Maybe Text
target :: Maybe Text
tags :: Maybe (HashMap Text Text)
routeSelectionExpression :: Maybe Text
routeKey :: Maybe Text
disableSchemaValidation :: Maybe Bool
disableExecuteApiEndpoint :: Maybe Bool
description :: Maybe Text
credentialsArn :: Maybe Text
corsConfiguration :: Maybe Cors
apiKeySelectionExpression :: Maybe Text
$sel:name:CreateApi' :: CreateApi -> Text
$sel:protocolType:CreateApi' :: CreateApi -> ProtocolType
$sel:version:CreateApi' :: CreateApi -> Maybe Text
$sel:target:CreateApi' :: CreateApi -> Maybe Text
$sel:tags:CreateApi' :: CreateApi -> Maybe (HashMap Text Text)
$sel:routeSelectionExpression:CreateApi' :: CreateApi -> Maybe Text
$sel:routeKey:CreateApi' :: CreateApi -> Maybe Text
$sel:disableSchemaValidation:CreateApi' :: CreateApi -> Maybe Bool
$sel:disableExecuteApiEndpoint:CreateApi' :: CreateApi -> Maybe Bool
$sel:description:CreateApi' :: CreateApi -> Maybe Text
$sel:credentialsArn:CreateApi' :: CreateApi -> Maybe Text
$sel:corsConfiguration:CreateApi' :: CreateApi -> Maybe Cors
$sel:apiKeySelectionExpression:CreateApi' :: CreateApi -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
apiKeySelectionExpression
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Cors
corsConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
credentialsArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disableExecuteApiEndpoint
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disableSchemaValidation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
routeKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
routeSelectionExpression
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
target
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
version
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ProtocolType
protocolType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData CreateApi where
  rnf :: CreateApi -> ()
rnf CreateApi' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe Cors
Text
ProtocolType
name :: Text
protocolType :: ProtocolType
version :: Maybe Text
target :: Maybe Text
tags :: Maybe (HashMap Text Text)
routeSelectionExpression :: Maybe Text
routeKey :: Maybe Text
disableSchemaValidation :: Maybe Bool
disableExecuteApiEndpoint :: Maybe Bool
description :: Maybe Text
credentialsArn :: Maybe Text
corsConfiguration :: Maybe Cors
apiKeySelectionExpression :: Maybe Text
$sel:name:CreateApi' :: CreateApi -> Text
$sel:protocolType:CreateApi' :: CreateApi -> ProtocolType
$sel:version:CreateApi' :: CreateApi -> Maybe Text
$sel:target:CreateApi' :: CreateApi -> Maybe Text
$sel:tags:CreateApi' :: CreateApi -> Maybe (HashMap Text Text)
$sel:routeSelectionExpression:CreateApi' :: CreateApi -> Maybe Text
$sel:routeKey:CreateApi' :: CreateApi -> Maybe Text
$sel:disableSchemaValidation:CreateApi' :: CreateApi -> Maybe Bool
$sel:disableExecuteApiEndpoint:CreateApi' :: CreateApi -> Maybe Bool
$sel:description:CreateApi' :: CreateApi -> Maybe Text
$sel:credentialsArn:CreateApi' :: CreateApi -> Maybe Text
$sel:corsConfiguration:CreateApi' :: CreateApi -> Maybe Cors
$sel:apiKeySelectionExpression:CreateApi' :: CreateApi -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiKeySelectionExpression
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Cors
corsConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
credentialsArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disableExecuteApiEndpoint
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disableSchemaValidation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
routeKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
routeSelectionExpression
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
target
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ProtocolType
protocolType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance Data.ToHeaders CreateApi where
  toHeaders :: CreateApi -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateApi where
  toJSON :: CreateApi -> Value
toJSON CreateApi' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe Cors
Text
ProtocolType
name :: Text
protocolType :: ProtocolType
version :: Maybe Text
target :: Maybe Text
tags :: Maybe (HashMap Text Text)
routeSelectionExpression :: Maybe Text
routeKey :: Maybe Text
disableSchemaValidation :: Maybe Bool
disableExecuteApiEndpoint :: Maybe Bool
description :: Maybe Text
credentialsArn :: Maybe Text
corsConfiguration :: Maybe Cors
apiKeySelectionExpression :: Maybe Text
$sel:name:CreateApi' :: CreateApi -> Text
$sel:protocolType:CreateApi' :: CreateApi -> ProtocolType
$sel:version:CreateApi' :: CreateApi -> Maybe Text
$sel:target:CreateApi' :: CreateApi -> Maybe Text
$sel:tags:CreateApi' :: CreateApi -> Maybe (HashMap Text Text)
$sel:routeSelectionExpression:CreateApi' :: CreateApi -> Maybe Text
$sel:routeKey:CreateApi' :: CreateApi -> Maybe Text
$sel:disableSchemaValidation:CreateApi' :: CreateApi -> Maybe Bool
$sel:disableExecuteApiEndpoint:CreateApi' :: CreateApi -> Maybe Bool
$sel:description:CreateApi' :: CreateApi -> Maybe Text
$sel:credentialsArn:CreateApi' :: CreateApi -> Maybe Text
$sel:corsConfiguration:CreateApi' :: CreateApi -> Maybe Cors
$sel:apiKeySelectionExpression:CreateApi' :: CreateApi -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"apiKeySelectionExpression" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
apiKeySelectionExpression,
            (Key
"corsConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Cors
corsConfiguration,
            (Key
"credentialsArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
credentialsArn,
            (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"disableExecuteApiEndpoint" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disableExecuteApiEndpoint,
            (Key
"disableSchemaValidation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disableSchemaValidation,
            (Key
"routeKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
routeKey,
            (Key
"routeSelectionExpression" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
routeSelectionExpression,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            (Key
"target" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
target,
            (Key
"version" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
version,
            forall a. a -> Maybe a
Prelude.Just (Key
"protocolType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ProtocolType
protocolType),
            forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
          ]
      )

instance Data.ToPath CreateApi where
  toPath :: CreateApi -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/v2/apis"

instance Data.ToQuery CreateApi where
  toQuery :: CreateApi -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateApiResponse' smart constructor.
data CreateApiResponse = CreateApiResponse'
  { -- | The URI of the API, of the form
    -- {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically
    -- appended to this URI to form a complete path to a deployed API stage.
    CreateApiResponse -> Maybe Text
apiEndpoint :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether an API is managed by API Gateway. You can\'t update or
    -- delete a managed API by using API Gateway. A managed API can be deleted
    -- only through the tooling or service that created it.
    CreateApiResponse -> Maybe Bool
apiGatewayManaged :: Prelude.Maybe Prelude.Bool,
    -- | The API ID.
    CreateApiResponse -> Maybe Text
apiId :: Prelude.Maybe Prelude.Text,
    -- | An API key selection expression. Supported only for WebSocket APIs. See
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions API Key Selection Expressions>.
    CreateApiResponse -> Maybe Text
apiKeySelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | A CORS configuration. Supported only for HTTP APIs.
    CreateApiResponse -> Maybe Cors
corsConfiguration :: Prelude.Maybe Cors,
    -- | The timestamp when the API was created.
    CreateApiResponse -> Maybe ISO8601
createdDate :: Prelude.Maybe Data.ISO8601,
    -- | The description of the API.
    CreateApiResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether clients can invoke your API by using the default
    -- execute-api endpoint. By default, clients can invoke your API with the
    -- default https:\/\/{api_id}.execute-api.{region}.amazonaws.com endpoint.
    -- To require that clients use a custom domain name to invoke your API,
    -- disable the default endpoint.
    CreateApiResponse -> Maybe Bool
disableExecuteApiEndpoint :: Prelude.Maybe Prelude.Bool,
    -- | Avoid validating models when creating a deployment. Supported only for
    -- WebSocket APIs.
    CreateApiResponse -> Maybe Bool
disableSchemaValidation :: Prelude.Maybe Prelude.Bool,
    -- | The validation information during API import. This may include
    -- particular properties of your OpenAPI definition which are ignored
    -- during import. Supported only for HTTP APIs.
    CreateApiResponse -> Maybe [Text]
importInfo :: Prelude.Maybe [Prelude.Text],
    -- | The name of the API.
    CreateApiResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The API protocol.
    CreateApiResponse -> Maybe ProtocolType
protocolType :: Prelude.Maybe ProtocolType,
    -- | The route selection expression for the API. For HTTP APIs, the
    -- routeSelectionExpression must be ${request.method} ${request.path}. If
    -- not provided, this will be the default for HTTP APIs. This property is
    -- required for WebSocket APIs.
    CreateApiResponse -> Maybe Text
routeSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | A collection of tags associated with the API.
    CreateApiResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A version identifier for the API.
    CreateApiResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The warning messages reported when failonwarnings is turned on during
    -- API import.
    CreateApiResponse -> Maybe [Text]
warnings :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    CreateApiResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateApiResponse -> CreateApiResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateApiResponse -> CreateApiResponse -> Bool
$c/= :: CreateApiResponse -> CreateApiResponse -> Bool
== :: CreateApiResponse -> CreateApiResponse -> Bool
$c== :: CreateApiResponse -> CreateApiResponse -> Bool
Prelude.Eq, ReadPrec [CreateApiResponse]
ReadPrec CreateApiResponse
Int -> ReadS CreateApiResponse
ReadS [CreateApiResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateApiResponse]
$creadListPrec :: ReadPrec [CreateApiResponse]
readPrec :: ReadPrec CreateApiResponse
$creadPrec :: ReadPrec CreateApiResponse
readList :: ReadS [CreateApiResponse]
$creadList :: ReadS [CreateApiResponse]
readsPrec :: Int -> ReadS CreateApiResponse
$creadsPrec :: Int -> ReadS CreateApiResponse
Prelude.Read, Int -> CreateApiResponse -> ShowS
[CreateApiResponse] -> ShowS
CreateApiResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateApiResponse] -> ShowS
$cshowList :: [CreateApiResponse] -> ShowS
show :: CreateApiResponse -> String
$cshow :: CreateApiResponse -> String
showsPrec :: Int -> CreateApiResponse -> ShowS
$cshowsPrec :: Int -> CreateApiResponse -> ShowS
Prelude.Show, forall x. Rep CreateApiResponse x -> CreateApiResponse
forall x. CreateApiResponse -> Rep CreateApiResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateApiResponse x -> CreateApiResponse
$cfrom :: forall x. CreateApiResponse -> Rep CreateApiResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateApiResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'apiEndpoint', 'createApiResponse_apiEndpoint' - The URI of the API, of the form
-- {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically
-- appended to this URI to form a complete path to a deployed API stage.
--
-- 'apiGatewayManaged', 'createApiResponse_apiGatewayManaged' - Specifies whether an API is managed by API Gateway. You can\'t update or
-- delete a managed API by using API Gateway. A managed API can be deleted
-- only through the tooling or service that created it.
--
-- 'apiId', 'createApiResponse_apiId' - The API ID.
--
-- 'apiKeySelectionExpression', 'createApiResponse_apiKeySelectionExpression' - An API key selection expression. Supported only for WebSocket APIs. See
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions API Key Selection Expressions>.
--
-- 'corsConfiguration', 'createApiResponse_corsConfiguration' - A CORS configuration. Supported only for HTTP APIs.
--
-- 'createdDate', 'createApiResponse_createdDate' - The timestamp when the API was created.
--
-- 'description', 'createApiResponse_description' - The description of the API.
--
-- 'disableExecuteApiEndpoint', 'createApiResponse_disableExecuteApiEndpoint' - Specifies whether clients can invoke your API by using the default
-- execute-api endpoint. By default, clients can invoke your API with the
-- default https:\/\/{api_id}.execute-api.{region}.amazonaws.com endpoint.
-- To require that clients use a custom domain name to invoke your API,
-- disable the default endpoint.
--
-- 'disableSchemaValidation', 'createApiResponse_disableSchemaValidation' - Avoid validating models when creating a deployment. Supported only for
-- WebSocket APIs.
--
-- 'importInfo', 'createApiResponse_importInfo' - The validation information during API import. This may include
-- particular properties of your OpenAPI definition which are ignored
-- during import. Supported only for HTTP APIs.
--
-- 'name', 'createApiResponse_name' - The name of the API.
--
-- 'protocolType', 'createApiResponse_protocolType' - The API protocol.
--
-- 'routeSelectionExpression', 'createApiResponse_routeSelectionExpression' - The route selection expression for the API. For HTTP APIs, the
-- routeSelectionExpression must be ${request.method} ${request.path}. If
-- not provided, this will be the default for HTTP APIs. This property is
-- required for WebSocket APIs.
--
-- 'tags', 'createApiResponse_tags' - A collection of tags associated with the API.
--
-- 'version', 'createApiResponse_version' - A version identifier for the API.
--
-- 'warnings', 'createApiResponse_warnings' - The warning messages reported when failonwarnings is turned on during
-- API import.
--
-- 'httpStatus', 'createApiResponse_httpStatus' - The response's http status code.
newCreateApiResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateApiResponse
newCreateApiResponse :: Int -> CreateApiResponse
newCreateApiResponse Int
pHttpStatus_ =
  CreateApiResponse'
    { $sel:apiEndpoint:CreateApiResponse' :: Maybe Text
apiEndpoint = forall a. Maybe a
Prelude.Nothing,
      $sel:apiGatewayManaged:CreateApiResponse' :: Maybe Bool
apiGatewayManaged = forall a. Maybe a
Prelude.Nothing,
      $sel:apiId:CreateApiResponse' :: Maybe Text
apiId = forall a. Maybe a
Prelude.Nothing,
      $sel:apiKeySelectionExpression:CreateApiResponse' :: Maybe Text
apiKeySelectionExpression = forall a. Maybe a
Prelude.Nothing,
      $sel:corsConfiguration:CreateApiResponse' :: Maybe Cors
corsConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:CreateApiResponse' :: Maybe ISO8601
createdDate = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateApiResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:disableExecuteApiEndpoint:CreateApiResponse' :: Maybe Bool
disableExecuteApiEndpoint = forall a. Maybe a
Prelude.Nothing,
      $sel:disableSchemaValidation:CreateApiResponse' :: Maybe Bool
disableSchemaValidation = forall a. Maybe a
Prelude.Nothing,
      $sel:importInfo:CreateApiResponse' :: Maybe [Text]
importInfo = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateApiResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:protocolType:CreateApiResponse' :: Maybe ProtocolType
protocolType = forall a. Maybe a
Prelude.Nothing,
      $sel:routeSelectionExpression:CreateApiResponse' :: Maybe Text
routeSelectionExpression = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateApiResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:version:CreateApiResponse' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing,
      $sel:warnings:CreateApiResponse' :: Maybe [Text]
warnings = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateApiResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The URI of the API, of the form
-- {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically
-- appended to this URI to form a complete path to a deployed API stage.
createApiResponse_apiEndpoint :: Lens.Lens' CreateApiResponse (Prelude.Maybe Prelude.Text)
createApiResponse_apiEndpoint :: Lens' CreateApiResponse (Maybe Text)
createApiResponse_apiEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe Text
apiEndpoint :: Maybe Text
$sel:apiEndpoint:CreateApiResponse' :: CreateApiResponse -> Maybe Text
apiEndpoint} -> Maybe Text
apiEndpoint) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe Text
a -> CreateApiResponse
s {$sel:apiEndpoint:CreateApiResponse' :: Maybe Text
apiEndpoint = Maybe Text
a} :: CreateApiResponse)

-- | Specifies whether an API is managed by API Gateway. You can\'t update or
-- delete a managed API by using API Gateway. A managed API can be deleted
-- only through the tooling or service that created it.
createApiResponse_apiGatewayManaged :: Lens.Lens' CreateApiResponse (Prelude.Maybe Prelude.Bool)
createApiResponse_apiGatewayManaged :: Lens' CreateApiResponse (Maybe Bool)
createApiResponse_apiGatewayManaged = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe Bool
apiGatewayManaged :: Maybe Bool
$sel:apiGatewayManaged:CreateApiResponse' :: CreateApiResponse -> Maybe Bool
apiGatewayManaged} -> Maybe Bool
apiGatewayManaged) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe Bool
a -> CreateApiResponse
s {$sel:apiGatewayManaged:CreateApiResponse' :: Maybe Bool
apiGatewayManaged = Maybe Bool
a} :: CreateApiResponse)

-- | The API ID.
createApiResponse_apiId :: Lens.Lens' CreateApiResponse (Prelude.Maybe Prelude.Text)
createApiResponse_apiId :: Lens' CreateApiResponse (Maybe Text)
createApiResponse_apiId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe Text
apiId :: Maybe Text
$sel:apiId:CreateApiResponse' :: CreateApiResponse -> Maybe Text
apiId} -> Maybe Text
apiId) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe Text
a -> CreateApiResponse
s {$sel:apiId:CreateApiResponse' :: Maybe Text
apiId = Maybe Text
a} :: CreateApiResponse)

-- | An API key selection expression. Supported only for WebSocket APIs. See
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions API Key Selection Expressions>.
createApiResponse_apiKeySelectionExpression :: Lens.Lens' CreateApiResponse (Prelude.Maybe Prelude.Text)
createApiResponse_apiKeySelectionExpression :: Lens' CreateApiResponse (Maybe Text)
createApiResponse_apiKeySelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe Text
apiKeySelectionExpression :: Maybe Text
$sel:apiKeySelectionExpression:CreateApiResponse' :: CreateApiResponse -> Maybe Text
apiKeySelectionExpression} -> Maybe Text
apiKeySelectionExpression) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe Text
a -> CreateApiResponse
s {$sel:apiKeySelectionExpression:CreateApiResponse' :: Maybe Text
apiKeySelectionExpression = Maybe Text
a} :: CreateApiResponse)

-- | A CORS configuration. Supported only for HTTP APIs.
createApiResponse_corsConfiguration :: Lens.Lens' CreateApiResponse (Prelude.Maybe Cors)
createApiResponse_corsConfiguration :: Lens' CreateApiResponse (Maybe Cors)
createApiResponse_corsConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe Cors
corsConfiguration :: Maybe Cors
$sel:corsConfiguration:CreateApiResponse' :: CreateApiResponse -> Maybe Cors
corsConfiguration} -> Maybe Cors
corsConfiguration) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe Cors
a -> CreateApiResponse
s {$sel:corsConfiguration:CreateApiResponse' :: Maybe Cors
corsConfiguration = Maybe Cors
a} :: CreateApiResponse)

-- | The timestamp when the API was created.
createApiResponse_createdDate :: Lens.Lens' CreateApiResponse (Prelude.Maybe Prelude.UTCTime)
createApiResponse_createdDate :: Lens' CreateApiResponse (Maybe UTCTime)
createApiResponse_createdDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe ISO8601
createdDate :: Maybe ISO8601
$sel:createdDate:CreateApiResponse' :: CreateApiResponse -> Maybe ISO8601
createdDate} -> Maybe ISO8601
createdDate) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe ISO8601
a -> CreateApiResponse
s {$sel:createdDate:CreateApiResponse' :: Maybe ISO8601
createdDate = Maybe ISO8601
a} :: CreateApiResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The description of the API.
createApiResponse_description :: Lens.Lens' CreateApiResponse (Prelude.Maybe Prelude.Text)
createApiResponse_description :: Lens' CreateApiResponse (Maybe Text)
createApiResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe Text
description :: Maybe Text
$sel:description:CreateApiResponse' :: CreateApiResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe Text
a -> CreateApiResponse
s {$sel:description:CreateApiResponse' :: Maybe Text
description = Maybe Text
a} :: CreateApiResponse)

-- | Specifies whether clients can invoke your API by using the default
-- execute-api endpoint. By default, clients can invoke your API with the
-- default https:\/\/{api_id}.execute-api.{region}.amazonaws.com endpoint.
-- To require that clients use a custom domain name to invoke your API,
-- disable the default endpoint.
createApiResponse_disableExecuteApiEndpoint :: Lens.Lens' CreateApiResponse (Prelude.Maybe Prelude.Bool)
createApiResponse_disableExecuteApiEndpoint :: Lens' CreateApiResponse (Maybe Bool)
createApiResponse_disableExecuteApiEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe Bool
disableExecuteApiEndpoint :: Maybe Bool
$sel:disableExecuteApiEndpoint:CreateApiResponse' :: CreateApiResponse -> Maybe Bool
disableExecuteApiEndpoint} -> Maybe Bool
disableExecuteApiEndpoint) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe Bool
a -> CreateApiResponse
s {$sel:disableExecuteApiEndpoint:CreateApiResponse' :: Maybe Bool
disableExecuteApiEndpoint = Maybe Bool
a} :: CreateApiResponse)

-- | Avoid validating models when creating a deployment. Supported only for
-- WebSocket APIs.
createApiResponse_disableSchemaValidation :: Lens.Lens' CreateApiResponse (Prelude.Maybe Prelude.Bool)
createApiResponse_disableSchemaValidation :: Lens' CreateApiResponse (Maybe Bool)
createApiResponse_disableSchemaValidation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe Bool
disableSchemaValidation :: Maybe Bool
$sel:disableSchemaValidation:CreateApiResponse' :: CreateApiResponse -> Maybe Bool
disableSchemaValidation} -> Maybe Bool
disableSchemaValidation) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe Bool
a -> CreateApiResponse
s {$sel:disableSchemaValidation:CreateApiResponse' :: Maybe Bool
disableSchemaValidation = Maybe Bool
a} :: CreateApiResponse)

-- | The validation information during API import. This may include
-- particular properties of your OpenAPI definition which are ignored
-- during import. Supported only for HTTP APIs.
createApiResponse_importInfo :: Lens.Lens' CreateApiResponse (Prelude.Maybe [Prelude.Text])
createApiResponse_importInfo :: Lens' CreateApiResponse (Maybe [Text])
createApiResponse_importInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe [Text]
importInfo :: Maybe [Text]
$sel:importInfo:CreateApiResponse' :: CreateApiResponse -> Maybe [Text]
importInfo} -> Maybe [Text]
importInfo) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe [Text]
a -> CreateApiResponse
s {$sel:importInfo:CreateApiResponse' :: Maybe [Text]
importInfo = Maybe [Text]
a} :: CreateApiResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the API.
createApiResponse_name :: Lens.Lens' CreateApiResponse (Prelude.Maybe Prelude.Text)
createApiResponse_name :: Lens' CreateApiResponse (Maybe Text)
createApiResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateApiResponse' :: CreateApiResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe Text
a -> CreateApiResponse
s {$sel:name:CreateApiResponse' :: Maybe Text
name = Maybe Text
a} :: CreateApiResponse)

-- | The API protocol.
createApiResponse_protocolType :: Lens.Lens' CreateApiResponse (Prelude.Maybe ProtocolType)
createApiResponse_protocolType :: Lens' CreateApiResponse (Maybe ProtocolType)
createApiResponse_protocolType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe ProtocolType
protocolType :: Maybe ProtocolType
$sel:protocolType:CreateApiResponse' :: CreateApiResponse -> Maybe ProtocolType
protocolType} -> Maybe ProtocolType
protocolType) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe ProtocolType
a -> CreateApiResponse
s {$sel:protocolType:CreateApiResponse' :: Maybe ProtocolType
protocolType = Maybe ProtocolType
a} :: CreateApiResponse)

-- | The route selection expression for the API. For HTTP APIs, the
-- routeSelectionExpression must be ${request.method} ${request.path}. If
-- not provided, this will be the default for HTTP APIs. This property is
-- required for WebSocket APIs.
createApiResponse_routeSelectionExpression :: Lens.Lens' CreateApiResponse (Prelude.Maybe Prelude.Text)
createApiResponse_routeSelectionExpression :: Lens' CreateApiResponse (Maybe Text)
createApiResponse_routeSelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe Text
routeSelectionExpression :: Maybe Text
$sel:routeSelectionExpression:CreateApiResponse' :: CreateApiResponse -> Maybe Text
routeSelectionExpression} -> Maybe Text
routeSelectionExpression) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe Text
a -> CreateApiResponse
s {$sel:routeSelectionExpression:CreateApiResponse' :: Maybe Text
routeSelectionExpression = Maybe Text
a} :: CreateApiResponse)

-- | A collection of tags associated with the API.
createApiResponse_tags :: Lens.Lens' CreateApiResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createApiResponse_tags :: Lens' CreateApiResponse (Maybe (HashMap Text Text))
createApiResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateApiResponse' :: CreateApiResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe (HashMap Text Text)
a -> CreateApiResponse
s {$sel:tags:CreateApiResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateApiResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A version identifier for the API.
createApiResponse_version :: Lens.Lens' CreateApiResponse (Prelude.Maybe Prelude.Text)
createApiResponse_version :: Lens' CreateApiResponse (Maybe Text)
createApiResponse_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe Text
version :: Maybe Text
$sel:version:CreateApiResponse' :: CreateApiResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe Text
a -> CreateApiResponse
s {$sel:version:CreateApiResponse' :: Maybe Text
version = Maybe Text
a} :: CreateApiResponse)

-- | The warning messages reported when failonwarnings is turned on during
-- API import.
createApiResponse_warnings :: Lens.Lens' CreateApiResponse (Prelude.Maybe [Prelude.Text])
createApiResponse_warnings :: Lens' CreateApiResponse (Maybe [Text])
createApiResponse_warnings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Maybe [Text]
warnings :: Maybe [Text]
$sel:warnings:CreateApiResponse' :: CreateApiResponse -> Maybe [Text]
warnings} -> Maybe [Text]
warnings) (\s :: CreateApiResponse
s@CreateApiResponse' {} Maybe [Text]
a -> CreateApiResponse
s {$sel:warnings:CreateApiResponse' :: Maybe [Text]
warnings = Maybe [Text]
a} :: CreateApiResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
createApiResponse_httpStatus :: Lens.Lens' CreateApiResponse Prelude.Int
createApiResponse_httpStatus :: Lens' CreateApiResponse Int
createApiResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApiResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateApiResponse' :: CreateApiResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateApiResponse
s@CreateApiResponse' {} Int
a -> CreateApiResponse
s {$sel:httpStatus:CreateApiResponse' :: Int
httpStatus = Int
a} :: CreateApiResponse)

instance Prelude.NFData CreateApiResponse where
  rnf :: CreateApiResponse -> ()
rnf CreateApiResponse' {Int
Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe Cors
Maybe ProtocolType
httpStatus :: Int
warnings :: Maybe [Text]
version :: Maybe Text
tags :: Maybe (HashMap Text Text)
routeSelectionExpression :: Maybe Text
protocolType :: Maybe ProtocolType
name :: Maybe Text
importInfo :: Maybe [Text]
disableSchemaValidation :: Maybe Bool
disableExecuteApiEndpoint :: Maybe Bool
description :: Maybe Text
createdDate :: Maybe ISO8601
corsConfiguration :: Maybe Cors
apiKeySelectionExpression :: Maybe Text
apiId :: Maybe Text
apiGatewayManaged :: Maybe Bool
apiEndpoint :: Maybe Text
$sel:httpStatus:CreateApiResponse' :: CreateApiResponse -> Int
$sel:warnings:CreateApiResponse' :: CreateApiResponse -> Maybe [Text]
$sel:version:CreateApiResponse' :: CreateApiResponse -> Maybe Text
$sel:tags:CreateApiResponse' :: CreateApiResponse -> Maybe (HashMap Text Text)
$sel:routeSelectionExpression:CreateApiResponse' :: CreateApiResponse -> Maybe Text
$sel:protocolType:CreateApiResponse' :: CreateApiResponse -> Maybe ProtocolType
$sel:name:CreateApiResponse' :: CreateApiResponse -> Maybe Text
$sel:importInfo:CreateApiResponse' :: CreateApiResponse -> Maybe [Text]
$sel:disableSchemaValidation:CreateApiResponse' :: CreateApiResponse -> Maybe Bool
$sel:disableExecuteApiEndpoint:CreateApiResponse' :: CreateApiResponse -> Maybe Bool
$sel:description:CreateApiResponse' :: CreateApiResponse -> Maybe Text
$sel:createdDate:CreateApiResponse' :: CreateApiResponse -> Maybe ISO8601
$sel:corsConfiguration:CreateApiResponse' :: CreateApiResponse -> Maybe Cors
$sel:apiKeySelectionExpression:CreateApiResponse' :: CreateApiResponse -> Maybe Text
$sel:apiId:CreateApiResponse' :: CreateApiResponse -> Maybe Text
$sel:apiGatewayManaged:CreateApiResponse' :: CreateApiResponse -> Maybe Bool
$sel:apiEndpoint:CreateApiResponse' :: CreateApiResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiEndpoint
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
apiGatewayManaged
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiKeySelectionExpression
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Cors
corsConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disableExecuteApiEndpoint
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disableSchemaValidation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
importInfo
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProtocolType
protocolType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
routeSelectionExpression
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
warnings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus