{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IVS.Types.Channel
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IVS.Types.Channel where

import qualified Amazonka.Core as Core
import Amazonka.IVS.Types.ChannelLatencyMode
import Amazonka.IVS.Types.ChannelType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Object specifying a channel.
--
-- /See:/ 'newChannel' smart constructor.
data Channel = Channel'
  { -- | Channel playback URL.
    Channel -> Maybe Text
playbackUrl :: Prelude.Maybe Prelude.Text,
    -- | Whether the channel is private (enabled for playback authorization).
    -- Default: @false@.
    Channel -> Maybe Bool
authorized :: Prelude.Maybe Prelude.Bool,
    -- | Channel ARN.
    Channel -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Channel latency mode. Use @NORMAL@ to broadcast and deliver live video
    -- up to Full HD. Use @LOW@ for near-real-time interaction with viewers.
    -- Default: @LOW@. (Note: In the Amazon IVS console, @LOW@ and @NORMAL@
    -- correspond to Ultra-low and Standard, respectively.)
    Channel -> Maybe ChannelLatencyMode
latencyMode :: Prelude.Maybe ChannelLatencyMode,
    -- | Channel name.
    Channel -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Recording-configuration ARN. A value other than an empty string
    -- indicates that recording is enabled. Default: \"\" (empty string,
    -- recording is disabled).
    Channel -> Maybe Text
recordingConfigurationArn :: Prelude.Maybe Prelude.Text,
    -- | Channel type, which determines the allowable resolution and bitrate. /If
    -- you exceed the allowable resolution or bitrate, the stream probably will
    -- disconnect immediately./ Default: @STANDARD@. Valid values:
    --
    -- -   @STANDARD@: Multiple qualities are generated from the original
    --     input, to automatically give viewers the best experience for their
    --     devices and network conditions. Resolution can be up to 1080p and
    --     bitrate can be up to 8.5 Mbps. Audio is transcoded only for
    --     renditions 360p and below; above that, audio is passed through.
    --
    -- -   @BASIC@: Amazon IVS delivers the original input to viewers. The
    --     viewer’s video-quality choice is limited to the original input.
    --     Resolution can be up to 480p and bitrate can be up to 1.5 Mbps.
    Channel -> Maybe ChannelType
type' :: Prelude.Maybe ChannelType,
    -- | Array of 1-50 maps, each of the form @string:string (key:value)@.
    Channel -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Channel ingest endpoint, part of the definition of an ingest server,
    -- used when you set up streaming software.
    Channel -> Maybe Text
ingestEndpoint :: Prelude.Maybe Prelude.Text
  }
  deriving (Channel -> Channel -> Bool
(Channel -> Channel -> Bool)
-> (Channel -> Channel -> Bool) -> Eq Channel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Channel -> Channel -> Bool
$c/= :: Channel -> Channel -> Bool
== :: Channel -> Channel -> Bool
$c== :: Channel -> Channel -> Bool
Prelude.Eq, ReadPrec [Channel]
ReadPrec Channel
Int -> ReadS Channel
ReadS [Channel]
(Int -> ReadS Channel)
-> ReadS [Channel]
-> ReadPrec Channel
-> ReadPrec [Channel]
-> Read Channel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Channel]
$creadListPrec :: ReadPrec [Channel]
readPrec :: ReadPrec Channel
$creadPrec :: ReadPrec Channel
readList :: ReadS [Channel]
$creadList :: ReadS [Channel]
readsPrec :: Int -> ReadS Channel
$creadsPrec :: Int -> ReadS Channel
Prelude.Read, Int -> Channel -> ShowS
[Channel] -> ShowS
Channel -> String
(Int -> Channel -> ShowS)
-> (Channel -> String) -> ([Channel] -> ShowS) -> Show Channel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Channel] -> ShowS
$cshowList :: [Channel] -> ShowS
show :: Channel -> String
$cshow :: Channel -> String
showsPrec :: Int -> Channel -> ShowS
$cshowsPrec :: Int -> Channel -> ShowS
Prelude.Show, (forall x. Channel -> Rep Channel x)
-> (forall x. Rep Channel x -> Channel) -> Generic Channel
forall x. Rep Channel x -> Channel
forall x. Channel -> Rep Channel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Channel x -> Channel
$cfrom :: forall x. Channel -> Rep Channel x
Prelude.Generic)

-- |
-- Create a value of 'Channel' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'playbackUrl', 'channel_playbackUrl' - Channel playback URL.
--
-- 'authorized', 'channel_authorized' - Whether the channel is private (enabled for playback authorization).
-- Default: @false@.
--
-- 'arn', 'channel_arn' - Channel ARN.
--
-- 'latencyMode', 'channel_latencyMode' - Channel latency mode. Use @NORMAL@ to broadcast and deliver live video
-- up to Full HD. Use @LOW@ for near-real-time interaction with viewers.
-- Default: @LOW@. (Note: In the Amazon IVS console, @LOW@ and @NORMAL@
-- correspond to Ultra-low and Standard, respectively.)
--
-- 'name', 'channel_name' - Channel name.
--
-- 'recordingConfigurationArn', 'channel_recordingConfigurationArn' - Recording-configuration ARN. A value other than an empty string
-- indicates that recording is enabled. Default: \"\" (empty string,
-- recording is disabled).
--
-- 'type'', 'channel_type' - Channel type, which determines the allowable resolution and bitrate. /If
-- you exceed the allowable resolution or bitrate, the stream probably will
-- disconnect immediately./ Default: @STANDARD@. Valid values:
--
-- -   @STANDARD@: Multiple qualities are generated from the original
--     input, to automatically give viewers the best experience for their
--     devices and network conditions. Resolution can be up to 1080p and
--     bitrate can be up to 8.5 Mbps. Audio is transcoded only for
--     renditions 360p and below; above that, audio is passed through.
--
-- -   @BASIC@: Amazon IVS delivers the original input to viewers. The
--     viewer’s video-quality choice is limited to the original input.
--     Resolution can be up to 480p and bitrate can be up to 1.5 Mbps.
--
-- 'tags', 'channel_tags' - Array of 1-50 maps, each of the form @string:string (key:value)@.
--
-- 'ingestEndpoint', 'channel_ingestEndpoint' - Channel ingest endpoint, part of the definition of an ingest server,
-- used when you set up streaming software.
newChannel ::
  Channel
newChannel :: Channel
newChannel =
  Channel' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel
Channel'
    { $sel:playbackUrl:Channel' :: Maybe Text
playbackUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authorized:Channel' :: Maybe Bool
authorized = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Channel' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:latencyMode:Channel' :: Maybe ChannelLatencyMode
latencyMode = Maybe ChannelLatencyMode
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Channel' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:recordingConfigurationArn:Channel' :: Maybe Text
recordingConfigurationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':Channel' :: Maybe ChannelType
type' = Maybe ChannelType
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Channel' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:ingestEndpoint:Channel' :: Maybe Text
ingestEndpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Channel playback URL.
channel_playbackUrl :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_playbackUrl :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_playbackUrl = (Channel -> Maybe Text)
-> (Channel -> Maybe Text -> Channel)
-> Lens Channel Channel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
playbackUrl :: Maybe Text
$sel:playbackUrl:Channel' :: Channel -> Maybe Text
playbackUrl} -> Maybe Text
playbackUrl) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:playbackUrl:Channel' :: Maybe Text
playbackUrl = Maybe Text
a} :: Channel)

-- | Whether the channel is private (enabled for playback authorization).
-- Default: @false@.
channel_authorized :: Lens.Lens' Channel (Prelude.Maybe Prelude.Bool)
channel_authorized :: (Maybe Bool -> f (Maybe Bool)) -> Channel -> f Channel
channel_authorized = (Channel -> Maybe Bool)
-> (Channel -> Maybe Bool -> Channel)
-> Lens Channel Channel (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Bool
authorized :: Maybe Bool
$sel:authorized:Channel' :: Channel -> Maybe Bool
authorized} -> Maybe Bool
authorized) (\s :: Channel
s@Channel' {} Maybe Bool
a -> Channel
s {$sel:authorized:Channel' :: Maybe Bool
authorized = Maybe Bool
a} :: Channel)

-- | Channel ARN.
channel_arn :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_arn :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_arn = (Channel -> Maybe Text)
-> (Channel -> Maybe Text -> Channel)
-> Lens Channel Channel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
arn :: Maybe Text
$sel:arn:Channel' :: Channel -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:arn:Channel' :: Maybe Text
arn = Maybe Text
a} :: Channel)

-- | Channel latency mode. Use @NORMAL@ to broadcast and deliver live video
-- up to Full HD. Use @LOW@ for near-real-time interaction with viewers.
-- Default: @LOW@. (Note: In the Amazon IVS console, @LOW@ and @NORMAL@
-- correspond to Ultra-low and Standard, respectively.)
channel_latencyMode :: Lens.Lens' Channel (Prelude.Maybe ChannelLatencyMode)
channel_latencyMode :: (Maybe ChannelLatencyMode -> f (Maybe ChannelLatencyMode))
-> Channel -> f Channel
channel_latencyMode = (Channel -> Maybe ChannelLatencyMode)
-> (Channel -> Maybe ChannelLatencyMode -> Channel)
-> Lens
     Channel
     Channel
     (Maybe ChannelLatencyMode)
     (Maybe ChannelLatencyMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe ChannelLatencyMode
latencyMode :: Maybe ChannelLatencyMode
$sel:latencyMode:Channel' :: Channel -> Maybe ChannelLatencyMode
latencyMode} -> Maybe ChannelLatencyMode
latencyMode) (\s :: Channel
s@Channel' {} Maybe ChannelLatencyMode
a -> Channel
s {$sel:latencyMode:Channel' :: Maybe ChannelLatencyMode
latencyMode = Maybe ChannelLatencyMode
a} :: Channel)

-- | Channel name.
channel_name :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_name :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_name = (Channel -> Maybe Text)
-> (Channel -> Maybe Text -> Channel)
-> Lens Channel Channel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
name :: Maybe Text
$sel:name:Channel' :: Channel -> Maybe Text
name} -> Maybe Text
name) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:name:Channel' :: Maybe Text
name = Maybe Text
a} :: Channel)

-- | Recording-configuration ARN. A value other than an empty string
-- indicates that recording is enabled. Default: \"\" (empty string,
-- recording is disabled).
channel_recordingConfigurationArn :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_recordingConfigurationArn :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_recordingConfigurationArn = (Channel -> Maybe Text)
-> (Channel -> Maybe Text -> Channel)
-> Lens Channel Channel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
recordingConfigurationArn :: Maybe Text
$sel:recordingConfigurationArn:Channel' :: Channel -> Maybe Text
recordingConfigurationArn} -> Maybe Text
recordingConfigurationArn) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:recordingConfigurationArn:Channel' :: Maybe Text
recordingConfigurationArn = Maybe Text
a} :: Channel)

-- | Channel type, which determines the allowable resolution and bitrate. /If
-- you exceed the allowable resolution or bitrate, the stream probably will
-- disconnect immediately./ Default: @STANDARD@. Valid values:
--
-- -   @STANDARD@: Multiple qualities are generated from the original
--     input, to automatically give viewers the best experience for their
--     devices and network conditions. Resolution can be up to 1080p and
--     bitrate can be up to 8.5 Mbps. Audio is transcoded only for
--     renditions 360p and below; above that, audio is passed through.
--
-- -   @BASIC@: Amazon IVS delivers the original input to viewers. The
--     viewer’s video-quality choice is limited to the original input.
--     Resolution can be up to 480p and bitrate can be up to 1.5 Mbps.
channel_type :: Lens.Lens' Channel (Prelude.Maybe ChannelType)
channel_type :: (Maybe ChannelType -> f (Maybe ChannelType))
-> Channel -> f Channel
channel_type = (Channel -> Maybe ChannelType)
-> (Channel -> Maybe ChannelType -> Channel)
-> Lens Channel Channel (Maybe ChannelType) (Maybe ChannelType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe ChannelType
type' :: Maybe ChannelType
$sel:type':Channel' :: Channel -> Maybe ChannelType
type'} -> Maybe ChannelType
type') (\s :: Channel
s@Channel' {} Maybe ChannelType
a -> Channel
s {$sel:type':Channel' :: Maybe ChannelType
type' = Maybe ChannelType
a} :: Channel)

-- | Array of 1-50 maps, each of the form @string:string (key:value)@.
channel_tags :: Lens.Lens' Channel (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
channel_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Channel -> f Channel
channel_tags = (Channel -> Maybe (HashMap Text Text))
-> (Channel -> Maybe (HashMap Text Text) -> Channel)
-> Lens
     Channel
     Channel
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Channel' :: Channel -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Channel
s@Channel' {} Maybe (HashMap Text Text)
a -> Channel
s {$sel:tags:Channel' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Channel) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Channel -> f Channel)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Channel
-> f Channel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Channel ingest endpoint, part of the definition of an ingest server,
-- used when you set up streaming software.
channel_ingestEndpoint :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_ingestEndpoint :: (Maybe Text -> f (Maybe Text)) -> Channel -> f Channel
channel_ingestEndpoint = (Channel -> Maybe Text)
-> (Channel -> Maybe Text -> Channel)
-> Lens Channel Channel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
ingestEndpoint :: Maybe Text
$sel:ingestEndpoint:Channel' :: Channel -> Maybe Text
ingestEndpoint} -> Maybe Text
ingestEndpoint) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:ingestEndpoint:Channel' :: Maybe Text
ingestEndpoint = Maybe Text
a} :: Channel)

instance Core.FromJSON Channel where
  parseJSON :: Value -> Parser Channel
parseJSON =
    String -> (Object -> Parser Channel) -> Value -> Parser Channel
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Channel"
      ( \Object
x ->
          Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe ChannelLatencyMode
-> Maybe Text
-> Maybe Text
-> Maybe ChannelType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Channel
Channel'
            (Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe ChannelLatencyMode
 -> Maybe Text
 -> Maybe Text
 -> Maybe ChannelType
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Channel)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe ChannelLatencyMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe ChannelType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Channel)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"playbackUrl")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe ChannelLatencyMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe ChannelType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Channel)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe ChannelLatencyMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe ChannelType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"authorized")
            Parser
  (Maybe Text
   -> Maybe ChannelLatencyMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe ChannelType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Channel)
-> Parser (Maybe Text)
-> Parser
     (Maybe ChannelLatencyMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe ChannelType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe ChannelLatencyMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe ChannelType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Channel)
-> Parser (Maybe ChannelLatencyMode)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ChannelType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelLatencyMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"latencyMode")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ChannelType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Channel)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ChannelType
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe Text
   -> Maybe ChannelType
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Channel)
-> Parser (Maybe Text)
-> Parser
     (Maybe ChannelType
      -> Maybe (HashMap Text Text) -> Maybe Text -> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"recordingConfigurationArn")
            Parser
  (Maybe ChannelType
   -> Maybe (HashMap Text Text) -> Maybe Text -> Channel)
-> Parser (Maybe ChannelType)
-> Parser (Maybe (HashMap Text Text) -> Maybe Text -> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChannelType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
            Parser (Maybe (HashMap Text Text) -> Maybe Text -> Channel)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe Text -> Channel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> Channel)
-> Parser (Maybe Text) -> Parser Channel
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ingestEndpoint")
      )

instance Prelude.Hashable Channel

instance Prelude.NFData Channel