{-# 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.APIGateway.Types.SdkConfigurationProperty where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SdkConfigurationProperty = SdkConfigurationProperty'
{
SdkConfigurationProperty -> Maybe Text
friendlyName :: Prelude.Maybe Prelude.Text,
SdkConfigurationProperty -> Maybe Bool
required :: Prelude.Maybe Prelude.Bool,
SdkConfigurationProperty -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
SdkConfigurationProperty -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
SdkConfigurationProperty -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (SdkConfigurationProperty -> SdkConfigurationProperty -> Bool
(SdkConfigurationProperty -> SdkConfigurationProperty -> Bool)
-> (SdkConfigurationProperty -> SdkConfigurationProperty -> Bool)
-> Eq SdkConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SdkConfigurationProperty -> SdkConfigurationProperty -> Bool
$c/= :: SdkConfigurationProperty -> SdkConfigurationProperty -> Bool
== :: SdkConfigurationProperty -> SdkConfigurationProperty -> Bool
$c== :: SdkConfigurationProperty -> SdkConfigurationProperty -> Bool
Prelude.Eq, ReadPrec [SdkConfigurationProperty]
ReadPrec SdkConfigurationProperty
Int -> ReadS SdkConfigurationProperty
ReadS [SdkConfigurationProperty]
(Int -> ReadS SdkConfigurationProperty)
-> ReadS [SdkConfigurationProperty]
-> ReadPrec SdkConfigurationProperty
-> ReadPrec [SdkConfigurationProperty]
-> Read SdkConfigurationProperty
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SdkConfigurationProperty]
$creadListPrec :: ReadPrec [SdkConfigurationProperty]
readPrec :: ReadPrec SdkConfigurationProperty
$creadPrec :: ReadPrec SdkConfigurationProperty
readList :: ReadS [SdkConfigurationProperty]
$creadList :: ReadS [SdkConfigurationProperty]
readsPrec :: Int -> ReadS SdkConfigurationProperty
$creadsPrec :: Int -> ReadS SdkConfigurationProperty
Prelude.Read, Int -> SdkConfigurationProperty -> ShowS
[SdkConfigurationProperty] -> ShowS
SdkConfigurationProperty -> String
(Int -> SdkConfigurationProperty -> ShowS)
-> (SdkConfigurationProperty -> String)
-> ([SdkConfigurationProperty] -> ShowS)
-> Show SdkConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SdkConfigurationProperty] -> ShowS
$cshowList :: [SdkConfigurationProperty] -> ShowS
show :: SdkConfigurationProperty -> String
$cshow :: SdkConfigurationProperty -> String
showsPrec :: Int -> SdkConfigurationProperty -> ShowS
$cshowsPrec :: Int -> SdkConfigurationProperty -> ShowS
Prelude.Show, (forall x.
SdkConfigurationProperty -> Rep SdkConfigurationProperty x)
-> (forall x.
Rep SdkConfigurationProperty x -> SdkConfigurationProperty)
-> Generic SdkConfigurationProperty
forall x.
Rep SdkConfigurationProperty x -> SdkConfigurationProperty
forall x.
SdkConfigurationProperty -> Rep SdkConfigurationProperty x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SdkConfigurationProperty x -> SdkConfigurationProperty
$cfrom :: forall x.
SdkConfigurationProperty -> Rep SdkConfigurationProperty x
Prelude.Generic)
newSdkConfigurationProperty ::
SdkConfigurationProperty
newSdkConfigurationProperty :: SdkConfigurationProperty
newSdkConfigurationProperty =
SdkConfigurationProperty' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SdkConfigurationProperty
SdkConfigurationProperty'
{ $sel:friendlyName:SdkConfigurationProperty' :: Maybe Text
friendlyName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:required:SdkConfigurationProperty' :: Maybe Bool
required = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:name:SdkConfigurationProperty' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultValue:SdkConfigurationProperty' :: Maybe Text
defaultValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:SdkConfigurationProperty' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
sdkConfigurationProperty_friendlyName :: Lens.Lens' SdkConfigurationProperty (Prelude.Maybe Prelude.Text)
sdkConfigurationProperty_friendlyName :: (Maybe Text -> f (Maybe Text))
-> SdkConfigurationProperty -> f SdkConfigurationProperty
sdkConfigurationProperty_friendlyName = (SdkConfigurationProperty -> Maybe Text)
-> (SdkConfigurationProperty
-> Maybe Text -> SdkConfigurationProperty)
-> Lens
SdkConfigurationProperty
SdkConfigurationProperty
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SdkConfigurationProperty' {Maybe Text
friendlyName :: Maybe Text
$sel:friendlyName:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
friendlyName} -> Maybe Text
friendlyName) (\s :: SdkConfigurationProperty
s@SdkConfigurationProperty' {} Maybe Text
a -> SdkConfigurationProperty
s {$sel:friendlyName:SdkConfigurationProperty' :: Maybe Text
friendlyName = Maybe Text
a} :: SdkConfigurationProperty)
sdkConfigurationProperty_required :: Lens.Lens' SdkConfigurationProperty (Prelude.Maybe Prelude.Bool)
sdkConfigurationProperty_required :: (Maybe Bool -> f (Maybe Bool))
-> SdkConfigurationProperty -> f SdkConfigurationProperty
sdkConfigurationProperty_required = (SdkConfigurationProperty -> Maybe Bool)
-> (SdkConfigurationProperty
-> Maybe Bool -> SdkConfigurationProperty)
-> Lens
SdkConfigurationProperty
SdkConfigurationProperty
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SdkConfigurationProperty' {Maybe Bool
required :: Maybe Bool
$sel:required:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Bool
required} -> Maybe Bool
required) (\s :: SdkConfigurationProperty
s@SdkConfigurationProperty' {} Maybe Bool
a -> SdkConfigurationProperty
s {$sel:required:SdkConfigurationProperty' :: Maybe Bool
required = Maybe Bool
a} :: SdkConfigurationProperty)
sdkConfigurationProperty_name :: Lens.Lens' SdkConfigurationProperty (Prelude.Maybe Prelude.Text)
sdkConfigurationProperty_name :: (Maybe Text -> f (Maybe Text))
-> SdkConfigurationProperty -> f SdkConfigurationProperty
sdkConfigurationProperty_name = (SdkConfigurationProperty -> Maybe Text)
-> (SdkConfigurationProperty
-> Maybe Text -> SdkConfigurationProperty)
-> Lens
SdkConfigurationProperty
SdkConfigurationProperty
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SdkConfigurationProperty' {Maybe Text
name :: Maybe Text
$sel:name:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
name} -> Maybe Text
name) (\s :: SdkConfigurationProperty
s@SdkConfigurationProperty' {} Maybe Text
a -> SdkConfigurationProperty
s {$sel:name:SdkConfigurationProperty' :: Maybe Text
name = Maybe Text
a} :: SdkConfigurationProperty)
sdkConfigurationProperty_defaultValue :: Lens.Lens' SdkConfigurationProperty (Prelude.Maybe Prelude.Text)
sdkConfigurationProperty_defaultValue :: (Maybe Text -> f (Maybe Text))
-> SdkConfigurationProperty -> f SdkConfigurationProperty
sdkConfigurationProperty_defaultValue = (SdkConfigurationProperty -> Maybe Text)
-> (SdkConfigurationProperty
-> Maybe Text -> SdkConfigurationProperty)
-> Lens
SdkConfigurationProperty
SdkConfigurationProperty
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SdkConfigurationProperty' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: SdkConfigurationProperty
s@SdkConfigurationProperty' {} Maybe Text
a -> SdkConfigurationProperty
s {$sel:defaultValue:SdkConfigurationProperty' :: Maybe Text
defaultValue = Maybe Text
a} :: SdkConfigurationProperty)
sdkConfigurationProperty_description :: Lens.Lens' SdkConfigurationProperty (Prelude.Maybe Prelude.Text)
sdkConfigurationProperty_description :: (Maybe Text -> f (Maybe Text))
-> SdkConfigurationProperty -> f SdkConfigurationProperty
sdkConfigurationProperty_description = (SdkConfigurationProperty -> Maybe Text)
-> (SdkConfigurationProperty
-> Maybe Text -> SdkConfigurationProperty)
-> Lens
SdkConfigurationProperty
SdkConfigurationProperty
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SdkConfigurationProperty' {Maybe Text
description :: Maybe Text
$sel:description:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
description} -> Maybe Text
description) (\s :: SdkConfigurationProperty
s@SdkConfigurationProperty' {} Maybe Text
a -> SdkConfigurationProperty
s {$sel:description:SdkConfigurationProperty' :: Maybe Text
description = Maybe Text
a} :: SdkConfigurationProperty)
instance Core.FromJSON SdkConfigurationProperty where
parseJSON :: Value -> Parser SdkConfigurationProperty
parseJSON =
String
-> (Object -> Parser SdkConfigurationProperty)
-> Value
-> Parser SdkConfigurationProperty
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SdkConfigurationProperty"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SdkConfigurationProperty
SdkConfigurationProperty'
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SdkConfigurationProperty)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SdkConfigurationProperty)
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
"friendlyName")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SdkConfigurationProperty)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> SdkConfigurationProperty)
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
"required")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> SdkConfigurationProperty)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> SdkConfigurationProperty)
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 -> SdkConfigurationProperty)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SdkConfigurationProperty)
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
"defaultValue")
Parser (Maybe Text -> SdkConfigurationProperty)
-> Parser (Maybe Text) -> Parser SdkConfigurationProperty
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 SdkConfigurationProperty
instance Prelude.NFData SdkConfigurationProperty