{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ApiGatewayV2.Types.Api where
import Amazonka.ApiGatewayV2.Types.Cors
import Amazonka.ApiGatewayV2.Types.ProtocolType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Api = Api'
{
Api -> Maybe Text
apiId :: Prelude.Maybe Prelude.Text,
Api -> Maybe Bool
disableExecuteApiEndpoint :: Prelude.Maybe Prelude.Bool,
Api -> Maybe Text
apiEndpoint :: Prelude.Maybe Prelude.Text,
Api -> Maybe [Text]
warnings :: Prelude.Maybe [Prelude.Text],
Api -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
Api -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
Api -> Maybe Bool
apiGatewayManaged :: Prelude.Maybe Prelude.Bool,
Api -> Maybe Text
apiKeySelectionExpression :: Prelude.Maybe Prelude.Text,
Api -> Maybe Cors
corsConfiguration :: Prelude.Maybe Cors,
Api -> Maybe [Text]
importInfo :: Prelude.Maybe [Prelude.Text],
Api -> Maybe Bool
disableSchemaValidation :: Prelude.Maybe Prelude.Bool,
Api -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Api -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Api -> Text
routeSelectionExpression :: Prelude.Text,
Api -> Text
name :: Prelude.Text,
Api -> ProtocolType
protocolType :: ProtocolType
}
deriving (Api -> Api -> Bool
(Api -> Api -> Bool) -> (Api -> Api -> Bool) -> Eq Api
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Api -> Api -> Bool
$c/= :: Api -> Api -> Bool
== :: Api -> Api -> Bool
$c== :: Api -> Api -> Bool
Prelude.Eq, ReadPrec [Api]
ReadPrec Api
Int -> ReadS Api
ReadS [Api]
(Int -> ReadS Api)
-> ReadS [Api] -> ReadPrec Api -> ReadPrec [Api] -> Read Api
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Api]
$creadListPrec :: ReadPrec [Api]
readPrec :: ReadPrec Api
$creadPrec :: ReadPrec Api
readList :: ReadS [Api]
$creadList :: ReadS [Api]
readsPrec :: Int -> ReadS Api
$creadsPrec :: Int -> ReadS Api
Prelude.Read, Int -> Api -> ShowS
[Api] -> ShowS
Api -> String
(Int -> Api -> ShowS)
-> (Api -> String) -> ([Api] -> ShowS) -> Show Api
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Api] -> ShowS
$cshowList :: [Api] -> ShowS
show :: Api -> String
$cshow :: Api -> String
showsPrec :: Int -> Api -> ShowS
$cshowsPrec :: Int -> Api -> ShowS
Prelude.Show, (forall x. Api -> Rep Api x)
-> (forall x. Rep Api x -> Api) -> Generic Api
forall x. Rep Api x -> Api
forall x. Api -> Rep Api x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Api x -> Api
$cfrom :: forall x. Api -> Rep Api x
Prelude.Generic)
newApi ::
Prelude.Text ->
Prelude.Text ->
ProtocolType ->
Api
newApi :: Text -> Text -> ProtocolType -> Api
newApi
Text
pRouteSelectionExpression_
Text
pName_
ProtocolType
pProtocolType_ =
Api' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api
Api'
{ $sel:apiId:Api' :: Maybe Text
apiId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:disableExecuteApiEndpoint:Api' :: Maybe Bool
disableExecuteApiEndpoint = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:apiEndpoint:Api' :: Maybe Text
apiEndpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:warnings:Api' :: Maybe [Text]
warnings = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:createdDate:Api' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:version:Api' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:apiGatewayManaged:Api' :: Maybe Bool
apiGatewayManaged = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:apiKeySelectionExpression:Api' :: Maybe Text
apiKeySelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:corsConfiguration:Api' :: Maybe Cors
corsConfiguration = Maybe Cors
forall a. Maybe a
Prelude.Nothing,
$sel:importInfo:Api' :: Maybe [Text]
importInfo = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:disableSchemaValidation:Api' :: Maybe Bool
disableSchemaValidation = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:description:Api' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:Api' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:routeSelectionExpression:Api' :: Text
routeSelectionExpression =
Text
pRouteSelectionExpression_,
$sel:name:Api' :: Text
name = Text
pName_,
$sel:protocolType:Api' :: ProtocolType
protocolType = ProtocolType
pProtocolType_
}
api_apiId :: Lens.Lens' Api (Prelude.Maybe Prelude.Text)
api_apiId :: (Maybe Text -> f (Maybe Text)) -> Api -> f Api
api_apiId = (Api -> Maybe Text)
-> (Api -> Maybe Text -> Api)
-> Lens Api Api (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe Text
apiId :: Maybe Text
$sel:apiId:Api' :: Api -> Maybe Text
apiId} -> Maybe Text
apiId) (\s :: Api
s@Api' {} Maybe Text
a -> Api
s {$sel:apiId:Api' :: Maybe Text
apiId = Maybe Text
a} :: Api)
api_disableExecuteApiEndpoint :: Lens.Lens' Api (Prelude.Maybe Prelude.Bool)
api_disableExecuteApiEndpoint :: (Maybe Bool -> f (Maybe Bool)) -> Api -> f Api
api_disableExecuteApiEndpoint = (Api -> Maybe Bool)
-> (Api -> Maybe Bool -> Api)
-> Lens Api Api (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe Bool
disableExecuteApiEndpoint :: Maybe Bool
$sel:disableExecuteApiEndpoint:Api' :: Api -> Maybe Bool
disableExecuteApiEndpoint} -> Maybe Bool
disableExecuteApiEndpoint) (\s :: Api
s@Api' {} Maybe Bool
a -> Api
s {$sel:disableExecuteApiEndpoint:Api' :: Maybe Bool
disableExecuteApiEndpoint = Maybe Bool
a} :: Api)
api_apiEndpoint :: Lens.Lens' Api (Prelude.Maybe Prelude.Text)
api_apiEndpoint :: (Maybe Text -> f (Maybe Text)) -> Api -> f Api
api_apiEndpoint = (Api -> Maybe Text)
-> (Api -> Maybe Text -> Api)
-> Lens Api Api (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe Text
apiEndpoint :: Maybe Text
$sel:apiEndpoint:Api' :: Api -> Maybe Text
apiEndpoint} -> Maybe Text
apiEndpoint) (\s :: Api
s@Api' {} Maybe Text
a -> Api
s {$sel:apiEndpoint:Api' :: Maybe Text
apiEndpoint = Maybe Text
a} :: Api)
api_warnings :: Lens.Lens' Api (Prelude.Maybe [Prelude.Text])
api_warnings :: (Maybe [Text] -> f (Maybe [Text])) -> Api -> f Api
api_warnings = (Api -> Maybe [Text])
-> (Api -> Maybe [Text] -> Api)
-> Lens Api Api (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe [Text]
warnings :: Maybe [Text]
$sel:warnings:Api' :: Api -> Maybe [Text]
warnings} -> Maybe [Text]
warnings) (\s :: Api
s@Api' {} Maybe [Text]
a -> Api
s {$sel:warnings:Api' :: Maybe [Text]
warnings = Maybe [Text]
a} :: Api) ((Maybe [Text] -> f (Maybe [Text])) -> Api -> f Api)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Api
-> f Api
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
api_createdDate :: Lens.Lens' Api (Prelude.Maybe Prelude.UTCTime)
api_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Api -> f Api
api_createdDate = (Api -> Maybe POSIX)
-> (Api -> Maybe POSIX -> Api)
-> Lens Api Api (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:Api' :: Api -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: Api
s@Api' {} Maybe POSIX
a -> Api
s {$sel:createdDate:Api' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: Api) ((Maybe POSIX -> f (Maybe POSIX)) -> Api -> f Api)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Api
-> f Api
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
api_version :: Lens.Lens' Api (Prelude.Maybe Prelude.Text)
api_version :: (Maybe Text -> f (Maybe Text)) -> Api -> f Api
api_version = (Api -> Maybe Text)
-> (Api -> Maybe Text -> Api)
-> Lens Api Api (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe Text
version :: Maybe Text
$sel:version:Api' :: Api -> Maybe Text
version} -> Maybe Text
version) (\s :: Api
s@Api' {} Maybe Text
a -> Api
s {$sel:version:Api' :: Maybe Text
version = Maybe Text
a} :: Api)
api_apiGatewayManaged :: Lens.Lens' Api (Prelude.Maybe Prelude.Bool)
api_apiGatewayManaged :: (Maybe Bool -> f (Maybe Bool)) -> Api -> f Api
api_apiGatewayManaged = (Api -> Maybe Bool)
-> (Api -> Maybe Bool -> Api)
-> Lens Api Api (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe Bool
apiGatewayManaged :: Maybe Bool
$sel:apiGatewayManaged:Api' :: Api -> Maybe Bool
apiGatewayManaged} -> Maybe Bool
apiGatewayManaged) (\s :: Api
s@Api' {} Maybe Bool
a -> Api
s {$sel:apiGatewayManaged:Api' :: Maybe Bool
apiGatewayManaged = Maybe Bool
a} :: Api)
api_apiKeySelectionExpression :: Lens.Lens' Api (Prelude.Maybe Prelude.Text)
api_apiKeySelectionExpression :: (Maybe Text -> f (Maybe Text)) -> Api -> f Api
api_apiKeySelectionExpression = (Api -> Maybe Text)
-> (Api -> Maybe Text -> Api)
-> Lens Api Api (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe Text
apiKeySelectionExpression :: Maybe Text
$sel:apiKeySelectionExpression:Api' :: Api -> Maybe Text
apiKeySelectionExpression} -> Maybe Text
apiKeySelectionExpression) (\s :: Api
s@Api' {} Maybe Text
a -> Api
s {$sel:apiKeySelectionExpression:Api' :: Maybe Text
apiKeySelectionExpression = Maybe Text
a} :: Api)
api_corsConfiguration :: Lens.Lens' Api (Prelude.Maybe Cors)
api_corsConfiguration :: (Maybe Cors -> f (Maybe Cors)) -> Api -> f Api
api_corsConfiguration = (Api -> Maybe Cors)
-> (Api -> Maybe Cors -> Api)
-> Lens Api Api (Maybe Cors) (Maybe Cors)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe Cors
corsConfiguration :: Maybe Cors
$sel:corsConfiguration:Api' :: Api -> Maybe Cors
corsConfiguration} -> Maybe Cors
corsConfiguration) (\s :: Api
s@Api' {} Maybe Cors
a -> Api
s {$sel:corsConfiguration:Api' :: Maybe Cors
corsConfiguration = Maybe Cors
a} :: Api)
api_importInfo :: Lens.Lens' Api (Prelude.Maybe [Prelude.Text])
api_importInfo :: (Maybe [Text] -> f (Maybe [Text])) -> Api -> f Api
api_importInfo = (Api -> Maybe [Text])
-> (Api -> Maybe [Text] -> Api)
-> Lens Api Api (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe [Text]
importInfo :: Maybe [Text]
$sel:importInfo:Api' :: Api -> Maybe [Text]
importInfo} -> Maybe [Text]
importInfo) (\s :: Api
s@Api' {} Maybe [Text]
a -> Api
s {$sel:importInfo:Api' :: Maybe [Text]
importInfo = Maybe [Text]
a} :: Api) ((Maybe [Text] -> f (Maybe [Text])) -> Api -> f Api)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Api
-> f Api
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
api_disableSchemaValidation :: Lens.Lens' Api (Prelude.Maybe Prelude.Bool)
api_disableSchemaValidation :: (Maybe Bool -> f (Maybe Bool)) -> Api -> f Api
api_disableSchemaValidation = (Api -> Maybe Bool)
-> (Api -> Maybe Bool -> Api)
-> Lens Api Api (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe Bool
disableSchemaValidation :: Maybe Bool
$sel:disableSchemaValidation:Api' :: Api -> Maybe Bool
disableSchemaValidation} -> Maybe Bool
disableSchemaValidation) (\s :: Api
s@Api' {} Maybe Bool
a -> Api
s {$sel:disableSchemaValidation:Api' :: Maybe Bool
disableSchemaValidation = Maybe Bool
a} :: Api)
api_description :: Lens.Lens' Api (Prelude.Maybe Prelude.Text)
api_description :: (Maybe Text -> f (Maybe Text)) -> Api -> f Api
api_description = (Api -> Maybe Text)
-> (Api -> Maybe Text -> Api)
-> Lens Api Api (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe Text
description :: Maybe Text
$sel:description:Api' :: Api -> Maybe Text
description} -> Maybe Text
description) (\s :: Api
s@Api' {} Maybe Text
a -> Api
s {$sel:description:Api' :: Maybe Text
description = Maybe Text
a} :: Api)
api_tags :: Lens.Lens' Api (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
api_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Api -> f Api
api_tags = (Api -> Maybe (HashMap Text Text))
-> (Api -> Maybe (HashMap Text Text) -> Api)
-> Lens
Api Api (Maybe (HashMap Text Text)) (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Api' :: Api -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Api
s@Api' {} Maybe (HashMap Text Text)
a -> Api
s {$sel:tags:Api' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Api) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Api -> f Api)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Api
-> f Api
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
api_routeSelectionExpression :: Lens.Lens' Api Prelude.Text
api_routeSelectionExpression :: (Text -> f Text) -> Api -> f Api
api_routeSelectionExpression = (Api -> Text) -> (Api -> Text -> Api) -> Lens Api Api Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Text
routeSelectionExpression :: Text
$sel:routeSelectionExpression:Api' :: Api -> Text
routeSelectionExpression} -> Text
routeSelectionExpression) (\s :: Api
s@Api' {} Text
a -> Api
s {$sel:routeSelectionExpression:Api' :: Text
routeSelectionExpression = Text
a} :: Api)
api_name :: Lens.Lens' Api Prelude.Text
api_name :: (Text -> f Text) -> Api -> f Api
api_name = (Api -> Text) -> (Api -> Text -> Api) -> Lens Api Api Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {Text
name :: Text
$sel:name:Api' :: Api -> Text
name} -> Text
name) (\s :: Api
s@Api' {} Text
a -> Api
s {$sel:name:Api' :: Text
name = Text
a} :: Api)
api_protocolType :: Lens.Lens' Api ProtocolType
api_protocolType :: (ProtocolType -> f ProtocolType) -> Api -> f Api
api_protocolType = (Api -> ProtocolType)
-> (Api -> ProtocolType -> Api)
-> Lens Api Api ProtocolType ProtocolType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Api' {ProtocolType
protocolType :: ProtocolType
$sel:protocolType:Api' :: Api -> ProtocolType
protocolType} -> ProtocolType
protocolType) (\s :: Api
s@Api' {} ProtocolType
a -> Api
s {$sel:protocolType:Api' :: ProtocolType
protocolType = ProtocolType
a} :: Api)
instance Core.FromJSON Api where
parseJSON :: Value -> Parser Api
parseJSON =
String -> (Object -> Parser Api) -> Value -> Parser Api
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Api"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api
Api'
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"apiId")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"disableExecuteApiEndpoint")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"apiEndpoint")
Parser
(Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe [Text])
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"warnings" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdDate")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"version")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"apiGatewayManaged")
Parser
(Maybe Text
-> Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe Text)
-> Parser
(Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"apiKeySelectionExpression")
Parser
(Maybe Cors
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe Cors)
-> Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Cors)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"corsConfiguration")
Parser
(Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe [Text])
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"importInfo" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"disableSchemaValidation")
Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ProtocolType
-> Api)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text) -> Text -> Text -> ProtocolType -> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
Parser
(Maybe (HashMap Text Text) -> Text -> Text -> ProtocolType -> Api)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Text -> Text -> ProtocolType -> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser (Text -> Text -> ProtocolType -> Api)
-> Parser Text -> Parser (Text -> ProtocolType -> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"routeSelectionExpression")
Parser (Text -> ProtocolType -> Api)
-> Parser Text -> Parser (ProtocolType -> Api)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
Parser (ProtocolType -> Api) -> Parser ProtocolType -> Parser Api
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ProtocolType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"protocolType")
)
instance Prelude.Hashable Api
instance Prelude.NFData Api