{-# 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.ParameterInlinePolicy where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ParameterInlinePolicy = ParameterInlinePolicy'
{
ParameterInlinePolicy -> Maybe Text
policyType :: Prelude.Maybe Prelude.Text,
ParameterInlinePolicy -> Maybe Text
policyStatus :: Prelude.Maybe Prelude.Text,
ParameterInlinePolicy -> Maybe Text
policyText :: Prelude.Maybe Prelude.Text
}
deriving (ParameterInlinePolicy -> ParameterInlinePolicy -> Bool
(ParameterInlinePolicy -> ParameterInlinePolicy -> Bool)
-> (ParameterInlinePolicy -> ParameterInlinePolicy -> Bool)
-> Eq ParameterInlinePolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ParameterInlinePolicy -> ParameterInlinePolicy -> Bool
$c/= :: ParameterInlinePolicy -> ParameterInlinePolicy -> Bool
== :: ParameterInlinePolicy -> ParameterInlinePolicy -> Bool
$c== :: ParameterInlinePolicy -> ParameterInlinePolicy -> Bool
Prelude.Eq, ReadPrec [ParameterInlinePolicy]
ReadPrec ParameterInlinePolicy
Int -> ReadS ParameterInlinePolicy
ReadS [ParameterInlinePolicy]
(Int -> ReadS ParameterInlinePolicy)
-> ReadS [ParameterInlinePolicy]
-> ReadPrec ParameterInlinePolicy
-> ReadPrec [ParameterInlinePolicy]
-> Read ParameterInlinePolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ParameterInlinePolicy]
$creadListPrec :: ReadPrec [ParameterInlinePolicy]
readPrec :: ReadPrec ParameterInlinePolicy
$creadPrec :: ReadPrec ParameterInlinePolicy
readList :: ReadS [ParameterInlinePolicy]
$creadList :: ReadS [ParameterInlinePolicy]
readsPrec :: Int -> ReadS ParameterInlinePolicy
$creadsPrec :: Int -> ReadS ParameterInlinePolicy
Prelude.Read, Int -> ParameterInlinePolicy -> ShowS
[ParameterInlinePolicy] -> ShowS
ParameterInlinePolicy -> String
(Int -> ParameterInlinePolicy -> ShowS)
-> (ParameterInlinePolicy -> String)
-> ([ParameterInlinePolicy] -> ShowS)
-> Show ParameterInlinePolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ParameterInlinePolicy] -> ShowS
$cshowList :: [ParameterInlinePolicy] -> ShowS
show :: ParameterInlinePolicy -> String
$cshow :: ParameterInlinePolicy -> String
showsPrec :: Int -> ParameterInlinePolicy -> ShowS
$cshowsPrec :: Int -> ParameterInlinePolicy -> ShowS
Prelude.Show, (forall x. ParameterInlinePolicy -> Rep ParameterInlinePolicy x)
-> (forall x. Rep ParameterInlinePolicy x -> ParameterInlinePolicy)
-> Generic ParameterInlinePolicy
forall x. Rep ParameterInlinePolicy x -> ParameterInlinePolicy
forall x. ParameterInlinePolicy -> Rep ParameterInlinePolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ParameterInlinePolicy x -> ParameterInlinePolicy
$cfrom :: forall x. ParameterInlinePolicy -> Rep ParameterInlinePolicy x
Prelude.Generic)
newParameterInlinePolicy ::
ParameterInlinePolicy
newParameterInlinePolicy :: ParameterInlinePolicy
newParameterInlinePolicy =
ParameterInlinePolicy' :: Maybe Text -> Maybe Text -> Maybe Text -> ParameterInlinePolicy
ParameterInlinePolicy'
{ $sel:policyType:ParameterInlinePolicy' :: Maybe Text
policyType =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policyStatus:ParameterInlinePolicy' :: Maybe Text
policyStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policyText:ParameterInlinePolicy' :: Maybe Text
policyText = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
parameterInlinePolicy_policyType :: Lens.Lens' ParameterInlinePolicy (Prelude.Maybe Prelude.Text)
parameterInlinePolicy_policyType :: (Maybe Text -> f (Maybe Text))
-> ParameterInlinePolicy -> f ParameterInlinePolicy
parameterInlinePolicy_policyType = (ParameterInlinePolicy -> Maybe Text)
-> (ParameterInlinePolicy -> Maybe Text -> ParameterInlinePolicy)
-> Lens
ParameterInlinePolicy
ParameterInlinePolicy
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterInlinePolicy' {Maybe Text
policyType :: Maybe Text
$sel:policyType:ParameterInlinePolicy' :: ParameterInlinePolicy -> Maybe Text
policyType} -> Maybe Text
policyType) (\s :: ParameterInlinePolicy
s@ParameterInlinePolicy' {} Maybe Text
a -> ParameterInlinePolicy
s {$sel:policyType:ParameterInlinePolicy' :: Maybe Text
policyType = Maybe Text
a} :: ParameterInlinePolicy)
parameterInlinePolicy_policyStatus :: Lens.Lens' ParameterInlinePolicy (Prelude.Maybe Prelude.Text)
parameterInlinePolicy_policyStatus :: (Maybe Text -> f (Maybe Text))
-> ParameterInlinePolicy -> f ParameterInlinePolicy
parameterInlinePolicy_policyStatus = (ParameterInlinePolicy -> Maybe Text)
-> (ParameterInlinePolicy -> Maybe Text -> ParameterInlinePolicy)
-> Lens
ParameterInlinePolicy
ParameterInlinePolicy
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterInlinePolicy' {Maybe Text
policyStatus :: Maybe Text
$sel:policyStatus:ParameterInlinePolicy' :: ParameterInlinePolicy -> Maybe Text
policyStatus} -> Maybe Text
policyStatus) (\s :: ParameterInlinePolicy
s@ParameterInlinePolicy' {} Maybe Text
a -> ParameterInlinePolicy
s {$sel:policyStatus:ParameterInlinePolicy' :: Maybe Text
policyStatus = Maybe Text
a} :: ParameterInlinePolicy)
parameterInlinePolicy_policyText :: Lens.Lens' ParameterInlinePolicy (Prelude.Maybe Prelude.Text)
parameterInlinePolicy_policyText :: (Maybe Text -> f (Maybe Text))
-> ParameterInlinePolicy -> f ParameterInlinePolicy
parameterInlinePolicy_policyText = (ParameterInlinePolicy -> Maybe Text)
-> (ParameterInlinePolicy -> Maybe Text -> ParameterInlinePolicy)
-> Lens
ParameterInlinePolicy
ParameterInlinePolicy
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterInlinePolicy' {Maybe Text
policyText :: Maybe Text
$sel:policyText:ParameterInlinePolicy' :: ParameterInlinePolicy -> Maybe Text
policyText} -> Maybe Text
policyText) (\s :: ParameterInlinePolicy
s@ParameterInlinePolicy' {} Maybe Text
a -> ParameterInlinePolicy
s {$sel:policyText:ParameterInlinePolicy' :: Maybe Text
policyText = Maybe Text
a} :: ParameterInlinePolicy)
instance Core.FromJSON ParameterInlinePolicy where
parseJSON :: Value -> Parser ParameterInlinePolicy
parseJSON =
String
-> (Object -> Parser ParameterInlinePolicy)
-> Value
-> Parser ParameterInlinePolicy
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ParameterInlinePolicy"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> ParameterInlinePolicy
ParameterInlinePolicy'
(Maybe Text -> Maybe Text -> Maybe Text -> ParameterInlinePolicy)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ParameterInlinePolicy)
forall (f :: * -> *) a b. Functor 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
"PolicyType")
Parser (Maybe Text -> Maybe Text -> ParameterInlinePolicy)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ParameterInlinePolicy)
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
"PolicyStatus")
Parser (Maybe Text -> ParameterInlinePolicy)
-> Parser (Maybe Text) -> Parser ParameterInlinePolicy
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
"PolicyText")
)
instance Prelude.Hashable ParameterInlinePolicy
instance Prelude.NFData ParameterInlinePolicy