{-# 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.SSM.Types.Parameter where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.ParameterType
data Parameter = Parameter'
{
Parameter -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
Parameter -> Maybe Text
selector :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe (Sensitive Text)
value :: Prelude.Maybe (Core.Sensitive Prelude.Text),
Parameter -> Maybe Text
sourceResult :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Parameter -> Maybe Integer
version :: Prelude.Maybe Prelude.Integer,
Parameter -> Maybe ParameterType
type' :: Prelude.Maybe ParameterType,
Parameter -> Maybe Text
dataType :: Prelude.Maybe Prelude.Text
}
deriving (Parameter -> Parameter -> Bool
(Parameter -> Parameter -> Bool)
-> (Parameter -> Parameter -> Bool) -> Eq Parameter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Parameter -> Parameter -> Bool
$c/= :: Parameter -> Parameter -> Bool
== :: Parameter -> Parameter -> Bool
$c== :: Parameter -> Parameter -> Bool
Prelude.Eq, Int -> Parameter -> ShowS
[Parameter] -> ShowS
Parameter -> String
(Int -> Parameter -> ShowS)
-> (Parameter -> String)
-> ([Parameter] -> ShowS)
-> Show Parameter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Parameter] -> ShowS
$cshowList :: [Parameter] -> ShowS
show :: Parameter -> String
$cshow :: Parameter -> String
showsPrec :: Int -> Parameter -> ShowS
$cshowsPrec :: Int -> Parameter -> ShowS
Prelude.Show, (forall x. Parameter -> Rep Parameter x)
-> (forall x. Rep Parameter x -> Parameter) -> Generic Parameter
forall x. Rep Parameter x -> Parameter
forall x. Parameter -> Rep Parameter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Parameter x -> Parameter
$cfrom :: forall x. Parameter -> Rep Parameter x
Prelude.Generic)
newParameter ::
Parameter
newParameter :: Parameter
newParameter =
Parameter' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ParameterType
-> Maybe Text
-> Parameter
Parameter'
{ $sel:lastModifiedDate:Parameter' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:selector:Parameter' :: Maybe Text
selector = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Parameter' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:value:Parameter' :: Maybe (Sensitive Text)
value = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:sourceResult:Parameter' :: Maybe Text
sourceResult = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:Parameter' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:Parameter' :: Maybe Integer
version = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:type':Parameter' :: Maybe ParameterType
type' = Maybe ParameterType
forall a. Maybe a
Prelude.Nothing,
$sel:dataType:Parameter' :: Maybe Text
dataType = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
parameter_lastModifiedDate :: Lens.Lens' Parameter (Prelude.Maybe Prelude.UTCTime)
parameter_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Parameter -> f Parameter
parameter_lastModifiedDate = (Parameter -> Maybe POSIX)
-> (Parameter -> Maybe POSIX -> Parameter)
-> Lens Parameter Parameter (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:Parameter' :: Parameter -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: Parameter
s@Parameter' {} Maybe POSIX
a -> Parameter
s {$sel:lastModifiedDate:Parameter' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: Parameter) ((Maybe POSIX -> f (Maybe POSIX)) -> Parameter -> f Parameter)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Parameter
-> f Parameter
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
parameter_selector :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_selector :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_selector = (Parameter -> Maybe Text)
-> (Parameter -> Maybe Text -> Parameter)
-> Lens Parameter Parameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Text
selector :: Maybe Text
$sel:selector:Parameter' :: Parameter -> Maybe Text
selector} -> Maybe Text
selector) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:selector:Parameter' :: Maybe Text
selector = Maybe Text
a} :: Parameter)
parameter_arn :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_arn :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_arn = (Parameter -> Maybe Text)
-> (Parameter -> Maybe Text -> Parameter)
-> Lens Parameter Parameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Text
arn :: Maybe Text
$sel:arn:Parameter' :: Parameter -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:arn:Parameter' :: Maybe Text
arn = Maybe Text
a} :: Parameter)
parameter_value :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_value :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_value = (Parameter -> Maybe (Sensitive Text))
-> (Parameter -> Maybe (Sensitive Text) -> Parameter)
-> Lens
Parameter
Parameter
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe (Sensitive Text)
value :: Maybe (Sensitive Text)
$sel:value:Parameter' :: Parameter -> Maybe (Sensitive Text)
value} -> Maybe (Sensitive Text)
value) (\s :: Parameter
s@Parameter' {} Maybe (Sensitive Text)
a -> Parameter
s {$sel:value:Parameter' :: Maybe (Sensitive Text)
value = Maybe (Sensitive Text)
a} :: Parameter) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> Parameter -> f Parameter)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Parameter
-> f Parameter
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
parameter_sourceResult :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_sourceResult :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_sourceResult = (Parameter -> Maybe Text)
-> (Parameter -> Maybe Text -> Parameter)
-> Lens Parameter Parameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Text
sourceResult :: Maybe Text
$sel:sourceResult:Parameter' :: Parameter -> Maybe Text
sourceResult} -> Maybe Text
sourceResult) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:sourceResult:Parameter' :: Maybe Text
sourceResult = Maybe Text
a} :: Parameter)
parameter_name :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_name :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_name = (Parameter -> Maybe Text)
-> (Parameter -> Maybe Text -> Parameter)
-> Lens Parameter Parameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Text
name :: Maybe Text
$sel:name:Parameter' :: Parameter -> Maybe Text
name} -> Maybe Text
name) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:name:Parameter' :: Maybe Text
name = Maybe Text
a} :: Parameter)
parameter_version :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Integer)
parameter_version :: (Maybe Integer -> f (Maybe Integer)) -> Parameter -> f Parameter
parameter_version = (Parameter -> Maybe Integer)
-> (Parameter -> Maybe Integer -> Parameter)
-> Lens Parameter Parameter (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Integer
version :: Maybe Integer
$sel:version:Parameter' :: Parameter -> Maybe Integer
version} -> Maybe Integer
version) (\s :: Parameter
s@Parameter' {} Maybe Integer
a -> Parameter
s {$sel:version:Parameter' :: Maybe Integer
version = Maybe Integer
a} :: Parameter)
parameter_type :: Lens.Lens' Parameter (Prelude.Maybe ParameterType)
parameter_type :: (Maybe ParameterType -> f (Maybe ParameterType))
-> Parameter -> f Parameter
parameter_type = (Parameter -> Maybe ParameterType)
-> (Parameter -> Maybe ParameterType -> Parameter)
-> Lens
Parameter Parameter (Maybe ParameterType) (Maybe ParameterType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe ParameterType
type' :: Maybe ParameterType
$sel:type':Parameter' :: Parameter -> Maybe ParameterType
type'} -> Maybe ParameterType
type') (\s :: Parameter
s@Parameter' {} Maybe ParameterType
a -> Parameter
s {$sel:type':Parameter' :: Maybe ParameterType
type' = Maybe ParameterType
a} :: Parameter)
parameter_dataType :: Lens.Lens' Parameter (Prelude.Maybe Prelude.Text)
parameter_dataType :: (Maybe Text -> f (Maybe Text)) -> Parameter -> f Parameter
parameter_dataType = (Parameter -> Maybe Text)
-> (Parameter -> Maybe Text -> Parameter)
-> Lens Parameter Parameter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameter' {Maybe Text
dataType :: Maybe Text
$sel:dataType:Parameter' :: Parameter -> Maybe Text
dataType} -> Maybe Text
dataType) (\s :: Parameter
s@Parameter' {} Maybe Text
a -> Parameter
s {$sel:dataType:Parameter' :: Maybe Text
dataType = Maybe Text
a} :: Parameter)
instance Core.FromJSON Parameter where
parseJSON :: Value -> Parser Parameter
parseJSON =
String -> (Object -> Parser Parameter) -> Value -> Parser Parameter
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Parameter"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ParameterType
-> Maybe Text
-> Parameter
Parameter'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ParameterType
-> Maybe Text
-> Parameter)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ParameterType
-> Maybe Text
-> Parameter)
forall (f :: * -> *) a b. Functor 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
"LastModifiedDate")
Parser
(Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ParameterType
-> Maybe Text
-> Parameter)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ParameterType
-> Maybe Text
-> Parameter)
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
"Selector")
Parser
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ParameterType
-> Maybe Text
-> Parameter)
-> Parser (Maybe Text)
-> Parser
(Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ParameterType
-> Maybe Text
-> Parameter)
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
"ARN")
Parser
(Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ParameterType
-> Maybe Text
-> Parameter)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ParameterType
-> Maybe Text
-> Parameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Value")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ParameterType
-> Maybe Text
-> Parameter)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Integer -> Maybe ParameterType -> Maybe Text -> Parameter)
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
"SourceResult")
Parser
(Maybe Text
-> Maybe Integer -> Maybe ParameterType -> Maybe Text -> Parameter)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer -> Maybe ParameterType -> Maybe Text -> Parameter)
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 Integer -> Maybe ParameterType -> Maybe Text -> Parameter)
-> Parser (Maybe Integer)
-> Parser (Maybe ParameterType -> Maybe Text -> Parameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
Parser (Maybe ParameterType -> Maybe Text -> Parameter)
-> Parser (Maybe ParameterType) -> Parser (Maybe Text -> Parameter)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ParameterType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
Parser (Maybe Text -> Parameter)
-> Parser (Maybe Text) -> Parser Parameter
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
"DataType")
)
instance Prelude.Hashable Parameter
instance Prelude.NFData Parameter