module Stratosphere.MediaLive.Channel.OutputLocationRefProperty (
        OutputLocationRefProperty(..), mkOutputLocationRefProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data OutputLocationRefProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-outputlocationref.html>
    OutputLocationRefProperty {OutputLocationRefProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-outputlocationref.html#cfn-medialive-channel-outputlocationref-destinationrefid>
                               OutputLocationRefProperty -> Maybe (Value Text)
destinationRefId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (OutputLocationRefProperty -> OutputLocationRefProperty -> Bool
(OutputLocationRefProperty -> OutputLocationRefProperty -> Bool)
-> (OutputLocationRefProperty -> OutputLocationRefProperty -> Bool)
-> Eq OutputLocationRefProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OutputLocationRefProperty -> OutputLocationRefProperty -> Bool
== :: OutputLocationRefProperty -> OutputLocationRefProperty -> Bool
$c/= :: OutputLocationRefProperty -> OutputLocationRefProperty -> Bool
/= :: OutputLocationRefProperty -> OutputLocationRefProperty -> Bool
Prelude.Eq, Int -> OutputLocationRefProperty -> ShowS
[OutputLocationRefProperty] -> ShowS
OutputLocationRefProperty -> String
(Int -> OutputLocationRefProperty -> ShowS)
-> (OutputLocationRefProperty -> String)
-> ([OutputLocationRefProperty] -> ShowS)
-> Show OutputLocationRefProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OutputLocationRefProperty -> ShowS
showsPrec :: Int -> OutputLocationRefProperty -> ShowS
$cshow :: OutputLocationRefProperty -> String
show :: OutputLocationRefProperty -> String
$cshowList :: [OutputLocationRefProperty] -> ShowS
showList :: [OutputLocationRefProperty] -> ShowS
Prelude.Show)
mkOutputLocationRefProperty :: OutputLocationRefProperty
mkOutputLocationRefProperty :: OutputLocationRefProperty
mkOutputLocationRefProperty
  = OutputLocationRefProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), destinationRefId :: Maybe (Value Text)
destinationRefId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OutputLocationRefProperty where
  toResourceProperties :: OutputLocationRefProperty -> ResourceProperties
toResourceProperties OutputLocationRefProperty {Maybe (Value Text)
()
haddock_workaround_ :: OutputLocationRefProperty -> ()
destinationRefId :: OutputLocationRefProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationRefId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaLive::Channel.OutputLocationRef",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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 -> 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
"DestinationRefId" (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)
destinationRefId])}
instance JSON.ToJSON OutputLocationRefProperty where
  toJSON :: OutputLocationRefProperty -> Value
toJSON OutputLocationRefProperty {Maybe (Value Text)
()
haddock_workaround_ :: OutputLocationRefProperty -> ()
destinationRefId :: OutputLocationRefProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationRefId :: Maybe (Value Text)
..}
    = [(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 -> 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
"DestinationRefId" (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)
destinationRefId]))
instance Property "DestinationRefId" OutputLocationRefProperty where
  type PropertyType "DestinationRefId" OutputLocationRefProperty = Value Prelude.Text
  set :: PropertyType "DestinationRefId" OutputLocationRefProperty
-> OutputLocationRefProperty -> OutputLocationRefProperty
set PropertyType "DestinationRefId" OutputLocationRefProperty
newValue OutputLocationRefProperty {Maybe (Value Text)
()
haddock_workaround_ :: OutputLocationRefProperty -> ()
destinationRefId :: OutputLocationRefProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationRefId :: Maybe (Value Text)
..}
    = OutputLocationRefProperty
        {destinationRefId :: Maybe (Value Text)
destinationRefId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DestinationRefId" OutputLocationRefProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}