module Stratosphere.Synthetics.Group (
        Group(..), mkGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Group
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-group.html>
    Group {Group -> ()
haddock_workaround_ :: (),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-group.html#cfn-synthetics-group-name>
           Group -> Value Text
name :: (Value Prelude.Text),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-group.html#cfn-synthetics-group-resourcearns>
           Group -> Maybe (ValueList Text)
resourceArns :: (Prelude.Maybe (ValueList Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-group.html#cfn-synthetics-group-tags>
           Group -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (Group -> Group -> Bool
(Group -> Group -> Bool) -> (Group -> Group -> Bool) -> Eq Group
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Group -> Group -> Bool
== :: Group -> Group -> Bool
$c/= :: Group -> Group -> Bool
/= :: Group -> Group -> Bool
Prelude.Eq, Int -> Group -> ShowS
[Group] -> ShowS
Group -> String
(Int -> Group -> ShowS)
-> (Group -> String) -> ([Group] -> ShowS) -> Show Group
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Group -> ShowS
showsPrec :: Int -> Group -> ShowS
$cshow :: Group -> String
show :: Group -> String
$cshowList :: [Group] -> ShowS
showList :: [Group] -> ShowS
Prelude.Show)
mkGroup :: Value Prelude.Text -> Group
mkGroup :: Value Text -> Group
mkGroup Value Text
name
  = Group
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       resourceArns :: Maybe (ValueList Text)
resourceArns = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Group where
  toResourceProperties :: Group -> ResourceProperties
toResourceProperties Group {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Group -> ()
name :: Group -> Value Text
resourceArns :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
resourceArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Synthetics::Group", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"Name" 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
name]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ValueList 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
"ResourceArns" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
resourceArns,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Group where
  toJSON :: Group -> Value
toJSON Group {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Group -> ()
name :: Group -> Value Text
resourceArns :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
resourceArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = [(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
"Name" 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
name]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ValueList 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
"ResourceArns" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
resourceArns,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Name" Group where
  type PropertyType "Name" Group = Value Prelude.Text
  set :: PropertyType "Name" Group -> Group -> Group
set PropertyType "Name" Group
newValue Group {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Group -> ()
name :: Group -> Value Text
resourceArns :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
resourceArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..} = Group {name :: Value Text
name = PropertyType "Name" Group
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
()
haddock_workaround_ :: ()
resourceArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
resourceArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "ResourceArns" Group where
  type PropertyType "ResourceArns" Group = ValueList Prelude.Text
  set :: PropertyType "ResourceArns" Group -> Group -> Group
set PropertyType "ResourceArns" Group
newValue Group {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Group -> ()
name :: Group -> Value Text
resourceArns :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
resourceArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = Group {resourceArns :: Maybe (ValueList Text)
resourceArns = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ResourceArns" Group
ValueList Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" Group where
  type PropertyType "Tags" Group = [Tag]
  set :: PropertyType "Tags" Group -> Group -> Group
set PropertyType "Tags" Group
newValue Group {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Group -> ()
name :: Group -> Value Text
resourceArns :: Group -> Maybe (ValueList Text)
tags :: Group -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Value Text
resourceArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..} = Group {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Group
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
resourceArns :: Maybe (ValueList Text)
haddock_workaround_ :: ()
name :: Value Text
resourceArns :: Maybe (ValueList Text)
..}