{-# 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.MediaConnect.UpdateFlowOutput
-- 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)
--
-- Updates an existing flow output.
module Amazonka.MediaConnect.UpdateFlowOutput
  ( -- * Creating a Request
    UpdateFlowOutput (..),
    newUpdateFlowOutput,

    -- * Request Lenses
    updateFlowOutput_destination,
    updateFlowOutput_maxLatency,
    updateFlowOutput_mediaStreamOutputConfigurations,
    updateFlowOutput_protocol,
    updateFlowOutput_encryption,
    updateFlowOutput_cidrAllowList,
    updateFlowOutput_smoothingLatency,
    updateFlowOutput_minLatency,
    updateFlowOutput_description,
    updateFlowOutput_port,
    updateFlowOutput_streamId,
    updateFlowOutput_remoteId,
    updateFlowOutput_vpcInterfaceAttachment,
    updateFlowOutput_flowArn,
    updateFlowOutput_outputArn,

    -- * Destructuring the Response
    UpdateFlowOutputResponse (..),
    newUpdateFlowOutputResponse,

    -- * Response Lenses
    updateFlowOutputResponse_flowArn,
    updateFlowOutputResponse_output,
    updateFlowOutputResponse_httpStatus,
  )
where

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

-- | The fields that you want to update in the output.
--
-- /See:/ 'newUpdateFlowOutput' smart constructor.
data UpdateFlowOutput = UpdateFlowOutput'
  { -- | The IP address where you want to send the output.
    UpdateFlowOutput -> Maybe Text
destination :: Prelude.Maybe Prelude.Text,
    -- | The maximum latency in milliseconds for Zixi-based streams.
    UpdateFlowOutput -> Maybe Int
maxLatency :: Prelude.Maybe Prelude.Int,
    -- | The media streams that are associated with the output, and the
    -- parameters for those associations.
    UpdateFlowOutput -> Maybe [MediaStreamOutputConfigurationRequest]
mediaStreamOutputConfigurations :: Prelude.Maybe [MediaStreamOutputConfigurationRequest],
    -- | The protocol to use for the output.
    UpdateFlowOutput -> Maybe Protocol
protocol :: Prelude.Maybe Protocol,
    -- | The type of key used for the encryption. If no keyType is provided, the
    -- service will use the default setting (static-key).
    UpdateFlowOutput -> Maybe UpdateEncryption
encryption :: Prelude.Maybe UpdateEncryption,
    -- | The range of IP addresses that should be allowed to initiate output
    -- requests to this flow. These IP addresses should be in the form of a
    -- Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0\/16.
    UpdateFlowOutput -> Maybe [Text]
cidrAllowList :: Prelude.Maybe [Prelude.Text],
    -- | The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC
    -- streams.
    UpdateFlowOutput -> Maybe Int
smoothingLatency :: Prelude.Maybe Prelude.Int,
    -- | The minimum latency in milliseconds for SRT-based streams. In streams
    -- that use the SRT protocol, this value that you set on your MediaConnect
    -- source or output represents the minimal potential latency of that
    -- connection. The latency of the stream is set to the highest number
    -- between the sender’s minimum latency and the receiver’s minimum latency.
    UpdateFlowOutput -> Maybe Int
minLatency :: Prelude.Maybe Prelude.Int,
    -- | A description of the output. This description appears only on the AWS
    -- Elemental MediaConnect console and will not be seen by the end user.
    UpdateFlowOutput -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The port to use when content is distributed to this output.
    UpdateFlowOutput -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | The stream ID that you want to use for this transport. This parameter
    -- applies only to Zixi-based streams.
    UpdateFlowOutput -> Maybe Text
streamId :: Prelude.Maybe Prelude.Text,
    -- | The remote ID for the Zixi-pull stream.
    UpdateFlowOutput -> Maybe Text
remoteId :: Prelude.Maybe Prelude.Text,
    -- | The name of the VPC interface attachment to use for this output.
    UpdateFlowOutput -> Maybe VpcInterfaceAttachment
vpcInterfaceAttachment :: Prelude.Maybe VpcInterfaceAttachment,
    -- | The flow that is associated with the output that you want to update.
    UpdateFlowOutput -> Text
flowArn :: Prelude.Text,
    -- | The ARN of the output that you want to update.
    UpdateFlowOutput -> Text
outputArn :: Prelude.Text
  }
  deriving (UpdateFlowOutput -> UpdateFlowOutput -> Bool
(UpdateFlowOutput -> UpdateFlowOutput -> Bool)
-> (UpdateFlowOutput -> UpdateFlowOutput -> Bool)
-> Eq UpdateFlowOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFlowOutput -> UpdateFlowOutput -> Bool
$c/= :: UpdateFlowOutput -> UpdateFlowOutput -> Bool
== :: UpdateFlowOutput -> UpdateFlowOutput -> Bool
$c== :: UpdateFlowOutput -> UpdateFlowOutput -> Bool
Prelude.Eq, ReadPrec [UpdateFlowOutput]
ReadPrec UpdateFlowOutput
Int -> ReadS UpdateFlowOutput
ReadS [UpdateFlowOutput]
(Int -> ReadS UpdateFlowOutput)
-> ReadS [UpdateFlowOutput]
-> ReadPrec UpdateFlowOutput
-> ReadPrec [UpdateFlowOutput]
-> Read UpdateFlowOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFlowOutput]
$creadListPrec :: ReadPrec [UpdateFlowOutput]
readPrec :: ReadPrec UpdateFlowOutput
$creadPrec :: ReadPrec UpdateFlowOutput
readList :: ReadS [UpdateFlowOutput]
$creadList :: ReadS [UpdateFlowOutput]
readsPrec :: Int -> ReadS UpdateFlowOutput
$creadsPrec :: Int -> ReadS UpdateFlowOutput
Prelude.Read, Int -> UpdateFlowOutput -> ShowS
[UpdateFlowOutput] -> ShowS
UpdateFlowOutput -> String
(Int -> UpdateFlowOutput -> ShowS)
-> (UpdateFlowOutput -> String)
-> ([UpdateFlowOutput] -> ShowS)
-> Show UpdateFlowOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFlowOutput] -> ShowS
$cshowList :: [UpdateFlowOutput] -> ShowS
show :: UpdateFlowOutput -> String
$cshow :: UpdateFlowOutput -> String
showsPrec :: Int -> UpdateFlowOutput -> ShowS
$cshowsPrec :: Int -> UpdateFlowOutput -> ShowS
Prelude.Show, (forall x. UpdateFlowOutput -> Rep UpdateFlowOutput x)
-> (forall x. Rep UpdateFlowOutput x -> UpdateFlowOutput)
-> Generic UpdateFlowOutput
forall x. Rep UpdateFlowOutput x -> UpdateFlowOutput
forall x. UpdateFlowOutput -> Rep UpdateFlowOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateFlowOutput x -> UpdateFlowOutput
$cfrom :: forall x. UpdateFlowOutput -> Rep UpdateFlowOutput x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFlowOutput' 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:
--
-- 'destination', 'updateFlowOutput_destination' - The IP address where you want to send the output.
--
-- 'maxLatency', 'updateFlowOutput_maxLatency' - The maximum latency in milliseconds for Zixi-based streams.
--
-- 'mediaStreamOutputConfigurations', 'updateFlowOutput_mediaStreamOutputConfigurations' - The media streams that are associated with the output, and the
-- parameters for those associations.
--
-- 'protocol', 'updateFlowOutput_protocol' - The protocol to use for the output.
--
-- 'encryption', 'updateFlowOutput_encryption' - The type of key used for the encryption. If no keyType is provided, the
-- service will use the default setting (static-key).
--
-- 'cidrAllowList', 'updateFlowOutput_cidrAllowList' - The range of IP addresses that should be allowed to initiate output
-- requests to this flow. These IP addresses should be in the form of a
-- Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0\/16.
--
-- 'smoothingLatency', 'updateFlowOutput_smoothingLatency' - The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC
-- streams.
--
-- 'minLatency', 'updateFlowOutput_minLatency' - The minimum latency in milliseconds for SRT-based streams. In streams
-- that use the SRT protocol, this value that you set on your MediaConnect
-- source or output represents the minimal potential latency of that
-- connection. The latency of the stream is set to the highest number
-- between the sender’s minimum latency and the receiver’s minimum latency.
--
-- 'description', 'updateFlowOutput_description' - A description of the output. This description appears only on the AWS
-- Elemental MediaConnect console and will not be seen by the end user.
--
-- 'port', 'updateFlowOutput_port' - The port to use when content is distributed to this output.
--
-- 'streamId', 'updateFlowOutput_streamId' - The stream ID that you want to use for this transport. This parameter
-- applies only to Zixi-based streams.
--
-- 'remoteId', 'updateFlowOutput_remoteId' - The remote ID for the Zixi-pull stream.
--
-- 'vpcInterfaceAttachment', 'updateFlowOutput_vpcInterfaceAttachment' - The name of the VPC interface attachment to use for this output.
--
-- 'flowArn', 'updateFlowOutput_flowArn' - The flow that is associated with the output that you want to update.
--
-- 'outputArn', 'updateFlowOutput_outputArn' - The ARN of the output that you want to update.
newUpdateFlowOutput ::
  -- | 'flowArn'
  Prelude.Text ->
  -- | 'outputArn'
  Prelude.Text ->
  UpdateFlowOutput
newUpdateFlowOutput :: Text -> Text -> UpdateFlowOutput
newUpdateFlowOutput Text
pFlowArn_ Text
pOutputArn_ =
  UpdateFlowOutput' :: Maybe Text
-> Maybe Int
-> Maybe [MediaStreamOutputConfigurationRequest]
-> Maybe Protocol
-> Maybe UpdateEncryption
-> Maybe [Text]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe VpcInterfaceAttachment
-> Text
-> Text
-> UpdateFlowOutput
UpdateFlowOutput'
    { $sel:destination:UpdateFlowOutput' :: Maybe Text
destination = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxLatency:UpdateFlowOutput' :: Maybe Int
maxLatency = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:mediaStreamOutputConfigurations:UpdateFlowOutput' :: Maybe [MediaStreamOutputConfigurationRequest]
mediaStreamOutputConfigurations = Maybe [MediaStreamOutputConfigurationRequest]
forall a. Maybe a
Prelude.Nothing,
      $sel:protocol:UpdateFlowOutput' :: Maybe Protocol
protocol = Maybe Protocol
forall a. Maybe a
Prelude.Nothing,
      $sel:encryption:UpdateFlowOutput' :: Maybe UpdateEncryption
encryption = Maybe UpdateEncryption
forall a. Maybe a
Prelude.Nothing,
      $sel:cidrAllowList:UpdateFlowOutput' :: Maybe [Text]
cidrAllowList = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:smoothingLatency:UpdateFlowOutput' :: Maybe Int
smoothingLatency = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:minLatency:UpdateFlowOutput' :: Maybe Int
minLatency = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateFlowOutput' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:port:UpdateFlowOutput' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:streamId:UpdateFlowOutput' :: Maybe Text
streamId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:remoteId:UpdateFlowOutput' :: Maybe Text
remoteId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcInterfaceAttachment:UpdateFlowOutput' :: Maybe VpcInterfaceAttachment
vpcInterfaceAttachment = Maybe VpcInterfaceAttachment
forall a. Maybe a
Prelude.Nothing,
      $sel:flowArn:UpdateFlowOutput' :: Text
flowArn = Text
pFlowArn_,
      $sel:outputArn:UpdateFlowOutput' :: Text
outputArn = Text
pOutputArn_
    }

-- | The IP address where you want to send the output.
updateFlowOutput_destination :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe Prelude.Text)
updateFlowOutput_destination :: (Maybe Text -> f (Maybe Text))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_destination = (UpdateFlowOutput -> Maybe Text)
-> (UpdateFlowOutput -> Maybe Text -> UpdateFlowOutput)
-> Lens UpdateFlowOutput UpdateFlowOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe Text
destination :: Maybe Text
$sel:destination:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
destination} -> Maybe Text
destination) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe Text
a -> UpdateFlowOutput
s {$sel:destination:UpdateFlowOutput' :: Maybe Text
destination = Maybe Text
a} :: UpdateFlowOutput)

-- | The maximum latency in milliseconds for Zixi-based streams.
updateFlowOutput_maxLatency :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe Prelude.Int)
updateFlowOutput_maxLatency :: (Maybe Int -> f (Maybe Int))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_maxLatency = (UpdateFlowOutput -> Maybe Int)
-> (UpdateFlowOutput -> Maybe Int -> UpdateFlowOutput)
-> Lens UpdateFlowOutput UpdateFlowOutput (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe Int
maxLatency :: Maybe Int
$sel:maxLatency:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
maxLatency} -> Maybe Int
maxLatency) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe Int
a -> UpdateFlowOutput
s {$sel:maxLatency:UpdateFlowOutput' :: Maybe Int
maxLatency = Maybe Int
a} :: UpdateFlowOutput)

-- | The media streams that are associated with the output, and the
-- parameters for those associations.
updateFlowOutput_mediaStreamOutputConfigurations :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe [MediaStreamOutputConfigurationRequest])
updateFlowOutput_mediaStreamOutputConfigurations :: (Maybe [MediaStreamOutputConfigurationRequest]
 -> f (Maybe [MediaStreamOutputConfigurationRequest]))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_mediaStreamOutputConfigurations = (UpdateFlowOutput -> Maybe [MediaStreamOutputConfigurationRequest])
-> (UpdateFlowOutput
    -> Maybe [MediaStreamOutputConfigurationRequest]
    -> UpdateFlowOutput)
-> Lens
     UpdateFlowOutput
     UpdateFlowOutput
     (Maybe [MediaStreamOutputConfigurationRequest])
     (Maybe [MediaStreamOutputConfigurationRequest])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe [MediaStreamOutputConfigurationRequest]
mediaStreamOutputConfigurations :: Maybe [MediaStreamOutputConfigurationRequest]
$sel:mediaStreamOutputConfigurations:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe [MediaStreamOutputConfigurationRequest]
mediaStreamOutputConfigurations} -> Maybe [MediaStreamOutputConfigurationRequest]
mediaStreamOutputConfigurations) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe [MediaStreamOutputConfigurationRequest]
a -> UpdateFlowOutput
s {$sel:mediaStreamOutputConfigurations:UpdateFlowOutput' :: Maybe [MediaStreamOutputConfigurationRequest]
mediaStreamOutputConfigurations = Maybe [MediaStreamOutputConfigurationRequest]
a} :: UpdateFlowOutput) ((Maybe [MediaStreamOutputConfigurationRequest]
  -> f (Maybe [MediaStreamOutputConfigurationRequest]))
 -> UpdateFlowOutput -> f UpdateFlowOutput)
-> ((Maybe [MediaStreamOutputConfigurationRequest]
     -> f (Maybe [MediaStreamOutputConfigurationRequest]))
    -> Maybe [MediaStreamOutputConfigurationRequest]
    -> f (Maybe [MediaStreamOutputConfigurationRequest]))
-> (Maybe [MediaStreamOutputConfigurationRequest]
    -> f (Maybe [MediaStreamOutputConfigurationRequest]))
-> UpdateFlowOutput
-> f UpdateFlowOutput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MediaStreamOutputConfigurationRequest]
  [MediaStreamOutputConfigurationRequest]
  [MediaStreamOutputConfigurationRequest]
  [MediaStreamOutputConfigurationRequest]
-> Iso
     (Maybe [MediaStreamOutputConfigurationRequest])
     (Maybe [MediaStreamOutputConfigurationRequest])
     (Maybe [MediaStreamOutputConfigurationRequest])
     (Maybe [MediaStreamOutputConfigurationRequest])
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
  [MediaStreamOutputConfigurationRequest]
  [MediaStreamOutputConfigurationRequest]
  [MediaStreamOutputConfigurationRequest]
  [MediaStreamOutputConfigurationRequest]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The protocol to use for the output.
updateFlowOutput_protocol :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe Protocol)
updateFlowOutput_protocol :: (Maybe Protocol -> f (Maybe Protocol))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_protocol = (UpdateFlowOutput -> Maybe Protocol)
-> (UpdateFlowOutput -> Maybe Protocol -> UpdateFlowOutput)
-> Lens
     UpdateFlowOutput UpdateFlowOutput (Maybe Protocol) (Maybe Protocol)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe Protocol
protocol :: Maybe Protocol
$sel:protocol:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Protocol
protocol} -> Maybe Protocol
protocol) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe Protocol
a -> UpdateFlowOutput
s {$sel:protocol:UpdateFlowOutput' :: Maybe Protocol
protocol = Maybe Protocol
a} :: UpdateFlowOutput)

-- | The type of key used for the encryption. If no keyType is provided, the
-- service will use the default setting (static-key).
updateFlowOutput_encryption :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe UpdateEncryption)
updateFlowOutput_encryption :: (Maybe UpdateEncryption -> f (Maybe UpdateEncryption))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_encryption = (UpdateFlowOutput -> Maybe UpdateEncryption)
-> (UpdateFlowOutput -> Maybe UpdateEncryption -> UpdateFlowOutput)
-> Lens
     UpdateFlowOutput
     UpdateFlowOutput
     (Maybe UpdateEncryption)
     (Maybe UpdateEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe UpdateEncryption
encryption :: Maybe UpdateEncryption
$sel:encryption:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe UpdateEncryption
encryption} -> Maybe UpdateEncryption
encryption) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe UpdateEncryption
a -> UpdateFlowOutput
s {$sel:encryption:UpdateFlowOutput' :: Maybe UpdateEncryption
encryption = Maybe UpdateEncryption
a} :: UpdateFlowOutput)

-- | The range of IP addresses that should be allowed to initiate output
-- requests to this flow. These IP addresses should be in the form of a
-- Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0\/16.
updateFlowOutput_cidrAllowList :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe [Prelude.Text])
updateFlowOutput_cidrAllowList :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_cidrAllowList = (UpdateFlowOutput -> Maybe [Text])
-> (UpdateFlowOutput -> Maybe [Text] -> UpdateFlowOutput)
-> Lens
     UpdateFlowOutput UpdateFlowOutput (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe [Text]
cidrAllowList :: Maybe [Text]
$sel:cidrAllowList:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe [Text]
cidrAllowList} -> Maybe [Text]
cidrAllowList) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe [Text]
a -> UpdateFlowOutput
s {$sel:cidrAllowList:UpdateFlowOutput' :: Maybe [Text]
cidrAllowList = Maybe [Text]
a} :: UpdateFlowOutput) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateFlowOutput -> f UpdateFlowOutput)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateFlowOutput
-> f UpdateFlowOutput
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 smoothing latency in milliseconds for RIST, RTP, and RTP-FEC
-- streams.
updateFlowOutput_smoothingLatency :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe Prelude.Int)
updateFlowOutput_smoothingLatency :: (Maybe Int -> f (Maybe Int))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_smoothingLatency = (UpdateFlowOutput -> Maybe Int)
-> (UpdateFlowOutput -> Maybe Int -> UpdateFlowOutput)
-> Lens UpdateFlowOutput UpdateFlowOutput (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe Int
smoothingLatency :: Maybe Int
$sel:smoothingLatency:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
smoothingLatency} -> Maybe Int
smoothingLatency) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe Int
a -> UpdateFlowOutput
s {$sel:smoothingLatency:UpdateFlowOutput' :: Maybe Int
smoothingLatency = Maybe Int
a} :: UpdateFlowOutput)

-- | The minimum latency in milliseconds for SRT-based streams. In streams
-- that use the SRT protocol, this value that you set on your MediaConnect
-- source or output represents the minimal potential latency of that
-- connection. The latency of the stream is set to the highest number
-- between the sender’s minimum latency and the receiver’s minimum latency.
updateFlowOutput_minLatency :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe Prelude.Int)
updateFlowOutput_minLatency :: (Maybe Int -> f (Maybe Int))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_minLatency = (UpdateFlowOutput -> Maybe Int)
-> (UpdateFlowOutput -> Maybe Int -> UpdateFlowOutput)
-> Lens UpdateFlowOutput UpdateFlowOutput (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe Int
minLatency :: Maybe Int
$sel:minLatency:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
minLatency} -> Maybe Int
minLatency) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe Int
a -> UpdateFlowOutput
s {$sel:minLatency:UpdateFlowOutput' :: Maybe Int
minLatency = Maybe Int
a} :: UpdateFlowOutput)

-- | A description of the output. This description appears only on the AWS
-- Elemental MediaConnect console and will not be seen by the end user.
updateFlowOutput_description :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe Prelude.Text)
updateFlowOutput_description :: (Maybe Text -> f (Maybe Text))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_description = (UpdateFlowOutput -> Maybe Text)
-> (UpdateFlowOutput -> Maybe Text -> UpdateFlowOutput)
-> Lens UpdateFlowOutput UpdateFlowOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe Text
description :: Maybe Text
$sel:description:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe Text
a -> UpdateFlowOutput
s {$sel:description:UpdateFlowOutput' :: Maybe Text
description = Maybe Text
a} :: UpdateFlowOutput)

-- | The port to use when content is distributed to this output.
updateFlowOutput_port :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe Prelude.Int)
updateFlowOutput_port :: (Maybe Int -> f (Maybe Int))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_port = (UpdateFlowOutput -> Maybe Int)
-> (UpdateFlowOutput -> Maybe Int -> UpdateFlowOutput)
-> Lens UpdateFlowOutput UpdateFlowOutput (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe Int
port :: Maybe Int
$sel:port:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
port} -> Maybe Int
port) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe Int
a -> UpdateFlowOutput
s {$sel:port:UpdateFlowOutput' :: Maybe Int
port = Maybe Int
a} :: UpdateFlowOutput)

-- | The stream ID that you want to use for this transport. This parameter
-- applies only to Zixi-based streams.
updateFlowOutput_streamId :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe Prelude.Text)
updateFlowOutput_streamId :: (Maybe Text -> f (Maybe Text))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_streamId = (UpdateFlowOutput -> Maybe Text)
-> (UpdateFlowOutput -> Maybe Text -> UpdateFlowOutput)
-> Lens UpdateFlowOutput UpdateFlowOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe Text
streamId :: Maybe Text
$sel:streamId:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
streamId} -> Maybe Text
streamId) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe Text
a -> UpdateFlowOutput
s {$sel:streamId:UpdateFlowOutput' :: Maybe Text
streamId = Maybe Text
a} :: UpdateFlowOutput)

-- | The remote ID for the Zixi-pull stream.
updateFlowOutput_remoteId :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe Prelude.Text)
updateFlowOutput_remoteId :: (Maybe Text -> f (Maybe Text))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_remoteId = (UpdateFlowOutput -> Maybe Text)
-> (UpdateFlowOutput -> Maybe Text -> UpdateFlowOutput)
-> Lens UpdateFlowOutput UpdateFlowOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe Text
remoteId :: Maybe Text
$sel:remoteId:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
remoteId} -> Maybe Text
remoteId) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe Text
a -> UpdateFlowOutput
s {$sel:remoteId:UpdateFlowOutput' :: Maybe Text
remoteId = Maybe Text
a} :: UpdateFlowOutput)

-- | The name of the VPC interface attachment to use for this output.
updateFlowOutput_vpcInterfaceAttachment :: Lens.Lens' UpdateFlowOutput (Prelude.Maybe VpcInterfaceAttachment)
updateFlowOutput_vpcInterfaceAttachment :: (Maybe VpcInterfaceAttachment -> f (Maybe VpcInterfaceAttachment))
-> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_vpcInterfaceAttachment = (UpdateFlowOutput -> Maybe VpcInterfaceAttachment)
-> (UpdateFlowOutput
    -> Maybe VpcInterfaceAttachment -> UpdateFlowOutput)
-> Lens
     UpdateFlowOutput
     UpdateFlowOutput
     (Maybe VpcInterfaceAttachment)
     (Maybe VpcInterfaceAttachment)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Maybe VpcInterfaceAttachment
vpcInterfaceAttachment :: Maybe VpcInterfaceAttachment
$sel:vpcInterfaceAttachment:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe VpcInterfaceAttachment
vpcInterfaceAttachment} -> Maybe VpcInterfaceAttachment
vpcInterfaceAttachment) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Maybe VpcInterfaceAttachment
a -> UpdateFlowOutput
s {$sel:vpcInterfaceAttachment:UpdateFlowOutput' :: Maybe VpcInterfaceAttachment
vpcInterfaceAttachment = Maybe VpcInterfaceAttachment
a} :: UpdateFlowOutput)

-- | The flow that is associated with the output that you want to update.
updateFlowOutput_flowArn :: Lens.Lens' UpdateFlowOutput Prelude.Text
updateFlowOutput_flowArn :: (Text -> f Text) -> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_flowArn = (UpdateFlowOutput -> Text)
-> (UpdateFlowOutput -> Text -> UpdateFlowOutput)
-> Lens UpdateFlowOutput UpdateFlowOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Text
flowArn :: Text
$sel:flowArn:UpdateFlowOutput' :: UpdateFlowOutput -> Text
flowArn} -> Text
flowArn) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Text
a -> UpdateFlowOutput
s {$sel:flowArn:UpdateFlowOutput' :: Text
flowArn = Text
a} :: UpdateFlowOutput)

-- | The ARN of the output that you want to update.
updateFlowOutput_outputArn :: Lens.Lens' UpdateFlowOutput Prelude.Text
updateFlowOutput_outputArn :: (Text -> f Text) -> UpdateFlowOutput -> f UpdateFlowOutput
updateFlowOutput_outputArn = (UpdateFlowOutput -> Text)
-> (UpdateFlowOutput -> Text -> UpdateFlowOutput)
-> Lens UpdateFlowOutput UpdateFlowOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutput' {Text
outputArn :: Text
$sel:outputArn:UpdateFlowOutput' :: UpdateFlowOutput -> Text
outputArn} -> Text
outputArn) (\s :: UpdateFlowOutput
s@UpdateFlowOutput' {} Text
a -> UpdateFlowOutput
s {$sel:outputArn:UpdateFlowOutput' :: Text
outputArn = Text
a} :: UpdateFlowOutput)

instance Core.AWSRequest UpdateFlowOutput where
  type
    AWSResponse UpdateFlowOutput =
      UpdateFlowOutputResponse
  request :: UpdateFlowOutput -> Request UpdateFlowOutput
request = Service -> UpdateFlowOutput -> Request UpdateFlowOutput
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateFlowOutput
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateFlowOutput)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateFlowOutput))
-> Logger
-> Service
-> Proxy UpdateFlowOutput
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateFlowOutput)))
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 Text -> Maybe Output -> Int -> UpdateFlowOutputResponse
UpdateFlowOutputResponse'
            (Maybe Text -> Maybe Output -> Int -> UpdateFlowOutputResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Output -> Int -> UpdateFlowOutputResponse)
forall (f :: * -> *) a b. Functor 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
"flowArn")
            Either String (Maybe Output -> Int -> UpdateFlowOutputResponse)
-> Either String (Maybe Output)
-> Either String (Int -> UpdateFlowOutputResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Output)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"output")
            Either String (Int -> UpdateFlowOutputResponse)
-> Either String Int -> Either String UpdateFlowOutputResponse
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 UpdateFlowOutput

instance Prelude.NFData UpdateFlowOutput

instance Core.ToHeaders UpdateFlowOutput where
  toHeaders :: UpdateFlowOutput -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateFlowOutput -> 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 UpdateFlowOutput where
  toJSON :: UpdateFlowOutput -> Value
toJSON UpdateFlowOutput' {Maybe Int
Maybe [Text]
Maybe [MediaStreamOutputConfigurationRequest]
Maybe Text
Maybe Protocol
Maybe UpdateEncryption
Maybe VpcInterfaceAttachment
Text
outputArn :: Text
flowArn :: Text
vpcInterfaceAttachment :: Maybe VpcInterfaceAttachment
remoteId :: Maybe Text
streamId :: Maybe Text
port :: Maybe Int
description :: Maybe Text
minLatency :: Maybe Int
smoothingLatency :: Maybe Int
cidrAllowList :: Maybe [Text]
encryption :: Maybe UpdateEncryption
protocol :: Maybe Protocol
mediaStreamOutputConfigurations :: Maybe [MediaStreamOutputConfigurationRequest]
maxLatency :: Maybe Int
destination :: Maybe Text
$sel:outputArn:UpdateFlowOutput' :: UpdateFlowOutput -> Text
$sel:flowArn:UpdateFlowOutput' :: UpdateFlowOutput -> Text
$sel:vpcInterfaceAttachment:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe VpcInterfaceAttachment
$sel:remoteId:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
$sel:streamId:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
$sel:port:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
$sel:description:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
$sel:minLatency:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
$sel:smoothingLatency:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
$sel:cidrAllowList:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe [Text]
$sel:encryption:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe UpdateEncryption
$sel:protocol:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Protocol
$sel:mediaStreamOutputConfigurations:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe [MediaStreamOutputConfigurationRequest]
$sel:maxLatency:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
$sel:destination:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"destination" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
destination,
            (Text
"maxLatency" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxLatency,
            (Text
"mediaStreamOutputConfigurations" Text -> [MediaStreamOutputConfigurationRequest] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([MediaStreamOutputConfigurationRequest] -> Pair)
-> Maybe [MediaStreamOutputConfigurationRequest] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MediaStreamOutputConfigurationRequest]
mediaStreamOutputConfigurations,
            (Text
"protocol" Text -> Protocol -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Protocol -> Pair) -> Maybe Protocol -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Protocol
protocol,
            (Text
"encryption" Text -> UpdateEncryption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (UpdateEncryption -> Pair) -> Maybe UpdateEncryption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateEncryption
encryption,
            (Text
"cidrAllowList" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
cidrAllowList,
            (Text
"smoothingLatency" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
smoothingLatency,
            (Text
"minLatency" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
minLatency,
            (Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Text
"port" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
port,
            (Text
"streamId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
streamId,
            (Text
"remoteId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
remoteId,
            (Text
"vpcInterfaceAttachment" Text -> VpcInterfaceAttachment -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (VpcInterfaceAttachment -> Pair)
-> Maybe VpcInterfaceAttachment -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcInterfaceAttachment
vpcInterfaceAttachment
          ]
      )

instance Core.ToPath UpdateFlowOutput where
  toPath :: UpdateFlowOutput -> ByteString
toPath UpdateFlowOutput' {Maybe Int
Maybe [Text]
Maybe [MediaStreamOutputConfigurationRequest]
Maybe Text
Maybe Protocol
Maybe UpdateEncryption
Maybe VpcInterfaceAttachment
Text
outputArn :: Text
flowArn :: Text
vpcInterfaceAttachment :: Maybe VpcInterfaceAttachment
remoteId :: Maybe Text
streamId :: Maybe Text
port :: Maybe Int
description :: Maybe Text
minLatency :: Maybe Int
smoothingLatency :: Maybe Int
cidrAllowList :: Maybe [Text]
encryption :: Maybe UpdateEncryption
protocol :: Maybe Protocol
mediaStreamOutputConfigurations :: Maybe [MediaStreamOutputConfigurationRequest]
maxLatency :: Maybe Int
destination :: Maybe Text
$sel:outputArn:UpdateFlowOutput' :: UpdateFlowOutput -> Text
$sel:flowArn:UpdateFlowOutput' :: UpdateFlowOutput -> Text
$sel:vpcInterfaceAttachment:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe VpcInterfaceAttachment
$sel:remoteId:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
$sel:streamId:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
$sel:port:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
$sel:description:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
$sel:minLatency:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
$sel:smoothingLatency:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
$sel:cidrAllowList:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe [Text]
$sel:encryption:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe UpdateEncryption
$sel:protocol:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Protocol
$sel:mediaStreamOutputConfigurations:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe [MediaStreamOutputConfigurationRequest]
$sel:maxLatency:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Int
$sel:destination:UpdateFlowOutput' :: UpdateFlowOutput -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v1/flows/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
flowArn,
        ByteString
"/outputs/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
outputArn
      ]

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

-- | /See:/ 'newUpdateFlowOutputResponse' smart constructor.
data UpdateFlowOutputResponse = UpdateFlowOutputResponse'
  { -- | The ARN of the flow that is associated with the updated output.
    UpdateFlowOutputResponse -> Maybe Text
flowArn :: Prelude.Maybe Prelude.Text,
    -- | The new settings of the output that you updated.
    UpdateFlowOutputResponse -> Maybe Output
output :: Prelude.Maybe Output,
    -- | The response's http status code.
    UpdateFlowOutputResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateFlowOutputResponse -> UpdateFlowOutputResponse -> Bool
(UpdateFlowOutputResponse -> UpdateFlowOutputResponse -> Bool)
-> (UpdateFlowOutputResponse -> UpdateFlowOutputResponse -> Bool)
-> Eq UpdateFlowOutputResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFlowOutputResponse -> UpdateFlowOutputResponse -> Bool
$c/= :: UpdateFlowOutputResponse -> UpdateFlowOutputResponse -> Bool
== :: UpdateFlowOutputResponse -> UpdateFlowOutputResponse -> Bool
$c== :: UpdateFlowOutputResponse -> UpdateFlowOutputResponse -> Bool
Prelude.Eq, ReadPrec [UpdateFlowOutputResponse]
ReadPrec UpdateFlowOutputResponse
Int -> ReadS UpdateFlowOutputResponse
ReadS [UpdateFlowOutputResponse]
(Int -> ReadS UpdateFlowOutputResponse)
-> ReadS [UpdateFlowOutputResponse]
-> ReadPrec UpdateFlowOutputResponse
-> ReadPrec [UpdateFlowOutputResponse]
-> Read UpdateFlowOutputResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFlowOutputResponse]
$creadListPrec :: ReadPrec [UpdateFlowOutputResponse]
readPrec :: ReadPrec UpdateFlowOutputResponse
$creadPrec :: ReadPrec UpdateFlowOutputResponse
readList :: ReadS [UpdateFlowOutputResponse]
$creadList :: ReadS [UpdateFlowOutputResponse]
readsPrec :: Int -> ReadS UpdateFlowOutputResponse
$creadsPrec :: Int -> ReadS UpdateFlowOutputResponse
Prelude.Read, Int -> UpdateFlowOutputResponse -> ShowS
[UpdateFlowOutputResponse] -> ShowS
UpdateFlowOutputResponse -> String
(Int -> UpdateFlowOutputResponse -> ShowS)
-> (UpdateFlowOutputResponse -> String)
-> ([UpdateFlowOutputResponse] -> ShowS)
-> Show UpdateFlowOutputResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFlowOutputResponse] -> ShowS
$cshowList :: [UpdateFlowOutputResponse] -> ShowS
show :: UpdateFlowOutputResponse -> String
$cshow :: UpdateFlowOutputResponse -> String
showsPrec :: Int -> UpdateFlowOutputResponse -> ShowS
$cshowsPrec :: Int -> UpdateFlowOutputResponse -> ShowS
Prelude.Show, (forall x.
 UpdateFlowOutputResponse -> Rep UpdateFlowOutputResponse x)
-> (forall x.
    Rep UpdateFlowOutputResponse x -> UpdateFlowOutputResponse)
-> Generic UpdateFlowOutputResponse
forall x.
Rep UpdateFlowOutputResponse x -> UpdateFlowOutputResponse
forall x.
UpdateFlowOutputResponse -> Rep UpdateFlowOutputResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFlowOutputResponse x -> UpdateFlowOutputResponse
$cfrom :: forall x.
UpdateFlowOutputResponse -> Rep UpdateFlowOutputResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFlowOutputResponse' 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:
--
-- 'flowArn', 'updateFlowOutputResponse_flowArn' - The ARN of the flow that is associated with the updated output.
--
-- 'output', 'updateFlowOutputResponse_output' - The new settings of the output that you updated.
--
-- 'httpStatus', 'updateFlowOutputResponse_httpStatus' - The response's http status code.
newUpdateFlowOutputResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateFlowOutputResponse
newUpdateFlowOutputResponse :: Int -> UpdateFlowOutputResponse
newUpdateFlowOutputResponse Int
pHttpStatus_ =
  UpdateFlowOutputResponse' :: Maybe Text -> Maybe Output -> Int -> UpdateFlowOutputResponse
UpdateFlowOutputResponse'
    { $sel:flowArn:UpdateFlowOutputResponse' :: Maybe Text
flowArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:output:UpdateFlowOutputResponse' :: Maybe Output
output = Maybe Output
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateFlowOutputResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the flow that is associated with the updated output.
updateFlowOutputResponse_flowArn :: Lens.Lens' UpdateFlowOutputResponse (Prelude.Maybe Prelude.Text)
updateFlowOutputResponse_flowArn :: (Maybe Text -> f (Maybe Text))
-> UpdateFlowOutputResponse -> f UpdateFlowOutputResponse
updateFlowOutputResponse_flowArn = (UpdateFlowOutputResponse -> Maybe Text)
-> (UpdateFlowOutputResponse
    -> Maybe Text -> UpdateFlowOutputResponse)
-> Lens
     UpdateFlowOutputResponse
     UpdateFlowOutputResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutputResponse' {Maybe Text
flowArn :: Maybe Text
$sel:flowArn:UpdateFlowOutputResponse' :: UpdateFlowOutputResponse -> Maybe Text
flowArn} -> Maybe Text
flowArn) (\s :: UpdateFlowOutputResponse
s@UpdateFlowOutputResponse' {} Maybe Text
a -> UpdateFlowOutputResponse
s {$sel:flowArn:UpdateFlowOutputResponse' :: Maybe Text
flowArn = Maybe Text
a} :: UpdateFlowOutputResponse)

-- | The new settings of the output that you updated.
updateFlowOutputResponse_output :: Lens.Lens' UpdateFlowOutputResponse (Prelude.Maybe Output)
updateFlowOutputResponse_output :: (Maybe Output -> f (Maybe Output))
-> UpdateFlowOutputResponse -> f UpdateFlowOutputResponse
updateFlowOutputResponse_output = (UpdateFlowOutputResponse -> Maybe Output)
-> (UpdateFlowOutputResponse
    -> Maybe Output -> UpdateFlowOutputResponse)
-> Lens
     UpdateFlowOutputResponse
     UpdateFlowOutputResponse
     (Maybe Output)
     (Maybe Output)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowOutputResponse' {Maybe Output
output :: Maybe Output
$sel:output:UpdateFlowOutputResponse' :: UpdateFlowOutputResponse -> Maybe Output
output} -> Maybe Output
output) (\s :: UpdateFlowOutputResponse
s@UpdateFlowOutputResponse' {} Maybe Output
a -> UpdateFlowOutputResponse
s {$sel:output:UpdateFlowOutputResponse' :: Maybe Output
output = Maybe Output
a} :: UpdateFlowOutputResponse)

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

instance Prelude.NFData UpdateFlowOutputResponse