{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.StartChannel
-- 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)
--
-- Starts an existing channel
module Amazonka.MediaLive.StartChannel
  ( -- * Creating a Request
    StartChannel (..),
    newStartChannel,

    -- * Request Lenses
    startChannel_channelId,

    -- * Destructuring the Response
    StartChannelResponse (..),
    newStartChannelResponse,

    -- * Response Lenses
    startChannelResponse_state,
    startChannelResponse_logLevel,
    startChannelResponse_arn,
    startChannelResponse_pipelinesRunningCount,
    startChannelResponse_pipelineDetails,
    startChannelResponse_inputSpecification,
    startChannelResponse_inputAttachments,
    startChannelResponse_destinations,
    startChannelResponse_name,
    startChannelResponse_cdiInputSpecification,
    startChannelResponse_id,
    startChannelResponse_channelClass,
    startChannelResponse_vpc,
    startChannelResponse_egressEndpoints,
    startChannelResponse_tags,
    startChannelResponse_encoderSettings,
    startChannelResponse_roleArn,
    startChannelResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Placeholder documentation for StartChannelRequest
--
-- /See:/ 'newStartChannel' smart constructor.
data StartChannel = StartChannel'
  { -- | A request to start a channel
    StartChannel -> Text
channelId :: Prelude.Text
  }
  deriving (StartChannel -> StartChannel -> Bool
(StartChannel -> StartChannel -> Bool)
-> (StartChannel -> StartChannel -> Bool) -> Eq StartChannel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartChannel -> StartChannel -> Bool
$c/= :: StartChannel -> StartChannel -> Bool
== :: StartChannel -> StartChannel -> Bool
$c== :: StartChannel -> StartChannel -> Bool
Prelude.Eq, ReadPrec [StartChannel]
ReadPrec StartChannel
Int -> ReadS StartChannel
ReadS [StartChannel]
(Int -> ReadS StartChannel)
-> ReadS [StartChannel]
-> ReadPrec StartChannel
-> ReadPrec [StartChannel]
-> Read StartChannel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartChannel]
$creadListPrec :: ReadPrec [StartChannel]
readPrec :: ReadPrec StartChannel
$creadPrec :: ReadPrec StartChannel
readList :: ReadS [StartChannel]
$creadList :: ReadS [StartChannel]
readsPrec :: Int -> ReadS StartChannel
$creadsPrec :: Int -> ReadS StartChannel
Prelude.Read, Int -> StartChannel -> ShowS
[StartChannel] -> ShowS
StartChannel -> String
(Int -> StartChannel -> ShowS)
-> (StartChannel -> String)
-> ([StartChannel] -> ShowS)
-> Show StartChannel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartChannel] -> ShowS
$cshowList :: [StartChannel] -> ShowS
show :: StartChannel -> String
$cshow :: StartChannel -> String
showsPrec :: Int -> StartChannel -> ShowS
$cshowsPrec :: Int -> StartChannel -> ShowS
Prelude.Show, (forall x. StartChannel -> Rep StartChannel x)
-> (forall x. Rep StartChannel x -> StartChannel)
-> Generic StartChannel
forall x. Rep StartChannel x -> StartChannel
forall x. StartChannel -> Rep StartChannel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartChannel x -> StartChannel
$cfrom :: forall x. StartChannel -> Rep StartChannel x
Prelude.Generic)

-- |
-- Create a value of 'StartChannel' 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:
--
-- 'channelId', 'startChannel_channelId' - A request to start a channel
newStartChannel ::
  -- | 'channelId'
  Prelude.Text ->
  StartChannel
newStartChannel :: Text -> StartChannel
newStartChannel Text
pChannelId_ =
  StartChannel' :: Text -> StartChannel
StartChannel' {$sel:channelId:StartChannel' :: Text
channelId = Text
pChannelId_}

-- | A request to start a channel
startChannel_channelId :: Lens.Lens' StartChannel Prelude.Text
startChannel_channelId :: (Text -> f Text) -> StartChannel -> f StartChannel
startChannel_channelId = (StartChannel -> Text)
-> (StartChannel -> Text -> StartChannel)
-> Lens StartChannel StartChannel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChannel' {Text
channelId :: Text
$sel:channelId:StartChannel' :: StartChannel -> Text
channelId} -> Text
channelId) (\s :: StartChannel
s@StartChannel' {} Text
a -> StartChannel
s {$sel:channelId:StartChannel' :: Text
channelId = Text
a} :: StartChannel)

instance Core.AWSRequest StartChannel where
  type AWSResponse StartChannel = StartChannelResponse
  request :: StartChannel -> Request StartChannel
request = Service -> StartChannel -> Request StartChannel
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartChannel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartChannel)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartChannel))
-> Logger
-> Service
-> Proxy StartChannel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartChannel)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe ChannelState
-> Maybe LogLevel
-> Maybe Text
-> Maybe Int
-> Maybe [PipelineDetail]
-> Maybe InputSpecification
-> Maybe [InputAttachment]
-> Maybe [OutputDestination]
-> Maybe Text
-> Maybe CdiInputSpecification
-> Maybe Text
-> Maybe ChannelClass
-> Maybe VpcOutputSettingsDescription
-> Maybe [ChannelEgressEndpoint]
-> Maybe (HashMap Text Text)
-> Maybe EncoderSettings
-> Maybe Text
-> Int
-> StartChannelResponse
StartChannelResponse'
            (Maybe ChannelState
 -> Maybe LogLevel
 -> Maybe Text
 -> Maybe Int
 -> Maybe [PipelineDetail]
 -> Maybe InputSpecification
 -> Maybe [InputAttachment]
 -> Maybe [OutputDestination]
 -> Maybe Text
 -> Maybe CdiInputSpecification
 -> Maybe Text
 -> Maybe ChannelClass
 -> Maybe VpcOutputSettingsDescription
 -> Maybe [ChannelEgressEndpoint]
 -> Maybe (HashMap Text Text)
 -> Maybe EncoderSettings
 -> Maybe Text
 -> Int
 -> StartChannelResponse)
-> Either String (Maybe ChannelState)
-> Either
     String
     (Maybe LogLevel
      -> Maybe Text
      -> Maybe Int
      -> Maybe [PipelineDetail]
      -> Maybe InputSpecification
      -> Maybe [InputAttachment]
      -> Maybe [OutputDestination]
      -> Maybe Text
      -> Maybe CdiInputSpecification
      -> Maybe Text
      -> Maybe ChannelClass
      -> Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ChannelState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"state")
            Either
  String
  (Maybe LogLevel
   -> Maybe Text
   -> Maybe Int
   -> Maybe [PipelineDetail]
   -> Maybe InputSpecification
   -> Maybe [InputAttachment]
   -> Maybe [OutputDestination]
   -> Maybe Text
   -> Maybe CdiInputSpecification
   -> Maybe Text
   -> Maybe ChannelClass
   -> Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe LogLevel)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe [PipelineDetail]
      -> Maybe InputSpecification
      -> Maybe [InputAttachment]
      -> Maybe [OutputDestination]
      -> Maybe Text
      -> Maybe CdiInputSpecification
      -> Maybe Text
      -> Maybe ChannelClass
      -> Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe LogLevel)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"logLevel")
            Either
  String
  (Maybe Text
   -> Maybe Int
   -> Maybe [PipelineDetail]
   -> Maybe InputSpecification
   -> Maybe [InputAttachment]
   -> Maybe [OutputDestination]
   -> Maybe Text
   -> Maybe CdiInputSpecification
   -> Maybe Text
   -> Maybe ChannelClass
   -> Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe [PipelineDetail]
      -> Maybe InputSpecification
      -> Maybe [InputAttachment]
      -> Maybe [OutputDestination]
      -> Maybe Text
      -> Maybe CdiInputSpecification
      -> Maybe Text
      -> Maybe ChannelClass
      -> Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"arn")
            Either
  String
  (Maybe Int
   -> Maybe [PipelineDetail]
   -> Maybe InputSpecification
   -> Maybe [InputAttachment]
   -> Maybe [OutputDestination]
   -> Maybe Text
   -> Maybe CdiInputSpecification
   -> Maybe Text
   -> Maybe ChannelClass
   -> Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe [PipelineDetail]
      -> Maybe InputSpecification
      -> Maybe [InputAttachment]
      -> Maybe [OutputDestination]
      -> Maybe Text
      -> Maybe CdiInputSpecification
      -> Maybe Text
      -> Maybe ChannelClass
      -> Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"pipelinesRunningCount")
            Either
  String
  (Maybe [PipelineDetail]
   -> Maybe InputSpecification
   -> Maybe [InputAttachment]
   -> Maybe [OutputDestination]
   -> Maybe Text
   -> Maybe CdiInputSpecification
   -> Maybe Text
   -> Maybe ChannelClass
   -> Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe [PipelineDetail])
-> Either
     String
     (Maybe InputSpecification
      -> Maybe [InputAttachment]
      -> Maybe [OutputDestination]
      -> Maybe Text
      -> Maybe CdiInputSpecification
      -> Maybe Text
      -> Maybe ChannelClass
      -> Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [PipelineDetail]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"pipelineDetails"
                            Either String (Maybe (Maybe [PipelineDetail]))
-> Maybe [PipelineDetail] -> Either String (Maybe [PipelineDetail])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [PipelineDetail]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe InputSpecification
   -> Maybe [InputAttachment]
   -> Maybe [OutputDestination]
   -> Maybe Text
   -> Maybe CdiInputSpecification
   -> Maybe Text
   -> Maybe ChannelClass
   -> Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe InputSpecification)
-> Either
     String
     (Maybe [InputAttachment]
      -> Maybe [OutputDestination]
      -> Maybe Text
      -> Maybe CdiInputSpecification
      -> Maybe Text
      -> Maybe ChannelClass
      -> Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe InputSpecification)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"inputSpecification")
            Either
  String
  (Maybe [InputAttachment]
   -> Maybe [OutputDestination]
   -> Maybe Text
   -> Maybe CdiInputSpecification
   -> Maybe Text
   -> Maybe ChannelClass
   -> Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe [InputAttachment])
-> Either
     String
     (Maybe [OutputDestination]
      -> Maybe Text
      -> Maybe CdiInputSpecification
      -> Maybe Text
      -> Maybe ChannelClass
      -> Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [InputAttachment]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"inputAttachments"
                            Either String (Maybe (Maybe [InputAttachment]))
-> Maybe [InputAttachment]
-> Either String (Maybe [InputAttachment])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [InputAttachment]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe [OutputDestination]
   -> Maybe Text
   -> Maybe CdiInputSpecification
   -> Maybe Text
   -> Maybe ChannelClass
   -> Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe [OutputDestination])
-> Either
     String
     (Maybe Text
      -> Maybe CdiInputSpecification
      -> Maybe Text
      -> Maybe ChannelClass
      -> Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [OutputDestination]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"destinations" Either String (Maybe (Maybe [OutputDestination]))
-> Maybe [OutputDestination]
-> Either String (Maybe [OutputDestination])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [OutputDestination]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe CdiInputSpecification
   -> Maybe Text
   -> Maybe ChannelClass
   -> Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe CdiInputSpecification
      -> Maybe Text
      -> Maybe ChannelClass
      -> Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"name")
            Either
  String
  (Maybe CdiInputSpecification
   -> Maybe Text
   -> Maybe ChannelClass
   -> Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe CdiInputSpecification)
-> Either
     String
     (Maybe Text
      -> Maybe ChannelClass
      -> Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe CdiInputSpecification)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"cdiInputSpecification")
            Either
  String
  (Maybe Text
   -> Maybe ChannelClass
   -> Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ChannelClass
      -> Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"id")
            Either
  String
  (Maybe ChannelClass
   -> Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe ChannelClass)
-> Either
     String
     (Maybe VpcOutputSettingsDescription
      -> Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ChannelClass)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"channelClass")
            Either
  String
  (Maybe VpcOutputSettingsDescription
   -> Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe VpcOutputSettingsDescription)
-> Either
     String
     (Maybe [ChannelEgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe VpcOutputSettingsDescription)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"vpc")
            Either
  String
  (Maybe [ChannelEgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe [ChannelEgressEndpoint])
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe EncoderSettings
      -> Maybe Text
      -> Int
      -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [ChannelEgressEndpoint]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"egressEndpoints"
                            Either String (Maybe (Maybe [ChannelEgressEndpoint]))
-> Maybe [ChannelEgressEndpoint]
-> Either String (Maybe [ChannelEgressEndpoint])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ChannelEgressEndpoint]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe EncoderSettings
   -> Maybe Text
   -> Int
   -> StartChannelResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Maybe EncoderSettings
      -> Maybe Text -> Int -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe EncoderSettings
   -> Maybe Text -> Int -> StartChannelResponse)
-> Either String (Maybe EncoderSettings)
-> Either String (Maybe Text -> Int -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe EncoderSettings)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"encoderSettings")
            Either String (Maybe Text -> Int -> StartChannelResponse)
-> Either String (Maybe Text)
-> Either String (Int -> StartChannelResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"roleArn")
            Either String (Int -> StartChannelResponse)
-> Either String Int -> Either String StartChannelResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable StartChannel

instance Prelude.NFData StartChannel

instance Core.ToHeaders StartChannel where
  toHeaders :: StartChannel -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartChannel -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON StartChannel where
  toJSON :: StartChannel -> Value
toJSON = Value -> StartChannel -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)

instance Core.ToPath StartChannel where
  toPath :: StartChannel -> ByteString
toPath StartChannel' {Text
channelId :: Text
$sel:channelId:StartChannel' :: StartChannel -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/prod/channels/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelId, ByteString
"/start"]

instance Core.ToQuery StartChannel where
  toQuery :: StartChannel -> QueryString
toQuery = QueryString -> StartChannel -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | Placeholder documentation for StartChannelResponse
--
-- /See:/ 'newStartChannelResponse' smart constructor.
data StartChannelResponse = StartChannelResponse'
  { StartChannelResponse -> Maybe ChannelState
state :: Prelude.Maybe ChannelState,
    -- | The log level being written to CloudWatch Logs.
    StartChannelResponse -> Maybe LogLevel
logLevel :: Prelude.Maybe LogLevel,
    -- | The unique arn of the channel.
    StartChannelResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The number of currently healthy pipelines.
    StartChannelResponse -> Maybe Int
pipelinesRunningCount :: Prelude.Maybe Prelude.Int,
    -- | Runtime details for the pipelines of a running channel.
    StartChannelResponse -> Maybe [PipelineDetail]
pipelineDetails :: Prelude.Maybe [PipelineDetail],
    -- | Specification of network and file inputs for this channel
    StartChannelResponse -> Maybe InputSpecification
inputSpecification :: Prelude.Maybe InputSpecification,
    -- | List of input attachments for channel.
    StartChannelResponse -> Maybe [InputAttachment]
inputAttachments :: Prelude.Maybe [InputAttachment],
    -- | 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.
    StartChannelResponse -> Maybe [OutputDestination]
destinations :: Prelude.Maybe [OutputDestination],
    -- | The name of the channel. (user-mutable)
    StartChannelResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Specification of CDI inputs for this channel
    StartChannelResponse -> Maybe CdiInputSpecification
cdiInputSpecification :: Prelude.Maybe CdiInputSpecification,
    -- | The unique id of the channel.
    StartChannelResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The class for this channel. STANDARD for a channel with two pipelines or
    -- SINGLE_PIPELINE for a channel with one pipeline.
    StartChannelResponse -> Maybe ChannelClass
channelClass :: Prelude.Maybe ChannelClass,
    -- | Settings for VPC output
    StartChannelResponse -> Maybe VpcOutputSettingsDescription
vpc :: Prelude.Maybe VpcOutputSettingsDescription,
    -- | The endpoints where outgoing connections initiate from
    StartChannelResponse -> Maybe [ChannelEgressEndpoint]
egressEndpoints :: Prelude.Maybe [ChannelEgressEndpoint],
    -- | A collection of key-value pairs.
    StartChannelResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    StartChannelResponse -> Maybe EncoderSettings
encoderSettings :: Prelude.Maybe EncoderSettings,
    -- | The Amazon Resource Name (ARN) of the role assumed when running the
    -- Channel.
    StartChannelResponse -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    StartChannelResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartChannelResponse -> StartChannelResponse -> Bool
(StartChannelResponse -> StartChannelResponse -> Bool)
-> (StartChannelResponse -> StartChannelResponse -> Bool)
-> Eq StartChannelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartChannelResponse -> StartChannelResponse -> Bool
$c/= :: StartChannelResponse -> StartChannelResponse -> Bool
== :: StartChannelResponse -> StartChannelResponse -> Bool
$c== :: StartChannelResponse -> StartChannelResponse -> Bool
Prelude.Eq, ReadPrec [StartChannelResponse]
ReadPrec StartChannelResponse
Int -> ReadS StartChannelResponse
ReadS [StartChannelResponse]
(Int -> ReadS StartChannelResponse)
-> ReadS [StartChannelResponse]
-> ReadPrec StartChannelResponse
-> ReadPrec [StartChannelResponse]
-> Read StartChannelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartChannelResponse]
$creadListPrec :: ReadPrec [StartChannelResponse]
readPrec :: ReadPrec StartChannelResponse
$creadPrec :: ReadPrec StartChannelResponse
readList :: ReadS [StartChannelResponse]
$creadList :: ReadS [StartChannelResponse]
readsPrec :: Int -> ReadS StartChannelResponse
$creadsPrec :: Int -> ReadS StartChannelResponse
Prelude.Read, Int -> StartChannelResponse -> ShowS
[StartChannelResponse] -> ShowS
StartChannelResponse -> String
(Int -> StartChannelResponse -> ShowS)
-> (StartChannelResponse -> String)
-> ([StartChannelResponse] -> ShowS)
-> Show StartChannelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartChannelResponse] -> ShowS
$cshowList :: [StartChannelResponse] -> ShowS
show :: StartChannelResponse -> String
$cshow :: StartChannelResponse -> String
showsPrec :: Int -> StartChannelResponse -> ShowS
$cshowsPrec :: Int -> StartChannelResponse -> ShowS
Prelude.Show, (forall x. StartChannelResponse -> Rep StartChannelResponse x)
-> (forall x. Rep StartChannelResponse x -> StartChannelResponse)
-> Generic StartChannelResponse
forall x. Rep StartChannelResponse x -> StartChannelResponse
forall x. StartChannelResponse -> Rep StartChannelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartChannelResponse x -> StartChannelResponse
$cfrom :: forall x. StartChannelResponse -> Rep StartChannelResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartChannelResponse' 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:
--
-- 'state', 'startChannelResponse_state' - Undocumented member.
--
-- 'logLevel', 'startChannelResponse_logLevel' - The log level being written to CloudWatch Logs.
--
-- 'arn', 'startChannelResponse_arn' - The unique arn of the channel.
--
-- 'pipelinesRunningCount', 'startChannelResponse_pipelinesRunningCount' - The number of currently healthy pipelines.
--
-- 'pipelineDetails', 'startChannelResponse_pipelineDetails' - Runtime details for the pipelines of a running channel.
--
-- 'inputSpecification', 'startChannelResponse_inputSpecification' - Specification of network and file inputs for this channel
--
-- 'inputAttachments', 'startChannelResponse_inputAttachments' - List of input attachments for channel.
--
-- 'destinations', 'startChannelResponse_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.
--
-- 'name', 'startChannelResponse_name' - The name of the channel. (user-mutable)
--
-- 'cdiInputSpecification', 'startChannelResponse_cdiInputSpecification' - Specification of CDI inputs for this channel
--
-- 'id', 'startChannelResponse_id' - The unique id of the channel.
--
-- 'channelClass', 'startChannelResponse_channelClass' - The class for this channel. STANDARD for a channel with two pipelines or
-- SINGLE_PIPELINE for a channel with one pipeline.
--
-- 'vpc', 'startChannelResponse_vpc' - Settings for VPC output
--
-- 'egressEndpoints', 'startChannelResponse_egressEndpoints' - The endpoints where outgoing connections initiate from
--
-- 'tags', 'startChannelResponse_tags' - A collection of key-value pairs.
--
-- 'encoderSettings', 'startChannelResponse_encoderSettings' - Undocumented member.
--
-- 'roleArn', 'startChannelResponse_roleArn' - The Amazon Resource Name (ARN) of the role assumed when running the
-- Channel.
--
-- 'httpStatus', 'startChannelResponse_httpStatus' - The response's http status code.
newStartChannelResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartChannelResponse
newStartChannelResponse :: Int -> StartChannelResponse
newStartChannelResponse Int
pHttpStatus_ =
  StartChannelResponse' :: Maybe ChannelState
-> Maybe LogLevel
-> Maybe Text
-> Maybe Int
-> Maybe [PipelineDetail]
-> Maybe InputSpecification
-> Maybe [InputAttachment]
-> Maybe [OutputDestination]
-> Maybe Text
-> Maybe CdiInputSpecification
-> Maybe Text
-> Maybe ChannelClass
-> Maybe VpcOutputSettingsDescription
-> Maybe [ChannelEgressEndpoint]
-> Maybe (HashMap Text Text)
-> Maybe EncoderSettings
-> Maybe Text
-> Int
-> StartChannelResponse
StartChannelResponse'
    { $sel:state:StartChannelResponse' :: Maybe ChannelState
state = Maybe ChannelState
forall a. Maybe a
Prelude.Nothing,
      $sel:logLevel:StartChannelResponse' :: Maybe LogLevel
logLevel = Maybe LogLevel
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:StartChannelResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelinesRunningCount:StartChannelResponse' :: Maybe Int
pipelinesRunningCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineDetails:StartChannelResponse' :: Maybe [PipelineDetail]
pipelineDetails = Maybe [PipelineDetail]
forall a. Maybe a
Prelude.Nothing,
      $sel:inputSpecification:StartChannelResponse' :: Maybe InputSpecification
inputSpecification = Maybe InputSpecification
forall a. Maybe a
Prelude.Nothing,
      $sel:inputAttachments:StartChannelResponse' :: Maybe [InputAttachment]
inputAttachments = Maybe [InputAttachment]
forall a. Maybe a
Prelude.Nothing,
      $sel:destinations:StartChannelResponse' :: Maybe [OutputDestination]
destinations = Maybe [OutputDestination]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:StartChannelResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cdiInputSpecification:StartChannelResponse' :: Maybe CdiInputSpecification
cdiInputSpecification = Maybe CdiInputSpecification
forall a. Maybe a
Prelude.Nothing,
      $sel:id:StartChannelResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:channelClass:StartChannelResponse' :: Maybe ChannelClass
channelClass = Maybe ChannelClass
forall a. Maybe a
Prelude.Nothing,
      $sel:vpc:StartChannelResponse' :: Maybe VpcOutputSettingsDescription
vpc = Maybe VpcOutputSettingsDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:egressEndpoints:StartChannelResponse' :: Maybe [ChannelEgressEndpoint]
egressEndpoints = Maybe [ChannelEgressEndpoint]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:StartChannelResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:encoderSettings:StartChannelResponse' :: Maybe EncoderSettings
encoderSettings = Maybe EncoderSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:StartChannelResponse' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartChannelResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

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

-- | Runtime details for the pipelines of a running channel.
startChannelResponse_pipelineDetails :: Lens.Lens' StartChannelResponse (Prelude.Maybe [PipelineDetail])
startChannelResponse_pipelineDetails :: (Maybe [PipelineDetail] -> f (Maybe [PipelineDetail]))
-> StartChannelResponse -> f StartChannelResponse
startChannelResponse_pipelineDetails = (StartChannelResponse -> Maybe [PipelineDetail])
-> (StartChannelResponse
    -> Maybe [PipelineDetail] -> StartChannelResponse)
-> Lens
     StartChannelResponse
     StartChannelResponse
     (Maybe [PipelineDetail])
     (Maybe [PipelineDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChannelResponse' {Maybe [PipelineDetail]
pipelineDetails :: Maybe [PipelineDetail]
$sel:pipelineDetails:StartChannelResponse' :: StartChannelResponse -> Maybe [PipelineDetail]
pipelineDetails} -> Maybe [PipelineDetail]
pipelineDetails) (\s :: StartChannelResponse
s@StartChannelResponse' {} Maybe [PipelineDetail]
a -> StartChannelResponse
s {$sel:pipelineDetails:StartChannelResponse' :: Maybe [PipelineDetail]
pipelineDetails = Maybe [PipelineDetail]
a} :: StartChannelResponse) ((Maybe [PipelineDetail] -> f (Maybe [PipelineDetail]))
 -> StartChannelResponse -> f StartChannelResponse)
-> ((Maybe [PipelineDetail] -> f (Maybe [PipelineDetail]))
    -> Maybe [PipelineDetail] -> f (Maybe [PipelineDetail]))
-> (Maybe [PipelineDetail] -> f (Maybe [PipelineDetail]))
-> StartChannelResponse
-> f StartChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PipelineDetail] [PipelineDetail] [PipelineDetail] [PipelineDetail]
-> Iso
     (Maybe [PipelineDetail])
     (Maybe [PipelineDetail])
     (Maybe [PipelineDetail])
     (Maybe [PipelineDetail])
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
  [PipelineDetail] [PipelineDetail] [PipelineDetail] [PipelineDetail]
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
startChannelResponse_inputSpecification :: Lens.Lens' StartChannelResponse (Prelude.Maybe InputSpecification)
startChannelResponse_inputSpecification :: (Maybe InputSpecification -> f (Maybe InputSpecification))
-> StartChannelResponse -> f StartChannelResponse
startChannelResponse_inputSpecification = (StartChannelResponse -> Maybe InputSpecification)
-> (StartChannelResponse
    -> Maybe InputSpecification -> StartChannelResponse)
-> Lens
     StartChannelResponse
     StartChannelResponse
     (Maybe InputSpecification)
     (Maybe InputSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChannelResponse' {Maybe InputSpecification
inputSpecification :: Maybe InputSpecification
$sel:inputSpecification:StartChannelResponse' :: StartChannelResponse -> Maybe InputSpecification
inputSpecification} -> Maybe InputSpecification
inputSpecification) (\s :: StartChannelResponse
s@StartChannelResponse' {} Maybe InputSpecification
a -> StartChannelResponse
s {$sel:inputSpecification:StartChannelResponse' :: Maybe InputSpecification
inputSpecification = Maybe InputSpecification
a} :: StartChannelResponse)

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

-- | 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.
startChannelResponse_destinations :: Lens.Lens' StartChannelResponse (Prelude.Maybe [OutputDestination])
startChannelResponse_destinations :: (Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> StartChannelResponse -> f StartChannelResponse
startChannelResponse_destinations = (StartChannelResponse -> Maybe [OutputDestination])
-> (StartChannelResponse
    -> Maybe [OutputDestination] -> StartChannelResponse)
-> Lens
     StartChannelResponse
     StartChannelResponse
     (Maybe [OutputDestination])
     (Maybe [OutputDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChannelResponse' {Maybe [OutputDestination]
destinations :: Maybe [OutputDestination]
$sel:destinations:StartChannelResponse' :: StartChannelResponse -> Maybe [OutputDestination]
destinations} -> Maybe [OutputDestination]
destinations) (\s :: StartChannelResponse
s@StartChannelResponse' {} Maybe [OutputDestination]
a -> StartChannelResponse
s {$sel:destinations:StartChannelResponse' :: Maybe [OutputDestination]
destinations = Maybe [OutputDestination]
a} :: StartChannelResponse) ((Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
 -> StartChannelResponse -> f StartChannelResponse)
-> ((Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
    -> Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> (Maybe [OutputDestination] -> f (Maybe [OutputDestination]))
-> StartChannelResponse
-> f StartChannelResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [OutputDestination]
  [OutputDestination]
  [OutputDestination]
  [OutputDestination]
-> Iso
     (Maybe [OutputDestination])
     (Maybe [OutputDestination])
     (Maybe [OutputDestination])
     (Maybe [OutputDestination])
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
  [OutputDestination]
  [OutputDestination]
  [OutputDestination]
  [OutputDestination]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the channel. (user-mutable)
startChannelResponse_name :: Lens.Lens' StartChannelResponse (Prelude.Maybe Prelude.Text)
startChannelResponse_name :: (Maybe Text -> f (Maybe Text))
-> StartChannelResponse -> f StartChannelResponse
startChannelResponse_name = (StartChannelResponse -> Maybe Text)
-> (StartChannelResponse -> Maybe Text -> StartChannelResponse)
-> Lens
     StartChannelResponse StartChannelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChannelResponse' {Maybe Text
name :: Maybe Text
$sel:name:StartChannelResponse' :: StartChannelResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: StartChannelResponse
s@StartChannelResponse' {} Maybe Text
a -> StartChannelResponse
s {$sel:name:StartChannelResponse' :: Maybe Text
name = Maybe Text
a} :: StartChannelResponse)

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

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

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

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

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

-- | A collection of key-value pairs.
startChannelResponse_tags :: Lens.Lens' StartChannelResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startChannelResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartChannelResponse -> f StartChannelResponse
startChannelResponse_tags = (StartChannelResponse -> Maybe (HashMap Text Text))
-> (StartChannelResponse
    -> Maybe (HashMap Text Text) -> StartChannelResponse)
-> Lens
     StartChannelResponse
     StartChannelResponse
     (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 (\StartChannelResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StartChannelResponse' :: StartChannelResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StartChannelResponse
s@StartChannelResponse' {} Maybe (HashMap Text Text)
a -> StartChannelResponse
s {$sel:tags:StartChannelResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StartChannelResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> StartChannelResponse -> f StartChannelResponse)
-> ((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)))
-> StartChannelResponse
-> f StartChannelResponse
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

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

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

-- | The response's http status code.
startChannelResponse_httpStatus :: Lens.Lens' StartChannelResponse Prelude.Int
startChannelResponse_httpStatus :: (Int -> f Int) -> StartChannelResponse -> f StartChannelResponse
startChannelResponse_httpStatus = (StartChannelResponse -> Int)
-> (StartChannelResponse -> Int -> StartChannelResponse)
-> Lens StartChannelResponse StartChannelResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChannelResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartChannelResponse' :: StartChannelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartChannelResponse
s@StartChannelResponse' {} Int
a -> StartChannelResponse
s {$sel:httpStatus:StartChannelResponse' :: Int
httpStatus = Int
a} :: StartChannelResponse)

instance Prelude.NFData StartChannelResponse