module Stratosphere.Logs.AccountPolicy (
AccountPolicy(..), mkAccountPolicy
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccountPolicy
=
AccountPolicy {AccountPolicy -> ()
haddock_workaround_ :: (),
AccountPolicy -> Value Text
policyDocument :: (Value Prelude.Text),
AccountPolicy -> Value Text
policyName :: (Value Prelude.Text),
AccountPolicy -> Value Text
policyType :: (Value Prelude.Text),
AccountPolicy -> Maybe (Value Text)
scope :: (Prelude.Maybe (Value Prelude.Text)),
AccountPolicy -> Maybe (Value Text)
selectionCriteria :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (AccountPolicy -> AccountPolicy -> Bool
(AccountPolicy -> AccountPolicy -> Bool)
-> (AccountPolicy -> AccountPolicy -> Bool) -> Eq AccountPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountPolicy -> AccountPolicy -> Bool
== :: AccountPolicy -> AccountPolicy -> Bool
$c/= :: AccountPolicy -> AccountPolicy -> Bool
/= :: AccountPolicy -> AccountPolicy -> Bool
Prelude.Eq, Int -> AccountPolicy -> ShowS
[AccountPolicy] -> ShowS
AccountPolicy -> String
(Int -> AccountPolicy -> ShowS)
-> (AccountPolicy -> String)
-> ([AccountPolicy] -> ShowS)
-> Show AccountPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountPolicy -> ShowS
showsPrec :: Int -> AccountPolicy -> ShowS
$cshow :: AccountPolicy -> String
show :: AccountPolicy -> String
$cshowList :: [AccountPolicy] -> ShowS
showList :: [AccountPolicy] -> ShowS
Prelude.Show)
mkAccountPolicy ::
Value Prelude.Text
-> Value Prelude.Text -> Value Prelude.Text -> AccountPolicy
mkAccountPolicy :: Value Text -> Value Text -> Value Text -> AccountPolicy
mkAccountPolicy Value Text
policyDocument Value Text
policyName Value Text
policyType
= AccountPolicy
{haddock_workaround_ :: ()
haddock_workaround_ = (), policyDocument :: Value Text
policyDocument = Value Text
policyDocument,
policyName :: Value Text
policyName = Value Text
policyName, policyType :: Value Text
policyType = Value Text
policyType,
scope :: Maybe (Value Text)
scope = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, selectionCriteria :: Maybe (Value Text)
selectionCriteria = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccountPolicy where
toResourceProperties :: AccountPolicy -> ResourceProperties
toResourceProperties AccountPolicy {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccountPolicy -> ()
policyDocument :: AccountPolicy -> Value Text
policyName :: AccountPolicy -> Value Text
policyType :: AccountPolicy -> Value Text
scope :: AccountPolicy -> Maybe (Value Text)
selectionCriteria :: AccountPolicy -> Maybe (Value Text)
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Logs::AccountPolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"PolicyDocument" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
policyDocument,
Key
"PolicyName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
policyName, Key
"PolicyType" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
policyType]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Scope" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
scope,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SelectionCriteria" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
selectionCriteria]))}
instance JSON.ToJSON AccountPolicy where
toJSON :: AccountPolicy -> Value
toJSON AccountPolicy {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccountPolicy -> ()
policyDocument :: AccountPolicy -> Value Text
policyName :: AccountPolicy -> Value Text
policyType :: AccountPolicy -> Value Text
scope :: AccountPolicy -> Maybe (Value Text)
selectionCriteria :: AccountPolicy -> Maybe (Value Text)
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"PolicyDocument" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
policyDocument,
Key
"PolicyName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
policyName, Key
"PolicyType" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
policyType]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Scope" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
scope,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SelectionCriteria" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
selectionCriteria])))
instance Property "PolicyDocument" AccountPolicy where
type PropertyType "PolicyDocument" AccountPolicy = Value Prelude.Text
set :: PropertyType "PolicyDocument" AccountPolicy
-> AccountPolicy -> AccountPolicy
set PropertyType "PolicyDocument" AccountPolicy
newValue AccountPolicy {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccountPolicy -> ()
policyDocument :: AccountPolicy -> Value Text
policyName :: AccountPolicy -> Value Text
policyType :: AccountPolicy -> Value Text
scope :: AccountPolicy -> Maybe (Value Text)
selectionCriteria :: AccountPolicy -> Maybe (Value Text)
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
..}
= AccountPolicy {policyDocument :: Value Text
policyDocument = PropertyType "PolicyDocument" AccountPolicy
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
policyName :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
haddock_workaround_ :: ()
policyName :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
..}
instance Property "PolicyName" AccountPolicy where
type PropertyType "PolicyName" AccountPolicy = Value Prelude.Text
set :: PropertyType "PolicyName" AccountPolicy
-> AccountPolicy -> AccountPolicy
set PropertyType "PolicyName" AccountPolicy
newValue AccountPolicy {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccountPolicy -> ()
policyDocument :: AccountPolicy -> Value Text
policyName :: AccountPolicy -> Value Text
policyType :: AccountPolicy -> Value Text
scope :: AccountPolicy -> Maybe (Value Text)
selectionCriteria :: AccountPolicy -> Maybe (Value Text)
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
..}
= AccountPolicy {policyName :: Value Text
policyName = PropertyType "PolicyName" AccountPolicy
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
policyDocument :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
haddock_workaround_ :: ()
policyDocument :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
..}
instance Property "PolicyType" AccountPolicy where
type PropertyType "PolicyType" AccountPolicy = Value Prelude.Text
set :: PropertyType "PolicyType" AccountPolicy
-> AccountPolicy -> AccountPolicy
set PropertyType "PolicyType" AccountPolicy
newValue AccountPolicy {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccountPolicy -> ()
policyDocument :: AccountPolicy -> Value Text
policyName :: AccountPolicy -> Value Text
policyType :: AccountPolicy -> Value Text
scope :: AccountPolicy -> Maybe (Value Text)
selectionCriteria :: AccountPolicy -> Maybe (Value Text)
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
..}
= AccountPolicy {policyType :: Value Text
policyType = PropertyType "PolicyType" AccountPolicy
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
..}
instance Property "Scope" AccountPolicy where
type PropertyType "Scope" AccountPolicy = Value Prelude.Text
set :: PropertyType "Scope" AccountPolicy
-> AccountPolicy -> AccountPolicy
set PropertyType "Scope" AccountPolicy
newValue AccountPolicy {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccountPolicy -> ()
policyDocument :: AccountPolicy -> Value Text
policyName :: AccountPolicy -> Value Text
policyType :: AccountPolicy -> Value Text
scope :: AccountPolicy -> Maybe (Value Text)
selectionCriteria :: AccountPolicy -> Maybe (Value Text)
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
..}
= AccountPolicy {scope :: Maybe (Value Text)
scope = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Scope" AccountPolicy
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
policyType :: Value Text
selectionCriteria :: Maybe (Value Text)
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
policyType :: Value Text
selectionCriteria :: Maybe (Value Text)
..}
instance Property "SelectionCriteria" AccountPolicy where
type PropertyType "SelectionCriteria" AccountPolicy = Value Prelude.Text
set :: PropertyType "SelectionCriteria" AccountPolicy
-> AccountPolicy -> AccountPolicy
set PropertyType "SelectionCriteria" AccountPolicy
newValue AccountPolicy {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccountPolicy -> ()
policyDocument :: AccountPolicy -> Value Text
policyName :: AccountPolicy -> Value Text
policyType :: AccountPolicy -> Value Text
scope :: AccountPolicy -> Maybe (Value Text)
selectionCriteria :: AccountPolicy -> Maybe (Value Text)
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
selectionCriteria :: Maybe (Value Text)
..}
= AccountPolicy {selectionCriteria :: Maybe (Value Text)
selectionCriteria = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SelectionCriteria" AccountPolicy
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
haddock_workaround_ :: ()
policyDocument :: Value Text
policyName :: Value Text
policyType :: Value Text
scope :: Maybe (Value Text)
..}