{-# 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.MaintenanceWindowStepFunctionsParameters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MaintenanceWindowStepFunctionsParameters = MaintenanceWindowStepFunctionsParameters'
{
MaintenanceWindowStepFunctionsParameters -> Maybe (Sensitive Text)
input :: Prelude.Maybe (Core.Sensitive Prelude.Text),
MaintenanceWindowStepFunctionsParameters -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (MaintenanceWindowStepFunctionsParameters
-> MaintenanceWindowStepFunctionsParameters -> Bool
(MaintenanceWindowStepFunctionsParameters
-> MaintenanceWindowStepFunctionsParameters -> Bool)
-> (MaintenanceWindowStepFunctionsParameters
-> MaintenanceWindowStepFunctionsParameters -> Bool)
-> Eq MaintenanceWindowStepFunctionsParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MaintenanceWindowStepFunctionsParameters
-> MaintenanceWindowStepFunctionsParameters -> Bool
$c/= :: MaintenanceWindowStepFunctionsParameters
-> MaintenanceWindowStepFunctionsParameters -> Bool
== :: MaintenanceWindowStepFunctionsParameters
-> MaintenanceWindowStepFunctionsParameters -> Bool
$c== :: MaintenanceWindowStepFunctionsParameters
-> MaintenanceWindowStepFunctionsParameters -> Bool
Prelude.Eq, Int -> MaintenanceWindowStepFunctionsParameters -> ShowS
[MaintenanceWindowStepFunctionsParameters] -> ShowS
MaintenanceWindowStepFunctionsParameters -> String
(Int -> MaintenanceWindowStepFunctionsParameters -> ShowS)
-> (MaintenanceWindowStepFunctionsParameters -> String)
-> ([MaintenanceWindowStepFunctionsParameters] -> ShowS)
-> Show MaintenanceWindowStepFunctionsParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MaintenanceWindowStepFunctionsParameters] -> ShowS
$cshowList :: [MaintenanceWindowStepFunctionsParameters] -> ShowS
show :: MaintenanceWindowStepFunctionsParameters -> String
$cshow :: MaintenanceWindowStepFunctionsParameters -> String
showsPrec :: Int -> MaintenanceWindowStepFunctionsParameters -> ShowS
$cshowsPrec :: Int -> MaintenanceWindowStepFunctionsParameters -> ShowS
Prelude.Show, (forall x.
MaintenanceWindowStepFunctionsParameters
-> Rep MaintenanceWindowStepFunctionsParameters x)
-> (forall x.
Rep MaintenanceWindowStepFunctionsParameters x
-> MaintenanceWindowStepFunctionsParameters)
-> Generic MaintenanceWindowStepFunctionsParameters
forall x.
Rep MaintenanceWindowStepFunctionsParameters x
-> MaintenanceWindowStepFunctionsParameters
forall x.
MaintenanceWindowStepFunctionsParameters
-> Rep MaintenanceWindowStepFunctionsParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MaintenanceWindowStepFunctionsParameters x
-> MaintenanceWindowStepFunctionsParameters
$cfrom :: forall x.
MaintenanceWindowStepFunctionsParameters
-> Rep MaintenanceWindowStepFunctionsParameters x
Prelude.Generic)
newMaintenanceWindowStepFunctionsParameters ::
MaintenanceWindowStepFunctionsParameters
newMaintenanceWindowStepFunctionsParameters :: MaintenanceWindowStepFunctionsParameters
newMaintenanceWindowStepFunctionsParameters =
MaintenanceWindowStepFunctionsParameters' :: Maybe (Sensitive Text)
-> Maybe Text -> MaintenanceWindowStepFunctionsParameters
MaintenanceWindowStepFunctionsParameters'
{ $sel:input:MaintenanceWindowStepFunctionsParameters' :: Maybe (Sensitive Text)
input =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:name:MaintenanceWindowStepFunctionsParameters' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
maintenanceWindowStepFunctionsParameters_input :: Lens.Lens' MaintenanceWindowStepFunctionsParameters (Prelude.Maybe Prelude.Text)
maintenanceWindowStepFunctionsParameters_input :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowStepFunctionsParameters
-> f MaintenanceWindowStepFunctionsParameters
maintenanceWindowStepFunctionsParameters_input = (MaintenanceWindowStepFunctionsParameters
-> Maybe (Sensitive Text))
-> (MaintenanceWindowStepFunctionsParameters
-> Maybe (Sensitive Text)
-> MaintenanceWindowStepFunctionsParameters)
-> Lens
MaintenanceWindowStepFunctionsParameters
MaintenanceWindowStepFunctionsParameters
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowStepFunctionsParameters' {Maybe (Sensitive Text)
input :: Maybe (Sensitive Text)
$sel:input:MaintenanceWindowStepFunctionsParameters' :: MaintenanceWindowStepFunctionsParameters -> Maybe (Sensitive Text)
input} -> Maybe (Sensitive Text)
input) (\s :: MaintenanceWindowStepFunctionsParameters
s@MaintenanceWindowStepFunctionsParameters' {} Maybe (Sensitive Text)
a -> MaintenanceWindowStepFunctionsParameters
s {$sel:input:MaintenanceWindowStepFunctionsParameters' :: Maybe (Sensitive Text)
input = Maybe (Sensitive Text)
a} :: MaintenanceWindowStepFunctionsParameters) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> MaintenanceWindowStepFunctionsParameters
-> f MaintenanceWindowStepFunctionsParameters)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowStepFunctionsParameters
-> f MaintenanceWindowStepFunctionsParameters
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
maintenanceWindowStepFunctionsParameters_name :: Lens.Lens' MaintenanceWindowStepFunctionsParameters (Prelude.Maybe Prelude.Text)
maintenanceWindowStepFunctionsParameters_name :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowStepFunctionsParameters
-> f MaintenanceWindowStepFunctionsParameters
maintenanceWindowStepFunctionsParameters_name = (MaintenanceWindowStepFunctionsParameters -> Maybe Text)
-> (MaintenanceWindowStepFunctionsParameters
-> Maybe Text -> MaintenanceWindowStepFunctionsParameters)
-> Lens
MaintenanceWindowStepFunctionsParameters
MaintenanceWindowStepFunctionsParameters
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowStepFunctionsParameters' {Maybe Text
name :: Maybe Text
$sel:name:MaintenanceWindowStepFunctionsParameters' :: MaintenanceWindowStepFunctionsParameters -> Maybe Text
name} -> Maybe Text
name) (\s :: MaintenanceWindowStepFunctionsParameters
s@MaintenanceWindowStepFunctionsParameters' {} Maybe Text
a -> MaintenanceWindowStepFunctionsParameters
s {$sel:name:MaintenanceWindowStepFunctionsParameters' :: Maybe Text
name = Maybe Text
a} :: MaintenanceWindowStepFunctionsParameters)
instance
Core.FromJSON
MaintenanceWindowStepFunctionsParameters
where
parseJSON :: Value -> Parser MaintenanceWindowStepFunctionsParameters
parseJSON =
String
-> (Object -> Parser MaintenanceWindowStepFunctionsParameters)
-> Value
-> Parser MaintenanceWindowStepFunctionsParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MaintenanceWindowStepFunctionsParameters"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe Text -> MaintenanceWindowStepFunctionsParameters
MaintenanceWindowStepFunctionsParameters'
(Maybe (Sensitive Text)
-> Maybe Text -> MaintenanceWindowStepFunctionsParameters)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe Text -> MaintenanceWindowStepFunctionsParameters)
forall (f :: * -> *) a b. Functor 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
"Input") Parser (Maybe Text -> MaintenanceWindowStepFunctionsParameters)
-> Parser (Maybe Text)
-> Parser MaintenanceWindowStepFunctionsParameters
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")
)
instance
Prelude.Hashable
MaintenanceWindowStepFunctionsParameters
instance
Prelude.NFData
MaintenanceWindowStepFunctionsParameters
instance
Core.ToJSON
MaintenanceWindowStepFunctionsParameters
where
toJSON :: MaintenanceWindowStepFunctionsParameters -> Value
toJSON MaintenanceWindowStepFunctionsParameters' {Maybe Text
Maybe (Sensitive Text)
name :: Maybe Text
input :: Maybe (Sensitive Text)
$sel:name:MaintenanceWindowStepFunctionsParameters' :: MaintenanceWindowStepFunctionsParameters -> Maybe Text
$sel:input:MaintenanceWindowStepFunctionsParameters' :: MaintenanceWindowStepFunctionsParameters -> Maybe (Sensitive Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Input" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
input,
(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
]
)