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