{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data SdkConfigurationProperty = SdkConfigurationProperty'
{
SdkConfigurationProperty -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
SdkConfigurationProperty -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
SdkConfigurationProperty -> Maybe Text
friendlyName :: Prelude.Maybe Prelude.Text,
SdkConfigurationProperty -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
SdkConfigurationProperty -> Maybe Bool
required :: Prelude.Maybe Prelude.Bool
}
deriving (SdkConfigurationProperty -> SdkConfigurationProperty -> Bool
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]
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
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.
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'
{ $sel:defaultValue:SdkConfigurationProperty' :: Maybe Text
defaultValue =
forall a. Maybe a
Prelude.Nothing,
$sel:description:SdkConfigurationProperty' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:friendlyName:SdkConfigurationProperty' :: Maybe Text
friendlyName = forall a. Maybe a
Prelude.Nothing,
$sel:name:SdkConfigurationProperty' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:required:SdkConfigurationProperty' :: Maybe Bool
required = forall a. Maybe a
Prelude.Nothing
}
sdkConfigurationProperty_defaultValue :: Lens.Lens' SdkConfigurationProperty (Prelude.Maybe Prelude.Text)
sdkConfigurationProperty_defaultValue :: Lens' SdkConfigurationProperty (Maybe Text)
sdkConfigurationProperty_defaultValue = 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 :: Lens' SdkConfigurationProperty (Maybe Text)
sdkConfigurationProperty_description = 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)
sdkConfigurationProperty_friendlyName :: Lens.Lens' SdkConfigurationProperty (Prelude.Maybe Prelude.Text)
sdkConfigurationProperty_friendlyName :: Lens' SdkConfigurationProperty (Maybe Text)
sdkConfigurationProperty_friendlyName = 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_name :: Lens.Lens' SdkConfigurationProperty (Prelude.Maybe Prelude.Text)
sdkConfigurationProperty_name :: Lens' SdkConfigurationProperty (Maybe Text)
sdkConfigurationProperty_name = 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_required :: Lens.Lens' SdkConfigurationProperty (Prelude.Maybe Prelude.Bool)
sdkConfigurationProperty_required :: Lens' SdkConfigurationProperty (Maybe Bool)
sdkConfigurationProperty_required = 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)
instance Data.FromJSON SdkConfigurationProperty where
parseJSON :: Value -> Parser SdkConfigurationProperty
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SdkConfigurationProperty"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> SdkConfigurationProperty
SdkConfigurationProperty'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"defaultValue")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (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 -> Parser (Maybe a)
Data..:? Key
"friendlyName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (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 -> Parser (Maybe a)
Data..:? Key
"required")
)
instance Prelude.Hashable SdkConfigurationProperty where
hashWithSalt :: Int -> SdkConfigurationProperty -> Int
hashWithSalt Int
_salt SdkConfigurationProperty' {Maybe Bool
Maybe Text
required :: Maybe Bool
name :: Maybe Text
friendlyName :: Maybe Text
description :: Maybe Text
defaultValue :: Maybe Text
$sel:required:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Bool
$sel:name:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
$sel:friendlyName:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
$sel:description:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
$sel:defaultValue:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultValue
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
friendlyName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
required
instance Prelude.NFData SdkConfigurationProperty where
rnf :: SdkConfigurationProperty -> ()
rnf SdkConfigurationProperty' {Maybe Bool
Maybe Text
required :: Maybe Bool
name :: Maybe Text
friendlyName :: Maybe Text
description :: Maybe Text
defaultValue :: Maybe Text
$sel:required:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Bool
$sel:name:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
$sel:friendlyName:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
$sel:description:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
$sel:defaultValue:SdkConfigurationProperty' :: SdkConfigurationProperty -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultValue
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 Text
friendlyName
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 Bool
required