{-# 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.StopMultiplex
-- 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)
--
-- Stops a running multiplex. If the multiplex isn\'t running, this action
-- has no effect.
module Amazonka.MediaLive.StopMultiplex
  ( -- * Creating a Request
    StopMultiplex (..),
    newStopMultiplex,

    -- * Request Lenses
    stopMultiplex_multiplexId,

    -- * Destructuring the Response
    StopMultiplexResponse (..),
    newStopMultiplexResponse,

    -- * Response Lenses
    stopMultiplexResponse_state,
    stopMultiplexResponse_arn,
    stopMultiplexResponse_pipelinesRunningCount,
    stopMultiplexResponse_availabilityZones,
    stopMultiplexResponse_programCount,
    stopMultiplexResponse_destinations,
    stopMultiplexResponse_name,
    stopMultiplexResponse_id,
    stopMultiplexResponse_multiplexSettings,
    stopMultiplexResponse_tags,
    stopMultiplexResponse_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 StopMultiplexRequest
--
-- /See:/ 'newStopMultiplex' smart constructor.
data StopMultiplex = StopMultiplex'
  { -- | The ID of the multiplex.
    StopMultiplex -> Text
multiplexId :: Prelude.Text
  }
  deriving (StopMultiplex -> StopMultiplex -> Bool
(StopMultiplex -> StopMultiplex -> Bool)
-> (StopMultiplex -> StopMultiplex -> Bool) -> Eq StopMultiplex
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopMultiplex -> StopMultiplex -> Bool
$c/= :: StopMultiplex -> StopMultiplex -> Bool
== :: StopMultiplex -> StopMultiplex -> Bool
$c== :: StopMultiplex -> StopMultiplex -> Bool
Prelude.Eq, ReadPrec [StopMultiplex]
ReadPrec StopMultiplex
Int -> ReadS StopMultiplex
ReadS [StopMultiplex]
(Int -> ReadS StopMultiplex)
-> ReadS [StopMultiplex]
-> ReadPrec StopMultiplex
-> ReadPrec [StopMultiplex]
-> Read StopMultiplex
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopMultiplex]
$creadListPrec :: ReadPrec [StopMultiplex]
readPrec :: ReadPrec StopMultiplex
$creadPrec :: ReadPrec StopMultiplex
readList :: ReadS [StopMultiplex]
$creadList :: ReadS [StopMultiplex]
readsPrec :: Int -> ReadS StopMultiplex
$creadsPrec :: Int -> ReadS StopMultiplex
Prelude.Read, Int -> StopMultiplex -> ShowS
[StopMultiplex] -> ShowS
StopMultiplex -> String
(Int -> StopMultiplex -> ShowS)
-> (StopMultiplex -> String)
-> ([StopMultiplex] -> ShowS)
-> Show StopMultiplex
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopMultiplex] -> ShowS
$cshowList :: [StopMultiplex] -> ShowS
show :: StopMultiplex -> String
$cshow :: StopMultiplex -> String
showsPrec :: Int -> StopMultiplex -> ShowS
$cshowsPrec :: Int -> StopMultiplex -> ShowS
Prelude.Show, (forall x. StopMultiplex -> Rep StopMultiplex x)
-> (forall x. Rep StopMultiplex x -> StopMultiplex)
-> Generic StopMultiplex
forall x. Rep StopMultiplex x -> StopMultiplex
forall x. StopMultiplex -> Rep StopMultiplex x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StopMultiplex x -> StopMultiplex
$cfrom :: forall x. StopMultiplex -> Rep StopMultiplex x
Prelude.Generic)

-- |
-- Create a value of 'StopMultiplex' 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:
--
-- 'multiplexId', 'stopMultiplex_multiplexId' - The ID of the multiplex.
newStopMultiplex ::
  -- | 'multiplexId'
  Prelude.Text ->
  StopMultiplex
newStopMultiplex :: Text -> StopMultiplex
newStopMultiplex Text
pMultiplexId_ =
  StopMultiplex' :: Text -> StopMultiplex
StopMultiplex' {$sel:multiplexId:StopMultiplex' :: Text
multiplexId = Text
pMultiplexId_}

-- | The ID of the multiplex.
stopMultiplex_multiplexId :: Lens.Lens' StopMultiplex Prelude.Text
stopMultiplex_multiplexId :: (Text -> f Text) -> StopMultiplex -> f StopMultiplex
stopMultiplex_multiplexId = (StopMultiplex -> Text)
-> (StopMultiplex -> Text -> StopMultiplex)
-> Lens StopMultiplex StopMultiplex Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopMultiplex' {Text
multiplexId :: Text
$sel:multiplexId:StopMultiplex' :: StopMultiplex -> Text
multiplexId} -> Text
multiplexId) (\s :: StopMultiplex
s@StopMultiplex' {} Text
a -> StopMultiplex
s {$sel:multiplexId:StopMultiplex' :: Text
multiplexId = Text
a} :: StopMultiplex)

instance Core.AWSRequest StopMultiplex where
  type
    AWSResponse StopMultiplex =
      StopMultiplexResponse
  request :: StopMultiplex -> Request StopMultiplex
request = Service -> StopMultiplex -> Request StopMultiplex
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StopMultiplex
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StopMultiplex)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StopMultiplex))
-> Logger
-> Service
-> Proxy StopMultiplex
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StopMultiplex)))
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 MultiplexState
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe [MultiplexOutputDestination]
-> Maybe Text
-> Maybe Text
-> Maybe MultiplexSettings
-> Maybe (HashMap Text Text)
-> Int
-> StopMultiplexResponse
StopMultiplexResponse'
            (Maybe MultiplexState
 -> Maybe Text
 -> Maybe Int
 -> Maybe [Text]
 -> Maybe Int
 -> Maybe [MultiplexOutputDestination]
 -> Maybe Text
 -> Maybe Text
 -> Maybe MultiplexSettings
 -> Maybe (HashMap Text Text)
 -> Int
 -> StopMultiplexResponse)
-> Either String (Maybe MultiplexState)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> StopMultiplexResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe MultiplexState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"state")
            Either
  String
  (Maybe Text
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> StopMultiplexResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> StopMultiplexResponse)
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 [Text]
   -> Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> StopMultiplexResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe [Text]
      -> Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> StopMultiplexResponse)
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 [Text]
   -> Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> StopMultiplexResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> StopMultiplexResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"availabilityZones"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> StopMultiplexResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> StopMultiplexResponse)
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
"programCount")
            Either
  String
  (Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> StopMultiplexResponse)
-> Either String (Maybe [MultiplexOutputDestination])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> StopMultiplexResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [MultiplexOutputDestination]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"destinations" Either String (Maybe (Maybe [MultiplexOutputDestination]))
-> Maybe [MultiplexOutputDestination]
-> Either String (Maybe [MultiplexOutputDestination])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MultiplexOutputDestination]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> StopMultiplexResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> StopMultiplexResponse)
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 Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> StopMultiplexResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe MultiplexSettings
      -> Maybe (HashMap Text Text) -> Int -> StopMultiplexResponse)
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 MultiplexSettings
   -> Maybe (HashMap Text Text) -> Int -> StopMultiplexResponse)
-> Either String (Maybe MultiplexSettings)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> StopMultiplexResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe MultiplexSettings)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"multiplexSettings")
            Either
  String (Maybe (HashMap Text Text) -> Int -> StopMultiplexResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> StopMultiplexResponse)
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 (Int -> StopMultiplexResponse)
-> Either String Int -> Either String StopMultiplexResponse
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 StopMultiplex

instance Prelude.NFData StopMultiplex

instance Core.ToHeaders StopMultiplex where
  toHeaders :: StopMultiplex -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StopMultiplex -> 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 StopMultiplex where
  toJSON :: StopMultiplex -> Value
toJSON = Value -> StopMultiplex -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)

instance Core.ToPath StopMultiplex where
  toPath :: StopMultiplex -> ByteString
toPath StopMultiplex' {Text
multiplexId :: Text
$sel:multiplexId:StopMultiplex' :: StopMultiplex -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/prod/multiplexes/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
multiplexId,
        ByteString
"/stop"
      ]

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

-- | Placeholder documentation for StopMultiplexResponse
--
-- /See:/ 'newStopMultiplexResponse' smart constructor.
data StopMultiplexResponse = StopMultiplexResponse'
  { -- | The current state of the multiplex.
    StopMultiplexResponse -> Maybe MultiplexState
state :: Prelude.Maybe MultiplexState,
    -- | The unique arn of the multiplex.
    StopMultiplexResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The number of currently healthy pipelines.
    StopMultiplexResponse -> Maybe Int
pipelinesRunningCount :: Prelude.Maybe Prelude.Int,
    -- | A list of availability zones for the multiplex.
    StopMultiplexResponse -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
    -- | The number of programs in the multiplex.
    StopMultiplexResponse -> Maybe Int
programCount :: Prelude.Maybe Prelude.Int,
    -- | A list of the multiplex output destinations.
    StopMultiplexResponse -> Maybe [MultiplexOutputDestination]
destinations :: Prelude.Maybe [MultiplexOutputDestination],
    -- | The name of the multiplex.
    StopMultiplexResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique id of the multiplex.
    StopMultiplexResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | Configuration for a multiplex event.
    StopMultiplexResponse -> Maybe MultiplexSettings
multiplexSettings :: Prelude.Maybe MultiplexSettings,
    -- | A collection of key-value pairs.
    StopMultiplexResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    StopMultiplexResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StopMultiplexResponse -> StopMultiplexResponse -> Bool
(StopMultiplexResponse -> StopMultiplexResponse -> Bool)
-> (StopMultiplexResponse -> StopMultiplexResponse -> Bool)
-> Eq StopMultiplexResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopMultiplexResponse -> StopMultiplexResponse -> Bool
$c/= :: StopMultiplexResponse -> StopMultiplexResponse -> Bool
== :: StopMultiplexResponse -> StopMultiplexResponse -> Bool
$c== :: StopMultiplexResponse -> StopMultiplexResponse -> Bool
Prelude.Eq, ReadPrec [StopMultiplexResponse]
ReadPrec StopMultiplexResponse
Int -> ReadS StopMultiplexResponse
ReadS [StopMultiplexResponse]
(Int -> ReadS StopMultiplexResponse)
-> ReadS [StopMultiplexResponse]
-> ReadPrec StopMultiplexResponse
-> ReadPrec [StopMultiplexResponse]
-> Read StopMultiplexResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopMultiplexResponse]
$creadListPrec :: ReadPrec [StopMultiplexResponse]
readPrec :: ReadPrec StopMultiplexResponse
$creadPrec :: ReadPrec StopMultiplexResponse
readList :: ReadS [StopMultiplexResponse]
$creadList :: ReadS [StopMultiplexResponse]
readsPrec :: Int -> ReadS StopMultiplexResponse
$creadsPrec :: Int -> ReadS StopMultiplexResponse
Prelude.Read, Int -> StopMultiplexResponse -> ShowS
[StopMultiplexResponse] -> ShowS
StopMultiplexResponse -> String
(Int -> StopMultiplexResponse -> ShowS)
-> (StopMultiplexResponse -> String)
-> ([StopMultiplexResponse] -> ShowS)
-> Show StopMultiplexResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopMultiplexResponse] -> ShowS
$cshowList :: [StopMultiplexResponse] -> ShowS
show :: StopMultiplexResponse -> String
$cshow :: StopMultiplexResponse -> String
showsPrec :: Int -> StopMultiplexResponse -> ShowS
$cshowsPrec :: Int -> StopMultiplexResponse -> ShowS
Prelude.Show, (forall x. StopMultiplexResponse -> Rep StopMultiplexResponse x)
-> (forall x. Rep StopMultiplexResponse x -> StopMultiplexResponse)
-> Generic StopMultiplexResponse
forall x. Rep StopMultiplexResponse x -> StopMultiplexResponse
forall x. StopMultiplexResponse -> Rep StopMultiplexResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StopMultiplexResponse x -> StopMultiplexResponse
$cfrom :: forall x. StopMultiplexResponse -> Rep StopMultiplexResponse x
Prelude.Generic)

-- |
-- Create a value of 'StopMultiplexResponse' 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', 'stopMultiplexResponse_state' - The current state of the multiplex.
--
-- 'arn', 'stopMultiplexResponse_arn' - The unique arn of the multiplex.
--
-- 'pipelinesRunningCount', 'stopMultiplexResponse_pipelinesRunningCount' - The number of currently healthy pipelines.
--
-- 'availabilityZones', 'stopMultiplexResponse_availabilityZones' - A list of availability zones for the multiplex.
--
-- 'programCount', 'stopMultiplexResponse_programCount' - The number of programs in the multiplex.
--
-- 'destinations', 'stopMultiplexResponse_destinations' - A list of the multiplex output destinations.
--
-- 'name', 'stopMultiplexResponse_name' - The name of the multiplex.
--
-- 'id', 'stopMultiplexResponse_id' - The unique id of the multiplex.
--
-- 'multiplexSettings', 'stopMultiplexResponse_multiplexSettings' - Configuration for a multiplex event.
--
-- 'tags', 'stopMultiplexResponse_tags' - A collection of key-value pairs.
--
-- 'httpStatus', 'stopMultiplexResponse_httpStatus' - The response's http status code.
newStopMultiplexResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StopMultiplexResponse
newStopMultiplexResponse :: Int -> StopMultiplexResponse
newStopMultiplexResponse Int
pHttpStatus_ =
  StopMultiplexResponse' :: Maybe MultiplexState
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe [MultiplexOutputDestination]
-> Maybe Text
-> Maybe Text
-> Maybe MultiplexSettings
-> Maybe (HashMap Text Text)
-> Int
-> StopMultiplexResponse
StopMultiplexResponse'
    { $sel:state:StopMultiplexResponse' :: Maybe MultiplexState
state = Maybe MultiplexState
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:StopMultiplexResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelinesRunningCount:StopMultiplexResponse' :: Maybe Int
pipelinesRunningCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZones:StopMultiplexResponse' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:programCount:StopMultiplexResponse' :: Maybe Int
programCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:destinations:StopMultiplexResponse' :: Maybe [MultiplexOutputDestination]
destinations = Maybe [MultiplexOutputDestination]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:StopMultiplexResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:StopMultiplexResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:multiplexSettings:StopMultiplexResponse' :: Maybe MultiplexSettings
multiplexSettings = Maybe MultiplexSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:StopMultiplexResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StopMultiplexResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current state of the multiplex.
stopMultiplexResponse_state :: Lens.Lens' StopMultiplexResponse (Prelude.Maybe MultiplexState)
stopMultiplexResponse_state :: (Maybe MultiplexState -> f (Maybe MultiplexState))
-> StopMultiplexResponse -> f StopMultiplexResponse
stopMultiplexResponse_state = (StopMultiplexResponse -> Maybe MultiplexState)
-> (StopMultiplexResponse
    -> Maybe MultiplexState -> StopMultiplexResponse)
-> Lens
     StopMultiplexResponse
     StopMultiplexResponse
     (Maybe MultiplexState)
     (Maybe MultiplexState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopMultiplexResponse' {Maybe MultiplexState
state :: Maybe MultiplexState
$sel:state:StopMultiplexResponse' :: StopMultiplexResponse -> Maybe MultiplexState
state} -> Maybe MultiplexState
state) (\s :: StopMultiplexResponse
s@StopMultiplexResponse' {} Maybe MultiplexState
a -> StopMultiplexResponse
s {$sel:state:StopMultiplexResponse' :: Maybe MultiplexState
state = Maybe MultiplexState
a} :: StopMultiplexResponse)

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

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

-- | A list of availability zones for the multiplex.
stopMultiplexResponse_availabilityZones :: Lens.Lens' StopMultiplexResponse (Prelude.Maybe [Prelude.Text])
stopMultiplexResponse_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> StopMultiplexResponse -> f StopMultiplexResponse
stopMultiplexResponse_availabilityZones = (StopMultiplexResponse -> Maybe [Text])
-> (StopMultiplexResponse -> Maybe [Text] -> StopMultiplexResponse)
-> Lens
     StopMultiplexResponse
     StopMultiplexResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopMultiplexResponse' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:StopMultiplexResponse' :: StopMultiplexResponse -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: StopMultiplexResponse
s@StopMultiplexResponse' {} Maybe [Text]
a -> StopMultiplexResponse
s {$sel:availabilityZones:StopMultiplexResponse' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: StopMultiplexResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> StopMultiplexResponse -> f StopMultiplexResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> StopMultiplexResponse
-> f StopMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of programs in the multiplex.
stopMultiplexResponse_programCount :: Lens.Lens' StopMultiplexResponse (Prelude.Maybe Prelude.Int)
stopMultiplexResponse_programCount :: (Maybe Int -> f (Maybe Int))
-> StopMultiplexResponse -> f StopMultiplexResponse
stopMultiplexResponse_programCount = (StopMultiplexResponse -> Maybe Int)
-> (StopMultiplexResponse -> Maybe Int -> StopMultiplexResponse)
-> Lens
     StopMultiplexResponse StopMultiplexResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopMultiplexResponse' {Maybe Int
programCount :: Maybe Int
$sel:programCount:StopMultiplexResponse' :: StopMultiplexResponse -> Maybe Int
programCount} -> Maybe Int
programCount) (\s :: StopMultiplexResponse
s@StopMultiplexResponse' {} Maybe Int
a -> StopMultiplexResponse
s {$sel:programCount:StopMultiplexResponse' :: Maybe Int
programCount = Maybe Int
a} :: StopMultiplexResponse)

-- | A list of the multiplex output destinations.
stopMultiplexResponse_destinations :: Lens.Lens' StopMultiplexResponse (Prelude.Maybe [MultiplexOutputDestination])
stopMultiplexResponse_destinations :: (Maybe [MultiplexOutputDestination]
 -> f (Maybe [MultiplexOutputDestination]))
-> StopMultiplexResponse -> f StopMultiplexResponse
stopMultiplexResponse_destinations = (StopMultiplexResponse -> Maybe [MultiplexOutputDestination])
-> (StopMultiplexResponse
    -> Maybe [MultiplexOutputDestination] -> StopMultiplexResponse)
-> Lens
     StopMultiplexResponse
     StopMultiplexResponse
     (Maybe [MultiplexOutputDestination])
     (Maybe [MultiplexOutputDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopMultiplexResponse' {Maybe [MultiplexOutputDestination]
destinations :: Maybe [MultiplexOutputDestination]
$sel:destinations:StopMultiplexResponse' :: StopMultiplexResponse -> Maybe [MultiplexOutputDestination]
destinations} -> Maybe [MultiplexOutputDestination]
destinations) (\s :: StopMultiplexResponse
s@StopMultiplexResponse' {} Maybe [MultiplexOutputDestination]
a -> StopMultiplexResponse
s {$sel:destinations:StopMultiplexResponse' :: Maybe [MultiplexOutputDestination]
destinations = Maybe [MultiplexOutputDestination]
a} :: StopMultiplexResponse) ((Maybe [MultiplexOutputDestination]
  -> f (Maybe [MultiplexOutputDestination]))
 -> StopMultiplexResponse -> f StopMultiplexResponse)
-> ((Maybe [MultiplexOutputDestination]
     -> f (Maybe [MultiplexOutputDestination]))
    -> Maybe [MultiplexOutputDestination]
    -> f (Maybe [MultiplexOutputDestination]))
-> (Maybe [MultiplexOutputDestination]
    -> f (Maybe [MultiplexOutputDestination]))
-> StopMultiplexResponse
-> f StopMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
-> Iso
     (Maybe [MultiplexOutputDestination])
     (Maybe [MultiplexOutputDestination])
     (Maybe [MultiplexOutputDestination])
     (Maybe [MultiplexOutputDestination])
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
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the multiplex.
stopMultiplexResponse_name :: Lens.Lens' StopMultiplexResponse (Prelude.Maybe Prelude.Text)
stopMultiplexResponse_name :: (Maybe Text -> f (Maybe Text))
-> StopMultiplexResponse -> f StopMultiplexResponse
stopMultiplexResponse_name = (StopMultiplexResponse -> Maybe Text)
-> (StopMultiplexResponse -> Maybe Text -> StopMultiplexResponse)
-> Lens
     StopMultiplexResponse
     StopMultiplexResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopMultiplexResponse' {Maybe Text
name :: Maybe Text
$sel:name:StopMultiplexResponse' :: StopMultiplexResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: StopMultiplexResponse
s@StopMultiplexResponse' {} Maybe Text
a -> StopMultiplexResponse
s {$sel:name:StopMultiplexResponse' :: Maybe Text
name = Maybe Text
a} :: StopMultiplexResponse)

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

-- | Configuration for a multiplex event.
stopMultiplexResponse_multiplexSettings :: Lens.Lens' StopMultiplexResponse (Prelude.Maybe MultiplexSettings)
stopMultiplexResponse_multiplexSettings :: (Maybe MultiplexSettings -> f (Maybe MultiplexSettings))
-> StopMultiplexResponse -> f StopMultiplexResponse
stopMultiplexResponse_multiplexSettings = (StopMultiplexResponse -> Maybe MultiplexSettings)
-> (StopMultiplexResponse
    -> Maybe MultiplexSettings -> StopMultiplexResponse)
-> Lens
     StopMultiplexResponse
     StopMultiplexResponse
     (Maybe MultiplexSettings)
     (Maybe MultiplexSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopMultiplexResponse' {Maybe MultiplexSettings
multiplexSettings :: Maybe MultiplexSettings
$sel:multiplexSettings:StopMultiplexResponse' :: StopMultiplexResponse -> Maybe MultiplexSettings
multiplexSettings} -> Maybe MultiplexSettings
multiplexSettings) (\s :: StopMultiplexResponse
s@StopMultiplexResponse' {} Maybe MultiplexSettings
a -> StopMultiplexResponse
s {$sel:multiplexSettings:StopMultiplexResponse' :: Maybe MultiplexSettings
multiplexSettings = Maybe MultiplexSettings
a} :: StopMultiplexResponse)

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

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

instance Prelude.NFData StopMultiplexResponse