{-# 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.MediaLive.Types.Channel
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaLive.Types.Channel where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.CdiInputSpecification
import Amazonka.MediaLive.Types.ChannelClass
import Amazonka.MediaLive.Types.ChannelEgressEndpoint
import Amazonka.MediaLive.Types.ChannelState
import Amazonka.MediaLive.Types.EncoderSettings
import Amazonka.MediaLive.Types.InputAttachment
import Amazonka.MediaLive.Types.InputSpecification
import Amazonka.MediaLive.Types.LogLevel
import Amazonka.MediaLive.Types.MaintenanceStatus
import Amazonka.MediaLive.Types.OutputDestination
import Amazonka.MediaLive.Types.PipelineDetail
import Amazonka.MediaLive.Types.VpcOutputSettingsDescription
import qualified Amazonka.Prelude as Prelude

-- | Placeholder documentation for Channel
--
-- /See:/ 'newChannel' smart constructor.
data Channel = Channel'
  { -- | The unique arn of the channel.
    Channel -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Specification of CDI inputs for this channel
    Channel -> Maybe CdiInputSpecification
cdiInputSpecification :: Prelude.Maybe CdiInputSpecification,
    -- | The class for this channel. STANDARD for a channel with two pipelines or
    -- SINGLE_PIPELINE for a channel with one pipeline.
    Channel -> Maybe ChannelClass
channelClass :: Prelude.Maybe ChannelClass,
    -- | A list of destinations of the channel. For UDP outputs, there is one
    -- destination per output. For other types (HLS, for example), there is one
    -- destination per packager.
    Channel -> Maybe [OutputDestination]
destinations :: Prelude.Maybe [OutputDestination],
    -- | The endpoints where outgoing connections initiate from
    Channel -> Maybe [ChannelEgressEndpoint]
egressEndpoints :: Prelude.Maybe [ChannelEgressEndpoint],
    Channel -> Maybe EncoderSettings
encoderSettings :: Prelude.Maybe EncoderSettings,
    -- | The unique id of the channel.
    Channel -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | List of input attachments for channel.
    Channel -> Maybe [InputAttachment]
inputAttachments :: Prelude.Maybe [InputAttachment],
    -- | Specification of network and file inputs for this channel
    Channel -> Maybe InputSpecification
inputSpecification :: Prelude.Maybe InputSpecification,
    -- | The log level being written to CloudWatch Logs.
    Channel -> Maybe LogLevel
logLevel :: Prelude.Maybe LogLevel,
    -- | Maintenance settings for this channel.
    Channel -> Maybe MaintenanceStatus
maintenance :: Prelude.Maybe MaintenanceStatus,
    -- | The name of the channel. (user-mutable)
    Channel -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Runtime details for the pipelines of a running channel.
    Channel -> Maybe [PipelineDetail]
pipelineDetails :: Prelude.Maybe [PipelineDetail],
    -- | The number of currently healthy pipelines.
    Channel -> Maybe Int
pipelinesRunningCount :: Prelude.Maybe Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the role assumed when running the
    -- Channel.
    Channel -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    Channel -> Maybe ChannelState
state :: Prelude.Maybe ChannelState,
    -- | A collection of key-value pairs.
    Channel -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Settings for VPC output
    Channel -> Maybe VpcOutputSettingsDescription
vpc :: Prelude.Maybe VpcOutputSettingsDescription
  }
  deriving (Channel -> Channel -> Bool
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]
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
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. 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:
--
-- 'arn', 'channel_arn' - The unique arn of the channel.
--
-- 'cdiInputSpecification', 'channel_cdiInputSpecification' - Specification of CDI inputs for this channel
--
-- 'channelClass', 'channel_channelClass' - The class for this channel. STANDARD for a channel with two pipelines or
-- SINGLE_PIPELINE for a channel with one pipeline.
--
-- 'destinations', 'channel_destinations' - A list of destinations of the channel. For UDP outputs, there is one
-- destination per output. For other types (HLS, for example), there is one
-- destination per packager.
--
-- 'egressEndpoints', 'channel_egressEndpoints' - The endpoints where outgoing connections initiate from
--
-- 'encoderSettings', 'channel_encoderSettings' - Undocumented member.
--
-- 'id', 'channel_id' - The unique id of the channel.
--
-- 'inputAttachments', 'channel_inputAttachments' - List of input attachments for channel.
--
-- 'inputSpecification', 'channel_inputSpecification' - Specification of network and file inputs for this channel
--
-- 'logLevel', 'channel_logLevel' - The log level being written to CloudWatch Logs.
--
-- 'maintenance', 'channel_maintenance' - Maintenance settings for this channel.
--
-- 'name', 'channel_name' - The name of the channel. (user-mutable)
--
-- 'pipelineDetails', 'channel_pipelineDetails' - Runtime details for the pipelines of a running channel.
--
-- 'pipelinesRunningCount', 'channel_pipelinesRunningCount' - The number of currently healthy pipelines.
--
-- 'roleArn', 'channel_roleArn' - The Amazon Resource Name (ARN) of the role assumed when running the
-- Channel.
--
-- 'state', 'channel_state' - Undocumented member.
--
-- 'tags', 'channel_tags' - A collection of key-value pairs.
--
-- 'vpc', 'channel_vpc' - Settings for VPC output
newChannel ::
  Channel
newChannel :: Channel
newChannel =
  Channel'
    { $sel:arn:Channel' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:cdiInputSpecification:Channel' :: Maybe CdiInputSpecification
cdiInputSpecification = forall a. Maybe a
Prelude.Nothing,
      $sel:channelClass:Channel' :: Maybe ChannelClass
channelClass = forall a. Maybe a
Prelude.Nothing,
      $sel:destinations:Channel' :: Maybe [OutputDestination]
destinations = forall a. Maybe a
Prelude.Nothing,
      $sel:egressEndpoints:Channel' :: Maybe [ChannelEgressEndpoint]
egressEndpoints = forall a. Maybe a
Prelude.Nothing,
      $sel:encoderSettings:Channel' :: Maybe EncoderSettings
encoderSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:id:Channel' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:inputAttachments:Channel' :: Maybe [InputAttachment]
inputAttachments = forall a. Maybe a
Prelude.Nothing,
      $sel:inputSpecification:Channel' :: Maybe InputSpecification
inputSpecification = forall a. Maybe a
Prelude.Nothing,
      $sel:logLevel:Channel' :: Maybe LogLevel
logLevel = forall a. Maybe a
Prelude.Nothing,
      $sel:maintenance:Channel' :: Maybe MaintenanceStatus
maintenance = forall a. Maybe a
Prelude.Nothing,
      $sel:name:Channel' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineDetails:Channel' :: Maybe [PipelineDetail]
pipelineDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:pipelinesRunningCount:Channel' :: Maybe Int
pipelinesRunningCount = forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:Channel' :: Maybe Text
roleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:state:Channel' :: Maybe ChannelState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Channel' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:vpc:Channel' :: Maybe VpcOutputSettingsDescription
vpc = forall a. Maybe a
Prelude.Nothing
    }

-- | The unique arn of the channel.
channel_arn :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_arn :: Lens' Channel (Maybe Text)
channel_arn = 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)

-- | Specification of CDI inputs for this channel
channel_cdiInputSpecification :: Lens.Lens' Channel (Prelude.Maybe CdiInputSpecification)
channel_cdiInputSpecification :: Lens' Channel (Maybe CdiInputSpecification)
channel_cdiInputSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe CdiInputSpecification
cdiInputSpecification :: Maybe CdiInputSpecification
$sel:cdiInputSpecification:Channel' :: Channel -> Maybe CdiInputSpecification
cdiInputSpecification} -> Maybe CdiInputSpecification
cdiInputSpecification) (\s :: Channel
s@Channel' {} Maybe CdiInputSpecification
a -> Channel
s {$sel:cdiInputSpecification:Channel' :: Maybe CdiInputSpecification
cdiInputSpecification = Maybe CdiInputSpecification
a} :: Channel)

-- | The class for this channel. STANDARD for a channel with two pipelines or
-- SINGLE_PIPELINE for a channel with one pipeline.
channel_channelClass :: Lens.Lens' Channel (Prelude.Maybe ChannelClass)
channel_channelClass :: Lens' Channel (Maybe ChannelClass)
channel_channelClass = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe ChannelClass
channelClass :: Maybe ChannelClass
$sel:channelClass:Channel' :: Channel -> Maybe ChannelClass
channelClass} -> Maybe ChannelClass
channelClass) (\s :: Channel
s@Channel' {} Maybe ChannelClass
a -> Channel
s {$sel:channelClass:Channel' :: Maybe ChannelClass
channelClass = Maybe ChannelClass
a} :: Channel)

-- | A list of destinations of the channel. For UDP outputs, there is one
-- destination per output. For other types (HLS, for example), there is one
-- destination per packager.
channel_destinations :: Lens.Lens' Channel (Prelude.Maybe [OutputDestination])
channel_destinations :: Lens' Channel (Maybe [OutputDestination])
channel_destinations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe [OutputDestination]
destinations :: Maybe [OutputDestination]
$sel:destinations:Channel' :: Channel -> Maybe [OutputDestination]
destinations} -> Maybe [OutputDestination]
destinations) (\s :: Channel
s@Channel' {} Maybe [OutputDestination]
a -> Channel
s {$sel:destinations:Channel' :: Maybe [OutputDestination]
destinations = Maybe [OutputDestination]
a} :: Channel) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The endpoints where outgoing connections initiate from
channel_egressEndpoints :: Lens.Lens' Channel (Prelude.Maybe [ChannelEgressEndpoint])
channel_egressEndpoints :: Lens' Channel (Maybe [ChannelEgressEndpoint])
channel_egressEndpoints = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe [ChannelEgressEndpoint]
egressEndpoints :: Maybe [ChannelEgressEndpoint]
$sel:egressEndpoints:Channel' :: Channel -> Maybe [ChannelEgressEndpoint]
egressEndpoints} -> Maybe [ChannelEgressEndpoint]
egressEndpoints) (\s :: Channel
s@Channel' {} Maybe [ChannelEgressEndpoint]
a -> Channel
s {$sel:egressEndpoints:Channel' :: Maybe [ChannelEgressEndpoint]
egressEndpoints = Maybe [ChannelEgressEndpoint]
a} :: Channel) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
channel_encoderSettings :: Lens.Lens' Channel (Prelude.Maybe EncoderSettings)
channel_encoderSettings :: Lens' Channel (Maybe EncoderSettings)
channel_encoderSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe EncoderSettings
encoderSettings :: Maybe EncoderSettings
$sel:encoderSettings:Channel' :: Channel -> Maybe EncoderSettings
encoderSettings} -> Maybe EncoderSettings
encoderSettings) (\s :: Channel
s@Channel' {} Maybe EncoderSettings
a -> Channel
s {$sel:encoderSettings:Channel' :: Maybe EncoderSettings
encoderSettings = Maybe EncoderSettings
a} :: Channel)

-- | The unique id of the channel.
channel_id :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_id :: Lens' Channel (Maybe Text)
channel_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
id :: Maybe Text
$sel:id:Channel' :: Channel -> Maybe Text
id} -> Maybe Text
id) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:id:Channel' :: Maybe Text
id = Maybe Text
a} :: Channel)

-- | List of input attachments for channel.
channel_inputAttachments :: Lens.Lens' Channel (Prelude.Maybe [InputAttachment])
channel_inputAttachments :: Lens' Channel (Maybe [InputAttachment])
channel_inputAttachments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe [InputAttachment]
inputAttachments :: Maybe [InputAttachment]
$sel:inputAttachments:Channel' :: Channel -> Maybe [InputAttachment]
inputAttachments} -> Maybe [InputAttachment]
inputAttachments) (\s :: Channel
s@Channel' {} Maybe [InputAttachment]
a -> Channel
s {$sel:inputAttachments:Channel' :: Maybe [InputAttachment]
inputAttachments = Maybe [InputAttachment]
a} :: Channel) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specification of network and file inputs for this channel
channel_inputSpecification :: Lens.Lens' Channel (Prelude.Maybe InputSpecification)
channel_inputSpecification :: Lens' Channel (Maybe InputSpecification)
channel_inputSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe InputSpecification
inputSpecification :: Maybe InputSpecification
$sel:inputSpecification:Channel' :: Channel -> Maybe InputSpecification
inputSpecification} -> Maybe InputSpecification
inputSpecification) (\s :: Channel
s@Channel' {} Maybe InputSpecification
a -> Channel
s {$sel:inputSpecification:Channel' :: Maybe InputSpecification
inputSpecification = Maybe InputSpecification
a} :: Channel)

-- | The log level being written to CloudWatch Logs.
channel_logLevel :: Lens.Lens' Channel (Prelude.Maybe LogLevel)
channel_logLevel :: Lens' Channel (Maybe LogLevel)
channel_logLevel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe LogLevel
logLevel :: Maybe LogLevel
$sel:logLevel:Channel' :: Channel -> Maybe LogLevel
logLevel} -> Maybe LogLevel
logLevel) (\s :: Channel
s@Channel' {} Maybe LogLevel
a -> Channel
s {$sel:logLevel:Channel' :: Maybe LogLevel
logLevel = Maybe LogLevel
a} :: Channel)

-- | Maintenance settings for this channel.
channel_maintenance :: Lens.Lens' Channel (Prelude.Maybe MaintenanceStatus)
channel_maintenance :: Lens' Channel (Maybe MaintenanceStatus)
channel_maintenance = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe MaintenanceStatus
maintenance :: Maybe MaintenanceStatus
$sel:maintenance:Channel' :: Channel -> Maybe MaintenanceStatus
maintenance} -> Maybe MaintenanceStatus
maintenance) (\s :: Channel
s@Channel' {} Maybe MaintenanceStatus
a -> Channel
s {$sel:maintenance:Channel' :: Maybe MaintenanceStatus
maintenance = Maybe MaintenanceStatus
a} :: Channel)

-- | The name of the channel. (user-mutable)
channel_name :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_name :: Lens' Channel (Maybe Text)
channel_name = 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)

-- | Runtime details for the pipelines of a running channel.
channel_pipelineDetails :: Lens.Lens' Channel (Prelude.Maybe [PipelineDetail])
channel_pipelineDetails :: Lens' Channel (Maybe [PipelineDetail])
channel_pipelineDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe [PipelineDetail]
pipelineDetails :: Maybe [PipelineDetail]
$sel:pipelineDetails:Channel' :: Channel -> Maybe [PipelineDetail]
pipelineDetails} -> Maybe [PipelineDetail]
pipelineDetails) (\s :: Channel
s@Channel' {} Maybe [PipelineDetail]
a -> Channel
s {$sel:pipelineDetails:Channel' :: Maybe [PipelineDetail]
pipelineDetails = Maybe [PipelineDetail]
a} :: Channel) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of currently healthy pipelines.
channel_pipelinesRunningCount :: Lens.Lens' Channel (Prelude.Maybe Prelude.Int)
channel_pipelinesRunningCount :: Lens' Channel (Maybe Int)
channel_pipelinesRunningCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Int
pipelinesRunningCount :: Maybe Int
$sel:pipelinesRunningCount:Channel' :: Channel -> Maybe Int
pipelinesRunningCount} -> Maybe Int
pipelinesRunningCount) (\s :: Channel
s@Channel' {} Maybe Int
a -> Channel
s {$sel:pipelinesRunningCount:Channel' :: Maybe Int
pipelinesRunningCount = Maybe Int
a} :: Channel)

-- | The Amazon Resource Name (ARN) of the role assumed when running the
-- Channel.
channel_roleArn :: Lens.Lens' Channel (Prelude.Maybe Prelude.Text)
channel_roleArn :: Lens' Channel (Maybe Text)
channel_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:Channel' :: Channel -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: Channel
s@Channel' {} Maybe Text
a -> Channel
s {$sel:roleArn:Channel' :: Maybe Text
roleArn = Maybe Text
a} :: Channel)

-- | Undocumented member.
channel_state :: Lens.Lens' Channel (Prelude.Maybe ChannelState)
channel_state :: Lens' Channel (Maybe ChannelState)
channel_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe ChannelState
state :: Maybe ChannelState
$sel:state:Channel' :: Channel -> Maybe ChannelState
state} -> Maybe ChannelState
state) (\s :: Channel
s@Channel' {} Maybe ChannelState
a -> Channel
s {$sel:state:Channel' :: Maybe ChannelState
state = Maybe ChannelState
a} :: Channel)

-- | A collection of key-value pairs.
channel_tags :: Lens.Lens' Channel (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
channel_tags :: Lens' Channel (Maybe (HashMap Text Text))
channel_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Settings for VPC output
channel_vpc :: Lens.Lens' Channel (Prelude.Maybe VpcOutputSettingsDescription)
channel_vpc :: Lens' Channel (Maybe VpcOutputSettingsDescription)
channel_vpc = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Channel' {Maybe VpcOutputSettingsDescription
vpc :: Maybe VpcOutputSettingsDescription
$sel:vpc:Channel' :: Channel -> Maybe VpcOutputSettingsDescription
vpc} -> Maybe VpcOutputSettingsDescription
vpc) (\s :: Channel
s@Channel' {} Maybe VpcOutputSettingsDescription
a -> Channel
s {$sel:vpc:Channel' :: Maybe VpcOutputSettingsDescription
vpc = Maybe VpcOutputSettingsDescription
a} :: Channel)

instance Data.FromJSON Channel where
  parseJSON :: Value -> Parser Channel
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Channel"
      ( \Object
x ->
          Maybe Text
-> Maybe CdiInputSpecification
-> Maybe ChannelClass
-> Maybe [OutputDestination]
-> Maybe [ChannelEgressEndpoint]
-> Maybe EncoderSettings
-> Maybe Text
-> Maybe [InputAttachment]
-> Maybe InputSpecification
-> Maybe LogLevel
-> Maybe MaintenanceStatus
-> Maybe Text
-> Maybe [PipelineDetail]
-> Maybe Int
-> Maybe Text
-> Maybe ChannelState
-> Maybe (HashMap Text Text)
-> Maybe VpcOutputSettingsDescription
-> Channel
Channel'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"cdiInputSpecification")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"channelClass")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"destinations" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"egressEndpoints"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"encoderSettings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"inputAttachments"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"inputSpecification")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"logLevel")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"maintenance")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"pipelineDetails"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"pipelinesRunningCount")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"roleArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"state")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"vpc")
      )

instance Prelude.Hashable Channel where
  hashWithSalt :: Int -> Channel -> Int
hashWithSalt Int
_salt Channel' {Maybe Int
Maybe [ChannelEgressEndpoint]
Maybe [OutputDestination]
Maybe [PipelineDetail]
Maybe [InputAttachment]
Maybe Text
Maybe (HashMap Text Text)
Maybe CdiInputSpecification
Maybe ChannelClass
Maybe ChannelState
Maybe InputSpecification
Maybe LogLevel
Maybe MaintenanceStatus
Maybe VpcOutputSettingsDescription
Maybe EncoderSettings
vpc :: Maybe VpcOutputSettingsDescription
tags :: Maybe (HashMap Text Text)
state :: Maybe ChannelState
roleArn :: Maybe Text
pipelinesRunningCount :: Maybe Int
pipelineDetails :: Maybe [PipelineDetail]
name :: Maybe Text
maintenance :: Maybe MaintenanceStatus
logLevel :: Maybe LogLevel
inputSpecification :: Maybe InputSpecification
inputAttachments :: Maybe [InputAttachment]
id :: Maybe Text
encoderSettings :: Maybe EncoderSettings
egressEndpoints :: Maybe [ChannelEgressEndpoint]
destinations :: Maybe [OutputDestination]
channelClass :: Maybe ChannelClass
cdiInputSpecification :: Maybe CdiInputSpecification
arn :: Maybe Text
$sel:vpc:Channel' :: Channel -> Maybe VpcOutputSettingsDescription
$sel:tags:Channel' :: Channel -> Maybe (HashMap Text Text)
$sel:state:Channel' :: Channel -> Maybe ChannelState
$sel:roleArn:Channel' :: Channel -> Maybe Text
$sel:pipelinesRunningCount:Channel' :: Channel -> Maybe Int
$sel:pipelineDetails:Channel' :: Channel -> Maybe [PipelineDetail]
$sel:name:Channel' :: Channel -> Maybe Text
$sel:maintenance:Channel' :: Channel -> Maybe MaintenanceStatus
$sel:logLevel:Channel' :: Channel -> Maybe LogLevel
$sel:inputSpecification:Channel' :: Channel -> Maybe InputSpecification
$sel:inputAttachments:Channel' :: Channel -> Maybe [InputAttachment]
$sel:id:Channel' :: Channel -> Maybe Text
$sel:encoderSettings:Channel' :: Channel -> Maybe EncoderSettings
$sel:egressEndpoints:Channel' :: Channel -> Maybe [ChannelEgressEndpoint]
$sel:destinations:Channel' :: Channel -> Maybe [OutputDestination]
$sel:channelClass:Channel' :: Channel -> Maybe ChannelClass
$sel:cdiInputSpecification:Channel' :: Channel -> Maybe CdiInputSpecification
$sel:arn:Channel' :: Channel -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CdiInputSpecification
cdiInputSpecification
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ChannelClass
channelClass
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [OutputDestination]
destinations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ChannelEgressEndpoint]
egressEndpoints
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EncoderSettings
encoderSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [InputAttachment]
inputAttachments
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputSpecification
inputSpecification
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LogLevel
logLevel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MaintenanceStatus
maintenance
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [PipelineDetail]
pipelineDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
pipelinesRunningCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ChannelState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcOutputSettingsDescription
vpc

instance Prelude.NFData Channel where
  rnf :: Channel -> ()
rnf Channel' {Maybe Int
Maybe [ChannelEgressEndpoint]
Maybe [OutputDestination]
Maybe [PipelineDetail]
Maybe [InputAttachment]
Maybe Text
Maybe (HashMap Text Text)
Maybe CdiInputSpecification
Maybe ChannelClass
Maybe ChannelState
Maybe InputSpecification
Maybe LogLevel
Maybe MaintenanceStatus
Maybe VpcOutputSettingsDescription
Maybe EncoderSettings
vpc :: Maybe VpcOutputSettingsDescription
tags :: Maybe (HashMap Text Text)
state :: Maybe ChannelState
roleArn :: Maybe Text
pipelinesRunningCount :: Maybe Int
pipelineDetails :: Maybe [PipelineDetail]
name :: Maybe Text
maintenance :: Maybe MaintenanceStatus
logLevel :: Maybe LogLevel
inputSpecification :: Maybe InputSpecification
inputAttachments :: Maybe [InputAttachment]
id :: Maybe Text
encoderSettings :: Maybe EncoderSettings
egressEndpoints :: Maybe [ChannelEgressEndpoint]
destinations :: Maybe [OutputDestination]
channelClass :: Maybe ChannelClass
cdiInputSpecification :: Maybe CdiInputSpecification
arn :: Maybe Text
$sel:vpc:Channel' :: Channel -> Maybe VpcOutputSettingsDescription
$sel:tags:Channel' :: Channel -> Maybe (HashMap Text Text)
$sel:state:Channel' :: Channel -> Maybe ChannelState
$sel:roleArn:Channel' :: Channel -> Maybe Text
$sel:pipelinesRunningCount:Channel' :: Channel -> Maybe Int
$sel:pipelineDetails:Channel' :: Channel -> Maybe [PipelineDetail]
$sel:name:Channel' :: Channel -> Maybe Text
$sel:maintenance:Channel' :: Channel -> Maybe MaintenanceStatus
$sel:logLevel:Channel' :: Channel -> Maybe LogLevel
$sel:inputSpecification:Channel' :: Channel -> Maybe InputSpecification
$sel:inputAttachments:Channel' :: Channel -> Maybe [InputAttachment]
$sel:id:Channel' :: Channel -> Maybe Text
$sel:encoderSettings:Channel' :: Channel -> Maybe EncoderSettings
$sel:egressEndpoints:Channel' :: Channel -> Maybe [ChannelEgressEndpoint]
$sel:destinations:Channel' :: Channel -> Maybe [OutputDestination]
$sel:channelClass:Channel' :: Channel -> Maybe ChannelClass
$sel:cdiInputSpecification:Channel' :: Channel -> Maybe CdiInputSpecification
$sel:arn:Channel' :: Channel -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CdiInputSpecification
cdiInputSpecification
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ChannelClass
channelClass
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [OutputDestination]
destinations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ChannelEgressEndpoint]
egressEndpoints
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EncoderSettings
encoderSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InputAttachment]
inputAttachments
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputSpecification
inputSpecification
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LogLevel
logLevel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MaintenanceStatus
maintenance
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PipelineDetail]
pipelineDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
pipelinesRunningCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ChannelState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcOutputSettingsDescription
vpc