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