{-# 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.MaintenanceWindowLambdaParameters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MaintenanceWindowLambdaParameters = MaintenanceWindowLambdaParameters'
{
MaintenanceWindowLambdaParameters -> Maybe (Sensitive Base64)
payload :: Prelude.Maybe (Core.Sensitive Core.Base64),
MaintenanceWindowLambdaParameters -> Maybe Text
qualifier :: Prelude.Maybe Prelude.Text,
MaintenanceWindowLambdaParameters -> Maybe Text
clientContext :: Prelude.Maybe Prelude.Text
}
deriving (MaintenanceWindowLambdaParameters
-> MaintenanceWindowLambdaParameters -> Bool
(MaintenanceWindowLambdaParameters
-> MaintenanceWindowLambdaParameters -> Bool)
-> (MaintenanceWindowLambdaParameters
-> MaintenanceWindowLambdaParameters -> Bool)
-> Eq MaintenanceWindowLambdaParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MaintenanceWindowLambdaParameters
-> MaintenanceWindowLambdaParameters -> Bool
$c/= :: MaintenanceWindowLambdaParameters
-> MaintenanceWindowLambdaParameters -> Bool
== :: MaintenanceWindowLambdaParameters
-> MaintenanceWindowLambdaParameters -> Bool
$c== :: MaintenanceWindowLambdaParameters
-> MaintenanceWindowLambdaParameters -> Bool
Prelude.Eq, Int -> MaintenanceWindowLambdaParameters -> ShowS
[MaintenanceWindowLambdaParameters] -> ShowS
MaintenanceWindowLambdaParameters -> String
(Int -> MaintenanceWindowLambdaParameters -> ShowS)
-> (MaintenanceWindowLambdaParameters -> String)
-> ([MaintenanceWindowLambdaParameters] -> ShowS)
-> Show MaintenanceWindowLambdaParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MaintenanceWindowLambdaParameters] -> ShowS
$cshowList :: [MaintenanceWindowLambdaParameters] -> ShowS
show :: MaintenanceWindowLambdaParameters -> String
$cshow :: MaintenanceWindowLambdaParameters -> String
showsPrec :: Int -> MaintenanceWindowLambdaParameters -> ShowS
$cshowsPrec :: Int -> MaintenanceWindowLambdaParameters -> ShowS
Prelude.Show, (forall x.
MaintenanceWindowLambdaParameters
-> Rep MaintenanceWindowLambdaParameters x)
-> (forall x.
Rep MaintenanceWindowLambdaParameters x
-> MaintenanceWindowLambdaParameters)
-> Generic MaintenanceWindowLambdaParameters
forall x.
Rep MaintenanceWindowLambdaParameters x
-> MaintenanceWindowLambdaParameters
forall x.
MaintenanceWindowLambdaParameters
-> Rep MaintenanceWindowLambdaParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MaintenanceWindowLambdaParameters x
-> MaintenanceWindowLambdaParameters
$cfrom :: forall x.
MaintenanceWindowLambdaParameters
-> Rep MaintenanceWindowLambdaParameters x
Prelude.Generic)
newMaintenanceWindowLambdaParameters ::
MaintenanceWindowLambdaParameters
newMaintenanceWindowLambdaParameters :: MaintenanceWindowLambdaParameters
newMaintenanceWindowLambdaParameters =
MaintenanceWindowLambdaParameters' :: Maybe (Sensitive Base64)
-> Maybe Text -> Maybe Text -> MaintenanceWindowLambdaParameters
MaintenanceWindowLambdaParameters'
{ $sel:payload:MaintenanceWindowLambdaParameters' :: Maybe (Sensitive Base64)
payload =
Maybe (Sensitive Base64)
forall a. Maybe a
Prelude.Nothing,
$sel:qualifier:MaintenanceWindowLambdaParameters' :: Maybe Text
qualifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientContext:MaintenanceWindowLambdaParameters' :: Maybe Text
clientContext = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
maintenanceWindowLambdaParameters_payload :: Lens.Lens' MaintenanceWindowLambdaParameters (Prelude.Maybe Prelude.ByteString)
maintenanceWindowLambdaParameters_payload :: (Maybe ByteString -> f (Maybe ByteString))
-> MaintenanceWindowLambdaParameters
-> f MaintenanceWindowLambdaParameters
maintenanceWindowLambdaParameters_payload = (MaintenanceWindowLambdaParameters -> Maybe (Sensitive Base64))
-> (MaintenanceWindowLambdaParameters
-> Maybe (Sensitive Base64) -> MaintenanceWindowLambdaParameters)
-> Lens
MaintenanceWindowLambdaParameters
MaintenanceWindowLambdaParameters
(Maybe (Sensitive Base64))
(Maybe (Sensitive Base64))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowLambdaParameters' {Maybe (Sensitive Base64)
payload :: Maybe (Sensitive Base64)
$sel:payload:MaintenanceWindowLambdaParameters' :: MaintenanceWindowLambdaParameters -> Maybe (Sensitive Base64)
payload} -> Maybe (Sensitive Base64)
payload) (\s :: MaintenanceWindowLambdaParameters
s@MaintenanceWindowLambdaParameters' {} Maybe (Sensitive Base64)
a -> MaintenanceWindowLambdaParameters
s {$sel:payload:MaintenanceWindowLambdaParameters' :: Maybe (Sensitive Base64)
payload = Maybe (Sensitive Base64)
a} :: MaintenanceWindowLambdaParameters) ((Maybe (Sensitive Base64) -> f (Maybe (Sensitive Base64)))
-> MaintenanceWindowLambdaParameters
-> f MaintenanceWindowLambdaParameters)
-> ((Maybe ByteString -> f (Maybe ByteString))
-> Maybe (Sensitive Base64) -> f (Maybe (Sensitive Base64)))
-> (Maybe ByteString -> f (Maybe ByteString))
-> MaintenanceWindowLambdaParameters
-> f MaintenanceWindowLambdaParameters
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Base64) (Sensitive Base64) ByteString ByteString
-> Iso
(Maybe (Sensitive Base64))
(Maybe (Sensitive Base64))
(Maybe ByteString)
(Maybe ByteString)
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 (Exchange ByteString ByteString Base64 (Identity Base64)
-> Exchange
ByteString
ByteString
(Sensitive Base64)
(Identity (Sensitive Base64))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Exchange ByteString ByteString Base64 (Identity Base64)
-> Exchange
ByteString
ByteString
(Sensitive Base64)
(Identity (Sensitive Base64)))
-> (Exchange ByteString ByteString ByteString (Identity ByteString)
-> Exchange ByteString ByteString Base64 (Identity Base64))
-> AnIso
(Sensitive Base64) (Sensitive Base64) ByteString ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange ByteString ByteString ByteString (Identity ByteString)
-> Exchange ByteString ByteString Base64 (Identity Base64)
Iso' Base64 ByteString
Core._Base64)
maintenanceWindowLambdaParameters_qualifier :: Lens.Lens' MaintenanceWindowLambdaParameters (Prelude.Maybe Prelude.Text)
maintenanceWindowLambdaParameters_qualifier :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowLambdaParameters
-> f MaintenanceWindowLambdaParameters
maintenanceWindowLambdaParameters_qualifier = (MaintenanceWindowLambdaParameters -> Maybe Text)
-> (MaintenanceWindowLambdaParameters
-> Maybe Text -> MaintenanceWindowLambdaParameters)
-> Lens
MaintenanceWindowLambdaParameters
MaintenanceWindowLambdaParameters
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowLambdaParameters' {Maybe Text
qualifier :: Maybe Text
$sel:qualifier:MaintenanceWindowLambdaParameters' :: MaintenanceWindowLambdaParameters -> Maybe Text
qualifier} -> Maybe Text
qualifier) (\s :: MaintenanceWindowLambdaParameters
s@MaintenanceWindowLambdaParameters' {} Maybe Text
a -> MaintenanceWindowLambdaParameters
s {$sel:qualifier:MaintenanceWindowLambdaParameters' :: Maybe Text
qualifier = Maybe Text
a} :: MaintenanceWindowLambdaParameters)
maintenanceWindowLambdaParameters_clientContext :: Lens.Lens' MaintenanceWindowLambdaParameters (Prelude.Maybe Prelude.Text)
maintenanceWindowLambdaParameters_clientContext :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowLambdaParameters
-> f MaintenanceWindowLambdaParameters
maintenanceWindowLambdaParameters_clientContext = (MaintenanceWindowLambdaParameters -> Maybe Text)
-> (MaintenanceWindowLambdaParameters
-> Maybe Text -> MaintenanceWindowLambdaParameters)
-> Lens
MaintenanceWindowLambdaParameters
MaintenanceWindowLambdaParameters
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowLambdaParameters' {Maybe Text
clientContext :: Maybe Text
$sel:clientContext:MaintenanceWindowLambdaParameters' :: MaintenanceWindowLambdaParameters -> Maybe Text
clientContext} -> Maybe Text
clientContext) (\s :: MaintenanceWindowLambdaParameters
s@MaintenanceWindowLambdaParameters' {} Maybe Text
a -> MaintenanceWindowLambdaParameters
s {$sel:clientContext:MaintenanceWindowLambdaParameters' :: Maybe Text
clientContext = Maybe Text
a} :: MaintenanceWindowLambdaParameters)
instance
Core.FromJSON
MaintenanceWindowLambdaParameters
where
parseJSON :: Value -> Parser MaintenanceWindowLambdaParameters
parseJSON =
String
-> (Object -> Parser MaintenanceWindowLambdaParameters)
-> Value
-> Parser MaintenanceWindowLambdaParameters
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MaintenanceWindowLambdaParameters"
( \Object
x ->
Maybe (Sensitive Base64)
-> Maybe Text -> Maybe Text -> MaintenanceWindowLambdaParameters
MaintenanceWindowLambdaParameters'
(Maybe (Sensitive Base64)
-> Maybe Text -> Maybe Text -> MaintenanceWindowLambdaParameters)
-> Parser (Maybe (Sensitive Base64))
-> Parser
(Maybe Text -> Maybe Text -> MaintenanceWindowLambdaParameters)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Sensitive Base64))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Payload")
Parser
(Maybe Text -> Maybe Text -> MaintenanceWindowLambdaParameters)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> MaintenanceWindowLambdaParameters)
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
"Qualifier")
Parser (Maybe Text -> MaintenanceWindowLambdaParameters)
-> Parser (Maybe Text) -> Parser MaintenanceWindowLambdaParameters
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
"ClientContext")
)
instance
Prelude.Hashable
MaintenanceWindowLambdaParameters
instance
Prelude.NFData
MaintenanceWindowLambdaParameters
instance
Core.ToJSON
MaintenanceWindowLambdaParameters
where
toJSON :: MaintenanceWindowLambdaParameters -> Value
toJSON MaintenanceWindowLambdaParameters' {Maybe Text
Maybe (Sensitive Base64)
clientContext :: Maybe Text
qualifier :: Maybe Text
payload :: Maybe (Sensitive Base64)
$sel:clientContext:MaintenanceWindowLambdaParameters' :: MaintenanceWindowLambdaParameters -> Maybe Text
$sel:qualifier:MaintenanceWindowLambdaParameters' :: MaintenanceWindowLambdaParameters -> Maybe Text
$sel:payload:MaintenanceWindowLambdaParameters' :: MaintenanceWindowLambdaParameters -> Maybe (Sensitive Base64)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Payload" Text -> Sensitive Base64 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Base64 -> Pair)
-> Maybe (Sensitive Base64) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Base64)
payload,
(Text
"Qualifier" 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
qualifier,
(Text
"ClientContext" 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
clientContext
]
)