{-# 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.SecurityHub.Types.AwsApiGatewayRestApiDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsApiGatewayEndpointConfiguration
data AwsApiGatewayRestApiDetails = AwsApiGatewayRestApiDetails'
{
AwsApiGatewayRestApiDetails -> Maybe Int
minimumCompressionSize :: Prelude.Maybe Prelude.Int,
AwsApiGatewayRestApiDetails -> Maybe [Text]
binaryMediaTypes :: Prelude.Maybe [Prelude.Text],
AwsApiGatewayRestApiDetails -> Maybe Text
createdDate :: Prelude.Maybe Prelude.Text,
AwsApiGatewayRestApiDetails -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
AwsApiGatewayRestApiDetails -> Maybe Text
apiKeySource :: Prelude.Maybe Prelude.Text,
AwsApiGatewayRestApiDetails -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
AwsApiGatewayRestApiDetails -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
AwsApiGatewayRestApiDetails
-> Maybe AwsApiGatewayEndpointConfiguration
endpointConfiguration :: Prelude.Maybe AwsApiGatewayEndpointConfiguration,
AwsApiGatewayRestApiDetails -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (AwsApiGatewayRestApiDetails -> AwsApiGatewayRestApiDetails -> Bool
(AwsApiGatewayRestApiDetails
-> AwsApiGatewayRestApiDetails -> Bool)
-> (AwsApiGatewayRestApiDetails
-> AwsApiGatewayRestApiDetails -> Bool)
-> Eq AwsApiGatewayRestApiDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsApiGatewayRestApiDetails -> AwsApiGatewayRestApiDetails -> Bool
$c/= :: AwsApiGatewayRestApiDetails -> AwsApiGatewayRestApiDetails -> Bool
== :: AwsApiGatewayRestApiDetails -> AwsApiGatewayRestApiDetails -> Bool
$c== :: AwsApiGatewayRestApiDetails -> AwsApiGatewayRestApiDetails -> Bool
Prelude.Eq, ReadPrec [AwsApiGatewayRestApiDetails]
ReadPrec AwsApiGatewayRestApiDetails
Int -> ReadS AwsApiGatewayRestApiDetails
ReadS [AwsApiGatewayRestApiDetails]
(Int -> ReadS AwsApiGatewayRestApiDetails)
-> ReadS [AwsApiGatewayRestApiDetails]
-> ReadPrec AwsApiGatewayRestApiDetails
-> ReadPrec [AwsApiGatewayRestApiDetails]
-> Read AwsApiGatewayRestApiDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsApiGatewayRestApiDetails]
$creadListPrec :: ReadPrec [AwsApiGatewayRestApiDetails]
readPrec :: ReadPrec AwsApiGatewayRestApiDetails
$creadPrec :: ReadPrec AwsApiGatewayRestApiDetails
readList :: ReadS [AwsApiGatewayRestApiDetails]
$creadList :: ReadS [AwsApiGatewayRestApiDetails]
readsPrec :: Int -> ReadS AwsApiGatewayRestApiDetails
$creadsPrec :: Int -> ReadS AwsApiGatewayRestApiDetails
Prelude.Read, Int -> AwsApiGatewayRestApiDetails -> ShowS
[AwsApiGatewayRestApiDetails] -> ShowS
AwsApiGatewayRestApiDetails -> String
(Int -> AwsApiGatewayRestApiDetails -> ShowS)
-> (AwsApiGatewayRestApiDetails -> String)
-> ([AwsApiGatewayRestApiDetails] -> ShowS)
-> Show AwsApiGatewayRestApiDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsApiGatewayRestApiDetails] -> ShowS
$cshowList :: [AwsApiGatewayRestApiDetails] -> ShowS
show :: AwsApiGatewayRestApiDetails -> String
$cshow :: AwsApiGatewayRestApiDetails -> String
showsPrec :: Int -> AwsApiGatewayRestApiDetails -> ShowS
$cshowsPrec :: Int -> AwsApiGatewayRestApiDetails -> ShowS
Prelude.Show, (forall x.
AwsApiGatewayRestApiDetails -> Rep AwsApiGatewayRestApiDetails x)
-> (forall x.
Rep AwsApiGatewayRestApiDetails x -> AwsApiGatewayRestApiDetails)
-> Generic AwsApiGatewayRestApiDetails
forall x.
Rep AwsApiGatewayRestApiDetails x -> AwsApiGatewayRestApiDetails
forall x.
AwsApiGatewayRestApiDetails -> Rep AwsApiGatewayRestApiDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsApiGatewayRestApiDetails x -> AwsApiGatewayRestApiDetails
$cfrom :: forall x.
AwsApiGatewayRestApiDetails -> Rep AwsApiGatewayRestApiDetails x
Prelude.Generic)
newAwsApiGatewayRestApiDetails ::
AwsApiGatewayRestApiDetails
newAwsApiGatewayRestApiDetails :: AwsApiGatewayRestApiDetails
newAwsApiGatewayRestApiDetails =
AwsApiGatewayRestApiDetails' :: Maybe Int
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails
AwsApiGatewayRestApiDetails'
{ $sel:minimumCompressionSize:AwsApiGatewayRestApiDetails' :: Maybe Int
minimumCompressionSize =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:binaryMediaTypes:AwsApiGatewayRestApiDetails' :: Maybe [Text]
binaryMediaTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:createdDate:AwsApiGatewayRestApiDetails' :: Maybe Text
createdDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:AwsApiGatewayRestApiDetails' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:apiKeySource:AwsApiGatewayRestApiDetails' :: Maybe Text
apiKeySource = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:AwsApiGatewayRestApiDetails' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:AwsApiGatewayRestApiDetails' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:endpointConfiguration:AwsApiGatewayRestApiDetails' :: Maybe AwsApiGatewayEndpointConfiguration
endpointConfiguration = Maybe AwsApiGatewayEndpointConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:description:AwsApiGatewayRestApiDetails' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsApiGatewayRestApiDetails_minimumCompressionSize :: Lens.Lens' AwsApiGatewayRestApiDetails (Prelude.Maybe Prelude.Int)
awsApiGatewayRestApiDetails_minimumCompressionSize :: (Maybe Int -> f (Maybe Int))
-> AwsApiGatewayRestApiDetails -> f AwsApiGatewayRestApiDetails
awsApiGatewayRestApiDetails_minimumCompressionSize = (AwsApiGatewayRestApiDetails -> Maybe Int)
-> (AwsApiGatewayRestApiDetails
-> Maybe Int -> AwsApiGatewayRestApiDetails)
-> Lens
AwsApiGatewayRestApiDetails
AwsApiGatewayRestApiDetails
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayRestApiDetails' {Maybe Int
minimumCompressionSize :: Maybe Int
$sel:minimumCompressionSize:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Int
minimumCompressionSize} -> Maybe Int
minimumCompressionSize) (\s :: AwsApiGatewayRestApiDetails
s@AwsApiGatewayRestApiDetails' {} Maybe Int
a -> AwsApiGatewayRestApiDetails
s {$sel:minimumCompressionSize:AwsApiGatewayRestApiDetails' :: Maybe Int
minimumCompressionSize = Maybe Int
a} :: AwsApiGatewayRestApiDetails)
awsApiGatewayRestApiDetails_binaryMediaTypes :: Lens.Lens' AwsApiGatewayRestApiDetails (Prelude.Maybe [Prelude.Text])
awsApiGatewayRestApiDetails_binaryMediaTypes :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsApiGatewayRestApiDetails -> f AwsApiGatewayRestApiDetails
awsApiGatewayRestApiDetails_binaryMediaTypes = (AwsApiGatewayRestApiDetails -> Maybe [Text])
-> (AwsApiGatewayRestApiDetails
-> Maybe [Text] -> AwsApiGatewayRestApiDetails)
-> Lens
AwsApiGatewayRestApiDetails
AwsApiGatewayRestApiDetails
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayRestApiDetails' {Maybe [Text]
binaryMediaTypes :: Maybe [Text]
$sel:binaryMediaTypes:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe [Text]
binaryMediaTypes} -> Maybe [Text]
binaryMediaTypes) (\s :: AwsApiGatewayRestApiDetails
s@AwsApiGatewayRestApiDetails' {} Maybe [Text]
a -> AwsApiGatewayRestApiDetails
s {$sel:binaryMediaTypes:AwsApiGatewayRestApiDetails' :: Maybe [Text]
binaryMediaTypes = Maybe [Text]
a} :: AwsApiGatewayRestApiDetails) ((Maybe [Text] -> f (Maybe [Text]))
-> AwsApiGatewayRestApiDetails -> f AwsApiGatewayRestApiDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsApiGatewayRestApiDetails
-> f AwsApiGatewayRestApiDetails
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
awsApiGatewayRestApiDetails_createdDate :: Lens.Lens' AwsApiGatewayRestApiDetails (Prelude.Maybe Prelude.Text)
awsApiGatewayRestApiDetails_createdDate :: (Maybe Text -> f (Maybe Text))
-> AwsApiGatewayRestApiDetails -> f AwsApiGatewayRestApiDetails
awsApiGatewayRestApiDetails_createdDate = (AwsApiGatewayRestApiDetails -> Maybe Text)
-> (AwsApiGatewayRestApiDetails
-> Maybe Text -> AwsApiGatewayRestApiDetails)
-> Lens
AwsApiGatewayRestApiDetails
AwsApiGatewayRestApiDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayRestApiDetails' {Maybe Text
createdDate :: Maybe Text
$sel:createdDate:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
createdDate} -> Maybe Text
createdDate) (\s :: AwsApiGatewayRestApiDetails
s@AwsApiGatewayRestApiDetails' {} Maybe Text
a -> AwsApiGatewayRestApiDetails
s {$sel:createdDate:AwsApiGatewayRestApiDetails' :: Maybe Text
createdDate = Maybe Text
a} :: AwsApiGatewayRestApiDetails)
awsApiGatewayRestApiDetails_name :: Lens.Lens' AwsApiGatewayRestApiDetails (Prelude.Maybe Prelude.Text)
awsApiGatewayRestApiDetails_name :: (Maybe Text -> f (Maybe Text))
-> AwsApiGatewayRestApiDetails -> f AwsApiGatewayRestApiDetails
awsApiGatewayRestApiDetails_name = (AwsApiGatewayRestApiDetails -> Maybe Text)
-> (AwsApiGatewayRestApiDetails
-> Maybe Text -> AwsApiGatewayRestApiDetails)
-> Lens
AwsApiGatewayRestApiDetails
AwsApiGatewayRestApiDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayRestApiDetails' {Maybe Text
name :: Maybe Text
$sel:name:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
name} -> Maybe Text
name) (\s :: AwsApiGatewayRestApiDetails
s@AwsApiGatewayRestApiDetails' {} Maybe Text
a -> AwsApiGatewayRestApiDetails
s {$sel:name:AwsApiGatewayRestApiDetails' :: Maybe Text
name = Maybe Text
a} :: AwsApiGatewayRestApiDetails)
awsApiGatewayRestApiDetails_apiKeySource :: Lens.Lens' AwsApiGatewayRestApiDetails (Prelude.Maybe Prelude.Text)
awsApiGatewayRestApiDetails_apiKeySource :: (Maybe Text -> f (Maybe Text))
-> AwsApiGatewayRestApiDetails -> f AwsApiGatewayRestApiDetails
awsApiGatewayRestApiDetails_apiKeySource = (AwsApiGatewayRestApiDetails -> Maybe Text)
-> (AwsApiGatewayRestApiDetails
-> Maybe Text -> AwsApiGatewayRestApiDetails)
-> Lens
AwsApiGatewayRestApiDetails
AwsApiGatewayRestApiDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayRestApiDetails' {Maybe Text
apiKeySource :: Maybe Text
$sel:apiKeySource:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
apiKeySource} -> Maybe Text
apiKeySource) (\s :: AwsApiGatewayRestApiDetails
s@AwsApiGatewayRestApiDetails' {} Maybe Text
a -> AwsApiGatewayRestApiDetails
s {$sel:apiKeySource:AwsApiGatewayRestApiDetails' :: Maybe Text
apiKeySource = Maybe Text
a} :: AwsApiGatewayRestApiDetails)
awsApiGatewayRestApiDetails_version :: Lens.Lens' AwsApiGatewayRestApiDetails (Prelude.Maybe Prelude.Text)
awsApiGatewayRestApiDetails_version :: (Maybe Text -> f (Maybe Text))
-> AwsApiGatewayRestApiDetails -> f AwsApiGatewayRestApiDetails
awsApiGatewayRestApiDetails_version = (AwsApiGatewayRestApiDetails -> Maybe Text)
-> (AwsApiGatewayRestApiDetails
-> Maybe Text -> AwsApiGatewayRestApiDetails)
-> Lens
AwsApiGatewayRestApiDetails
AwsApiGatewayRestApiDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayRestApiDetails' {Maybe Text
version :: Maybe Text
$sel:version:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
version} -> Maybe Text
version) (\s :: AwsApiGatewayRestApiDetails
s@AwsApiGatewayRestApiDetails' {} Maybe Text
a -> AwsApiGatewayRestApiDetails
s {$sel:version:AwsApiGatewayRestApiDetails' :: Maybe Text
version = Maybe Text
a} :: AwsApiGatewayRestApiDetails)
awsApiGatewayRestApiDetails_id :: Lens.Lens' AwsApiGatewayRestApiDetails (Prelude.Maybe Prelude.Text)
awsApiGatewayRestApiDetails_id :: (Maybe Text -> f (Maybe Text))
-> AwsApiGatewayRestApiDetails -> f AwsApiGatewayRestApiDetails
awsApiGatewayRestApiDetails_id = (AwsApiGatewayRestApiDetails -> Maybe Text)
-> (AwsApiGatewayRestApiDetails
-> Maybe Text -> AwsApiGatewayRestApiDetails)
-> Lens
AwsApiGatewayRestApiDetails
AwsApiGatewayRestApiDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayRestApiDetails' {Maybe Text
id :: Maybe Text
$sel:id:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
id} -> Maybe Text
id) (\s :: AwsApiGatewayRestApiDetails
s@AwsApiGatewayRestApiDetails' {} Maybe Text
a -> AwsApiGatewayRestApiDetails
s {$sel:id:AwsApiGatewayRestApiDetails' :: Maybe Text
id = Maybe Text
a} :: AwsApiGatewayRestApiDetails)
awsApiGatewayRestApiDetails_endpointConfiguration :: Lens.Lens' AwsApiGatewayRestApiDetails (Prelude.Maybe AwsApiGatewayEndpointConfiguration)
awsApiGatewayRestApiDetails_endpointConfiguration :: (Maybe AwsApiGatewayEndpointConfiguration
-> f (Maybe AwsApiGatewayEndpointConfiguration))
-> AwsApiGatewayRestApiDetails -> f AwsApiGatewayRestApiDetails
awsApiGatewayRestApiDetails_endpointConfiguration = (AwsApiGatewayRestApiDetails
-> Maybe AwsApiGatewayEndpointConfiguration)
-> (AwsApiGatewayRestApiDetails
-> Maybe AwsApiGatewayEndpointConfiguration
-> AwsApiGatewayRestApiDetails)
-> Lens
AwsApiGatewayRestApiDetails
AwsApiGatewayRestApiDetails
(Maybe AwsApiGatewayEndpointConfiguration)
(Maybe AwsApiGatewayEndpointConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayRestApiDetails' {Maybe AwsApiGatewayEndpointConfiguration
endpointConfiguration :: Maybe AwsApiGatewayEndpointConfiguration
$sel:endpointConfiguration:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails
-> Maybe AwsApiGatewayEndpointConfiguration
endpointConfiguration} -> Maybe AwsApiGatewayEndpointConfiguration
endpointConfiguration) (\s :: AwsApiGatewayRestApiDetails
s@AwsApiGatewayRestApiDetails' {} Maybe AwsApiGatewayEndpointConfiguration
a -> AwsApiGatewayRestApiDetails
s {$sel:endpointConfiguration:AwsApiGatewayRestApiDetails' :: Maybe AwsApiGatewayEndpointConfiguration
endpointConfiguration = Maybe AwsApiGatewayEndpointConfiguration
a} :: AwsApiGatewayRestApiDetails)
awsApiGatewayRestApiDetails_description :: Lens.Lens' AwsApiGatewayRestApiDetails (Prelude.Maybe Prelude.Text)
awsApiGatewayRestApiDetails_description :: (Maybe Text -> f (Maybe Text))
-> AwsApiGatewayRestApiDetails -> f AwsApiGatewayRestApiDetails
awsApiGatewayRestApiDetails_description = (AwsApiGatewayRestApiDetails -> Maybe Text)
-> (AwsApiGatewayRestApiDetails
-> Maybe Text -> AwsApiGatewayRestApiDetails)
-> Lens
AwsApiGatewayRestApiDetails
AwsApiGatewayRestApiDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsApiGatewayRestApiDetails' {Maybe Text
description :: Maybe Text
$sel:description:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
description} -> Maybe Text
description) (\s :: AwsApiGatewayRestApiDetails
s@AwsApiGatewayRestApiDetails' {} Maybe Text
a -> AwsApiGatewayRestApiDetails
s {$sel:description:AwsApiGatewayRestApiDetails' :: Maybe Text
description = Maybe Text
a} :: AwsApiGatewayRestApiDetails)
instance Core.FromJSON AwsApiGatewayRestApiDetails where
parseJSON :: Value -> Parser AwsApiGatewayRestApiDetails
parseJSON =
String
-> (Object -> Parser AwsApiGatewayRestApiDetails)
-> Value
-> Parser AwsApiGatewayRestApiDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsApiGatewayRestApiDetails"
( \Object
x ->
Maybe Int
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails
AwsApiGatewayRestApiDetails'
(Maybe Int
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
-> Parser (Maybe Int)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MinimumCompressionSize")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
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
"BinaryMediaTypes"
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
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
"CreatedDate")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
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
"Name")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
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
"ApiKeySource")
Parser
(Maybe Text
-> Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
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 Text
-> Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text
-> AwsApiGatewayRestApiDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text -> AwsApiGatewayRestApiDetails)
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
"Id")
Parser
(Maybe AwsApiGatewayEndpointConfiguration
-> Maybe Text -> AwsApiGatewayRestApiDetails)
-> Parser (Maybe AwsApiGatewayEndpointConfiguration)
-> Parser (Maybe Text -> AwsApiGatewayRestApiDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AwsApiGatewayEndpointConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndpointConfiguration")
Parser (Maybe Text -> AwsApiGatewayRestApiDetails)
-> Parser (Maybe Text) -> Parser AwsApiGatewayRestApiDetails
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")
)
instance Prelude.Hashable AwsApiGatewayRestApiDetails
instance Prelude.NFData AwsApiGatewayRestApiDetails
instance Core.ToJSON AwsApiGatewayRestApiDetails where
toJSON :: AwsApiGatewayRestApiDetails -> Value
toJSON AwsApiGatewayRestApiDetails' {Maybe Int
Maybe [Text]
Maybe Text
Maybe AwsApiGatewayEndpointConfiguration
description :: Maybe Text
endpointConfiguration :: Maybe AwsApiGatewayEndpointConfiguration
id :: Maybe Text
version :: Maybe Text
apiKeySource :: Maybe Text
name :: Maybe Text
createdDate :: Maybe Text
binaryMediaTypes :: Maybe [Text]
minimumCompressionSize :: Maybe Int
$sel:description:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
$sel:endpointConfiguration:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails
-> Maybe AwsApiGatewayEndpointConfiguration
$sel:id:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
$sel:version:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
$sel:apiKeySource:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
$sel:name:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
$sel:createdDate:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Text
$sel:binaryMediaTypes:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe [Text]
$sel:minimumCompressionSize:AwsApiGatewayRestApiDetails' :: AwsApiGatewayRestApiDetails -> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"MinimumCompressionSize" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
minimumCompressionSize,
(Text
"BinaryMediaTypes" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
binaryMediaTypes,
(Text
"CreatedDate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
createdDate,
(Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
(Text
"ApiKeySource" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
apiKeySource,
(Text
"Version" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
version,
(Text
"Id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
id,
(Text
"EndpointConfiguration" Text -> AwsApiGatewayEndpointConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AwsApiGatewayEndpointConfiguration -> Pair)
-> Maybe AwsApiGatewayEndpointConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsApiGatewayEndpointConfiguration
endpointConfiguration,
(Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description
]
)