{-# 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.DMS.Types.EndpointSetting where
import qualified Amazonka.Core as Core
import Amazonka.DMS.Types.EndpointSettingTypeValue
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EndpointSetting = EndpointSetting'
{
EndpointSetting -> Maybe Bool
sensitive :: Prelude.Maybe Prelude.Bool,
EndpointSetting -> Maybe Int
intValueMax :: Prelude.Maybe Prelude.Int,
EndpointSetting -> Maybe Text
applicability :: Prelude.Maybe Prelude.Text,
EndpointSetting -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
EndpointSetting -> Maybe Int
intValueMin :: Prelude.Maybe Prelude.Int,
EndpointSetting -> Maybe Text
units :: Prelude.Maybe Prelude.Text,
EndpointSetting -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
EndpointSetting -> Maybe EndpointSettingTypeValue
type' :: Prelude.Maybe EndpointSettingTypeValue,
EndpointSetting -> Maybe [Text]
enumValues :: Prelude.Maybe [Prelude.Text]
}
deriving (EndpointSetting -> EndpointSetting -> Bool
(EndpointSetting -> EndpointSetting -> Bool)
-> (EndpointSetting -> EndpointSetting -> Bool)
-> Eq EndpointSetting
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EndpointSetting -> EndpointSetting -> Bool
$c/= :: EndpointSetting -> EndpointSetting -> Bool
== :: EndpointSetting -> EndpointSetting -> Bool
$c== :: EndpointSetting -> EndpointSetting -> Bool
Prelude.Eq, ReadPrec [EndpointSetting]
ReadPrec EndpointSetting
Int -> ReadS EndpointSetting
ReadS [EndpointSetting]
(Int -> ReadS EndpointSetting)
-> ReadS [EndpointSetting]
-> ReadPrec EndpointSetting
-> ReadPrec [EndpointSetting]
-> Read EndpointSetting
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EndpointSetting]
$creadListPrec :: ReadPrec [EndpointSetting]
readPrec :: ReadPrec EndpointSetting
$creadPrec :: ReadPrec EndpointSetting
readList :: ReadS [EndpointSetting]
$creadList :: ReadS [EndpointSetting]
readsPrec :: Int -> ReadS EndpointSetting
$creadsPrec :: Int -> ReadS EndpointSetting
Prelude.Read, Int -> EndpointSetting -> ShowS
[EndpointSetting] -> ShowS
EndpointSetting -> String
(Int -> EndpointSetting -> ShowS)
-> (EndpointSetting -> String)
-> ([EndpointSetting] -> ShowS)
-> Show EndpointSetting
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EndpointSetting] -> ShowS
$cshowList :: [EndpointSetting] -> ShowS
show :: EndpointSetting -> String
$cshow :: EndpointSetting -> String
showsPrec :: Int -> EndpointSetting -> ShowS
$cshowsPrec :: Int -> EndpointSetting -> ShowS
Prelude.Show, (forall x. EndpointSetting -> Rep EndpointSetting x)
-> (forall x. Rep EndpointSetting x -> EndpointSetting)
-> Generic EndpointSetting
forall x. Rep EndpointSetting x -> EndpointSetting
forall x. EndpointSetting -> Rep EndpointSetting x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EndpointSetting x -> EndpointSetting
$cfrom :: forall x. EndpointSetting -> Rep EndpointSetting x
Prelude.Generic)
newEndpointSetting ::
EndpointSetting
newEndpointSetting :: EndpointSetting
newEndpointSetting =
EndpointSetting' :: Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting
EndpointSetting'
{ $sel:sensitive:EndpointSetting' :: Maybe Bool
sensitive = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:intValueMax:EndpointSetting' :: Maybe Int
intValueMax = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:applicability:EndpointSetting' :: Maybe Text
applicability = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:EndpointSetting' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:intValueMin:EndpointSetting' :: Maybe Int
intValueMin = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:units:EndpointSetting' :: Maybe Text
units = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultValue:EndpointSetting' :: Maybe Text
defaultValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':EndpointSetting' :: Maybe EndpointSettingTypeValue
type' = Maybe EndpointSettingTypeValue
forall a. Maybe a
Prelude.Nothing,
$sel:enumValues:EndpointSetting' :: Maybe [Text]
enumValues = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
endpointSetting_sensitive :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Bool)
endpointSetting_sensitive :: (Maybe Bool -> f (Maybe Bool))
-> EndpointSetting -> f EndpointSetting
endpointSetting_sensitive = (EndpointSetting -> Maybe Bool)
-> (EndpointSetting -> Maybe Bool -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Bool
sensitive :: Maybe Bool
$sel:sensitive:EndpointSetting' :: EndpointSetting -> Maybe Bool
sensitive} -> Maybe Bool
sensitive) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Bool
a -> EndpointSetting
s {$sel:sensitive:EndpointSetting' :: Maybe Bool
sensitive = Maybe Bool
a} :: EndpointSetting)
endpointSetting_intValueMax :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Int)
endpointSetting_intValueMax :: (Maybe Int -> f (Maybe Int))
-> EndpointSetting -> f EndpointSetting
endpointSetting_intValueMax = (EndpointSetting -> Maybe Int)
-> (EndpointSetting -> Maybe Int -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Int
intValueMax :: Maybe Int
$sel:intValueMax:EndpointSetting' :: EndpointSetting -> Maybe Int
intValueMax} -> Maybe Int
intValueMax) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Int
a -> EndpointSetting
s {$sel:intValueMax:EndpointSetting' :: Maybe Int
intValueMax = Maybe Int
a} :: EndpointSetting)
endpointSetting_applicability :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Text)
endpointSetting_applicability :: (Maybe Text -> f (Maybe Text))
-> EndpointSetting -> f EndpointSetting
endpointSetting_applicability = (EndpointSetting -> Maybe Text)
-> (EndpointSetting -> Maybe Text -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Text
applicability :: Maybe Text
$sel:applicability:EndpointSetting' :: EndpointSetting -> Maybe Text
applicability} -> Maybe Text
applicability) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Text
a -> EndpointSetting
s {$sel:applicability:EndpointSetting' :: Maybe Text
applicability = Maybe Text
a} :: EndpointSetting)
endpointSetting_name :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Text)
endpointSetting_name :: (Maybe Text -> f (Maybe Text))
-> EndpointSetting -> f EndpointSetting
endpointSetting_name = (EndpointSetting -> Maybe Text)
-> (EndpointSetting -> Maybe Text -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Text
name :: Maybe Text
$sel:name:EndpointSetting' :: EndpointSetting -> Maybe Text
name} -> Maybe Text
name) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Text
a -> EndpointSetting
s {$sel:name:EndpointSetting' :: Maybe Text
name = Maybe Text
a} :: EndpointSetting)
endpointSetting_intValueMin :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Int)
endpointSetting_intValueMin :: (Maybe Int -> f (Maybe Int))
-> EndpointSetting -> f EndpointSetting
endpointSetting_intValueMin = (EndpointSetting -> Maybe Int)
-> (EndpointSetting -> Maybe Int -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Int
intValueMin :: Maybe Int
$sel:intValueMin:EndpointSetting' :: EndpointSetting -> Maybe Int
intValueMin} -> Maybe Int
intValueMin) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Int
a -> EndpointSetting
s {$sel:intValueMin:EndpointSetting' :: Maybe Int
intValueMin = Maybe Int
a} :: EndpointSetting)
endpointSetting_units :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Text)
endpointSetting_units :: (Maybe Text -> f (Maybe Text))
-> EndpointSetting -> f EndpointSetting
endpointSetting_units = (EndpointSetting -> Maybe Text)
-> (EndpointSetting -> Maybe Text -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Text
units :: Maybe Text
$sel:units:EndpointSetting' :: EndpointSetting -> Maybe Text
units} -> Maybe Text
units) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Text
a -> EndpointSetting
s {$sel:units:EndpointSetting' :: Maybe Text
units = Maybe Text
a} :: EndpointSetting)
endpointSetting_defaultValue :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Text)
endpointSetting_defaultValue :: (Maybe Text -> f (Maybe Text))
-> EndpointSetting -> f EndpointSetting
endpointSetting_defaultValue = (EndpointSetting -> Maybe Text)
-> (EndpointSetting -> Maybe Text -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:EndpointSetting' :: EndpointSetting -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Text
a -> EndpointSetting
s {$sel:defaultValue:EndpointSetting' :: Maybe Text
defaultValue = Maybe Text
a} :: EndpointSetting)
endpointSetting_type :: Lens.Lens' EndpointSetting (Prelude.Maybe EndpointSettingTypeValue)
endpointSetting_type :: (Maybe EndpointSettingTypeValue
-> f (Maybe EndpointSettingTypeValue))
-> EndpointSetting -> f EndpointSetting
endpointSetting_type = (EndpointSetting -> Maybe EndpointSettingTypeValue)
-> (EndpointSetting
-> Maybe EndpointSettingTypeValue -> EndpointSetting)
-> Lens
EndpointSetting
EndpointSetting
(Maybe EndpointSettingTypeValue)
(Maybe EndpointSettingTypeValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe EndpointSettingTypeValue
type' :: Maybe EndpointSettingTypeValue
$sel:type':EndpointSetting' :: EndpointSetting -> Maybe EndpointSettingTypeValue
type'} -> Maybe EndpointSettingTypeValue
type') (\s :: EndpointSetting
s@EndpointSetting' {} Maybe EndpointSettingTypeValue
a -> EndpointSetting
s {$sel:type':EndpointSetting' :: Maybe EndpointSettingTypeValue
type' = Maybe EndpointSettingTypeValue
a} :: EndpointSetting)
endpointSetting_enumValues :: Lens.Lens' EndpointSetting (Prelude.Maybe [Prelude.Text])
endpointSetting_enumValues :: (Maybe [Text] -> f (Maybe [Text]))
-> EndpointSetting -> f EndpointSetting
endpointSetting_enumValues = (EndpointSetting -> Maybe [Text])
-> (EndpointSetting -> Maybe [Text] -> EndpointSetting)
-> Lens
EndpointSetting EndpointSetting (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe [Text]
enumValues :: Maybe [Text]
$sel:enumValues:EndpointSetting' :: EndpointSetting -> Maybe [Text]
enumValues} -> Maybe [Text]
enumValues) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe [Text]
a -> EndpointSetting
s {$sel:enumValues:EndpointSetting' :: Maybe [Text]
enumValues = Maybe [Text]
a} :: EndpointSetting) ((Maybe [Text] -> f (Maybe [Text]))
-> EndpointSetting -> f EndpointSetting)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> EndpointSetting
-> f EndpointSetting
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
instance Core.FromJSON EndpointSetting where
parseJSON :: Value -> Parser EndpointSetting
parseJSON =
String
-> (Object -> Parser EndpointSetting)
-> Value
-> Parser EndpointSetting
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EndpointSetting"
( \Object
x ->
Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting
EndpointSetting'
(Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
-> Parser (Maybe Bool)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
forall (f :: * -> *) a b. Functor 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
"Sensitive")
Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
forall (f :: * -> *) a b. Applicative f => 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
"IntValueMax")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
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
"Applicability")
Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
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 Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
forall (f :: * -> *) a b. Applicative f => 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
"IntValueMin")
Parser
(Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
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
"Units")
Parser
(Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting)
-> Parser (Maybe Text)
-> Parser
(Maybe EndpointSettingTypeValue -> Maybe [Text] -> EndpointSetting)
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 EndpointSettingTypeValue -> Maybe [Text] -> EndpointSetting)
-> Parser (Maybe EndpointSettingTypeValue)
-> Parser (Maybe [Text] -> EndpointSetting)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EndpointSettingTypeValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
Parser (Maybe [Text] -> EndpointSetting)
-> Parser (Maybe [Text]) -> Parser EndpointSetting
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
"EnumValues" 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)
)
instance Prelude.Hashable EndpointSetting
instance Prelude.NFData EndpointSetting