module Stratosphere.MediaLive.InputSecurityGroup (
        module Exports, InputSecurityGroup(..), mkInputSecurityGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaLive.InputSecurityGroup.InputWhitelistRuleCidrProperty as Exports
import Stratosphere.ResourceProperties
data InputSecurityGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-inputsecuritygroup.html>
    InputSecurityGroup {InputSecurityGroup -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-inputsecuritygroup.html#cfn-medialive-inputsecuritygroup-tags>
                        InputSecurityGroup -> Maybe Object
tags :: (Prelude.Maybe JSON.Object),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-inputsecuritygroup.html#cfn-medialive-inputsecuritygroup-whitelistrules>
                        InputSecurityGroup -> Maybe [InputWhitelistRuleCidrProperty]
whitelistRules :: (Prelude.Maybe [InputWhitelistRuleCidrProperty])}
  deriving stock (InputSecurityGroup -> InputSecurityGroup -> Bool
(InputSecurityGroup -> InputSecurityGroup -> Bool)
-> (InputSecurityGroup -> InputSecurityGroup -> Bool)
-> Eq InputSecurityGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InputSecurityGroup -> InputSecurityGroup -> Bool
== :: InputSecurityGroup -> InputSecurityGroup -> Bool
$c/= :: InputSecurityGroup -> InputSecurityGroup -> Bool
/= :: InputSecurityGroup -> InputSecurityGroup -> Bool
Prelude.Eq, Int -> InputSecurityGroup -> ShowS
[InputSecurityGroup] -> ShowS
InputSecurityGroup -> String
(Int -> InputSecurityGroup -> ShowS)
-> (InputSecurityGroup -> String)
-> ([InputSecurityGroup] -> ShowS)
-> Show InputSecurityGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InputSecurityGroup -> ShowS
showsPrec :: Int -> InputSecurityGroup -> ShowS
$cshow :: InputSecurityGroup -> String
show :: InputSecurityGroup -> String
$cshowList :: [InputSecurityGroup] -> ShowS
showList :: [InputSecurityGroup] -> ShowS
Prelude.Show)
mkInputSecurityGroup :: InputSecurityGroup
mkInputSecurityGroup :: InputSecurityGroup
mkInputSecurityGroup
  = InputSecurityGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), tags :: Maybe Object
tags = Maybe Object
forall a. Maybe a
Prelude.Nothing,
       whitelistRules :: Maybe [InputWhitelistRuleCidrProperty]
whitelistRules = Maybe [InputWhitelistRuleCidrProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InputSecurityGroup where
  toResourceProperties :: InputSecurityGroup -> ResourceProperties
toResourceProperties InputSecurityGroup {Maybe [InputWhitelistRuleCidrProperty]
Maybe Object
()
haddock_workaround_ :: InputSecurityGroup -> ()
tags :: InputSecurityGroup -> Maybe Object
whitelistRules :: InputSecurityGroup -> Maybe [InputWhitelistRuleCidrProperty]
haddock_workaround_ :: ()
tags :: Maybe Object
whitelistRules :: Maybe [InputWhitelistRuleCidrProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaLive::InputSecurityGroup",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> Object -> (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" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
tags,
                            Key -> [InputWhitelistRuleCidrProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"WhitelistRules" ([InputWhitelistRuleCidrProperty] -> (Key, Value))
-> Maybe [InputWhitelistRuleCidrProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InputWhitelistRuleCidrProperty]
whitelistRules])}
instance JSON.ToJSON InputSecurityGroup where
  toJSON :: InputSecurityGroup -> Value
toJSON InputSecurityGroup {Maybe [InputWhitelistRuleCidrProperty]
Maybe Object
()
haddock_workaround_ :: InputSecurityGroup -> ()
tags :: InputSecurityGroup -> Maybe Object
whitelistRules :: InputSecurityGroup -> Maybe [InputWhitelistRuleCidrProperty]
haddock_workaround_ :: ()
tags :: Maybe Object
whitelistRules :: Maybe [InputWhitelistRuleCidrProperty]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> Object -> (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" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
tags,
               Key -> [InputWhitelistRuleCidrProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"WhitelistRules" ([InputWhitelistRuleCidrProperty] -> (Key, Value))
-> Maybe [InputWhitelistRuleCidrProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InputWhitelistRuleCidrProperty]
whitelistRules]))
instance Property "Tags" InputSecurityGroup where
  type PropertyType "Tags" InputSecurityGroup = JSON.Object
  set :: PropertyType "Tags" InputSecurityGroup
-> InputSecurityGroup -> InputSecurityGroup
set PropertyType "Tags" InputSecurityGroup
newValue InputSecurityGroup {Maybe [InputWhitelistRuleCidrProperty]
Maybe Object
()
haddock_workaround_ :: InputSecurityGroup -> ()
tags :: InputSecurityGroup -> Maybe Object
whitelistRules :: InputSecurityGroup -> Maybe [InputWhitelistRuleCidrProperty]
haddock_workaround_ :: ()
tags :: Maybe Object
whitelistRules :: Maybe [InputWhitelistRuleCidrProperty]
..}
    = InputSecurityGroup {tags :: Maybe Object
tags = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "Tags" InputSecurityGroup
newValue, Maybe [InputWhitelistRuleCidrProperty]
()
haddock_workaround_ :: ()
whitelistRules :: Maybe [InputWhitelistRuleCidrProperty]
haddock_workaround_ :: ()
whitelistRules :: Maybe [InputWhitelistRuleCidrProperty]
..}
instance Property "WhitelistRules" InputSecurityGroup where
  type PropertyType "WhitelistRules" InputSecurityGroup = [InputWhitelistRuleCidrProperty]
  set :: PropertyType "WhitelistRules" InputSecurityGroup
-> InputSecurityGroup -> InputSecurityGroup
set PropertyType "WhitelistRules" InputSecurityGroup
newValue InputSecurityGroup {Maybe [InputWhitelistRuleCidrProperty]
Maybe Object
()
haddock_workaround_ :: InputSecurityGroup -> ()
tags :: InputSecurityGroup -> Maybe Object
whitelistRules :: InputSecurityGroup -> Maybe [InputWhitelistRuleCidrProperty]
haddock_workaround_ :: ()
tags :: Maybe Object
whitelistRules :: Maybe [InputWhitelistRuleCidrProperty]
..}
    = InputSecurityGroup {whitelistRules :: Maybe [InputWhitelistRuleCidrProperty]
whitelistRules = [InputWhitelistRuleCidrProperty]
-> Maybe [InputWhitelistRuleCidrProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [InputWhitelistRuleCidrProperty]
PropertyType "WhitelistRules" InputSecurityGroup
newValue, Maybe Object
()
haddock_workaround_ :: ()
tags :: Maybe Object
haddock_workaround_ :: ()
tags :: Maybe Object
..}