{-# 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.UpdateFlowSource
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the source of a flow.
module Amazonka.MediaConnect.UpdateFlowSource
  ( -- * Creating a Request
    UpdateFlowSource (..),
    newUpdateFlowSource,

    -- * Request Lenses
    updateFlowSource_decryption,
    updateFlowSource_description,
    updateFlowSource_entitlementArn,
    updateFlowSource_ingestPort,
    updateFlowSource_maxBitrate,
    updateFlowSource_maxLatency,
    updateFlowSource_maxSyncBuffer,
    updateFlowSource_mediaStreamSourceConfigurations,
    updateFlowSource_minLatency,
    updateFlowSource_protocol,
    updateFlowSource_senderControlPort,
    updateFlowSource_senderIpAddress,
    updateFlowSource_sourceListenerAddress,
    updateFlowSource_sourceListenerPort,
    updateFlowSource_streamId,
    updateFlowSource_vpcInterfaceName,
    updateFlowSource_whitelistCidr,
    updateFlowSource_flowArn,
    updateFlowSource_sourceArn,

    -- * Destructuring the Response
    UpdateFlowSourceResponse (..),
    newUpdateFlowSourceResponse,

    -- * Response Lenses
    updateFlowSourceResponse_flowArn,
    updateFlowSourceResponse_source,
    updateFlowSourceResponse_httpStatus,
  )
where

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

-- | A request to update the source of a flow.
--
-- /See:/ 'newUpdateFlowSource' smart constructor.
data UpdateFlowSource = UpdateFlowSource'
  { -- | The type of encryption used on the content ingested from this source.
    UpdateFlowSource -> Maybe UpdateEncryption
decryption :: Prelude.Maybe UpdateEncryption,
    -- | A description for the source. This value is not used or seen outside of
    -- the current AWS Elemental MediaConnect account.
    UpdateFlowSource -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the entitlement that allows you to subscribe to this flow.
    -- The entitlement is set by the flow originator, and the ARN is generated
    -- as part of the originator\'s flow.
    UpdateFlowSource -> Maybe Text
entitlementArn :: Prelude.Maybe Prelude.Text,
    -- | The port that the flow will be listening on for incoming content.
    UpdateFlowSource -> Maybe Int
ingestPort :: Prelude.Maybe Prelude.Int,
    -- | The smoothing max bitrate for RIST, RTP, and RTP-FEC streams.
    UpdateFlowSource -> Maybe Int
maxBitrate :: Prelude.Maybe Prelude.Int,
    -- | The maximum latency in milliseconds. This parameter applies only to
    -- RIST-based, Zixi-based, and Fujitsu-based streams.
    UpdateFlowSource -> Maybe Int
maxLatency :: Prelude.Maybe Prelude.Int,
    -- | The size of the buffer (in milliseconds) to use to sync incoming source
    -- data.
    UpdateFlowSource -> Maybe Int
maxSyncBuffer :: Prelude.Maybe Prelude.Int,
    -- | The media streams that are associated with the source, and the
    -- parameters for those associations.
    UpdateFlowSource -> Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations :: Prelude.Maybe [MediaStreamSourceConfigurationRequest],
    -- | 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.
    UpdateFlowSource -> Maybe Int
minLatency :: Prelude.Maybe Prelude.Int,
    -- | The protocol that is used by the source.
    UpdateFlowSource -> Maybe Protocol
protocol :: Prelude.Maybe Protocol,
    -- | The port that the flow uses to send outbound requests to initiate
    -- connection with the sender.
    UpdateFlowSource -> Maybe Int
senderControlPort :: Prelude.Maybe Prelude.Int,
    -- | The IP address that the flow communicates with to initiate connection
    -- with the sender.
    UpdateFlowSource -> Maybe Text
senderIpAddress :: Prelude.Maybe Prelude.Text,
    -- | Source IP or domain name for SRT-caller protocol.
    UpdateFlowSource -> Maybe Text
sourceListenerAddress :: Prelude.Maybe Prelude.Text,
    -- | Source port for SRT-caller protocol.
    UpdateFlowSource -> Maybe Int
sourceListenerPort :: Prelude.Maybe Prelude.Int,
    -- | The stream ID that you want to use for this transport. This parameter
    -- applies only to Zixi-based streams.
    UpdateFlowSource -> Maybe Text
streamId :: Prelude.Maybe Prelude.Text,
    -- | The name of the VPC interface to use for this source.
    UpdateFlowSource -> Maybe Text
vpcInterfaceName :: Prelude.Maybe Prelude.Text,
    -- | The range of IP addresses that should be allowed to contribute content
    -- to your source. These IP addresses should be in the form of a Classless
    -- Inter-Domain Routing (CIDR) block; for example, 10.0.0.0\/16.
    UpdateFlowSource -> Maybe Text
whitelistCidr :: Prelude.Maybe Prelude.Text,
    -- | The flow that is associated with the source that you want to update.
    UpdateFlowSource -> Text
flowArn :: Prelude.Text,
    -- | The ARN of the source that you want to update.
    UpdateFlowSource -> Text
sourceArn :: Prelude.Text
  }
  deriving (UpdateFlowSource -> UpdateFlowSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFlowSource -> UpdateFlowSource -> Bool
$c/= :: UpdateFlowSource -> UpdateFlowSource -> Bool
== :: UpdateFlowSource -> UpdateFlowSource -> Bool
$c== :: UpdateFlowSource -> UpdateFlowSource -> Bool
Prelude.Eq, ReadPrec [UpdateFlowSource]
ReadPrec UpdateFlowSource
Int -> ReadS UpdateFlowSource
ReadS [UpdateFlowSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFlowSource]
$creadListPrec :: ReadPrec [UpdateFlowSource]
readPrec :: ReadPrec UpdateFlowSource
$creadPrec :: ReadPrec UpdateFlowSource
readList :: ReadS [UpdateFlowSource]
$creadList :: ReadS [UpdateFlowSource]
readsPrec :: Int -> ReadS UpdateFlowSource
$creadsPrec :: Int -> ReadS UpdateFlowSource
Prelude.Read, Int -> UpdateFlowSource -> ShowS
[UpdateFlowSource] -> ShowS
UpdateFlowSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFlowSource] -> ShowS
$cshowList :: [UpdateFlowSource] -> ShowS
show :: UpdateFlowSource -> String
$cshow :: UpdateFlowSource -> String
showsPrec :: Int -> UpdateFlowSource -> ShowS
$cshowsPrec :: Int -> UpdateFlowSource -> ShowS
Prelude.Show, forall x. Rep UpdateFlowSource x -> UpdateFlowSource
forall x. UpdateFlowSource -> Rep UpdateFlowSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateFlowSource x -> UpdateFlowSource
$cfrom :: forall x. UpdateFlowSource -> Rep UpdateFlowSource x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFlowSource' 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:
--
-- 'decryption', 'updateFlowSource_decryption' - The type of encryption used on the content ingested from this source.
--
-- 'description', 'updateFlowSource_description' - A description for the source. This value is not used or seen outside of
-- the current AWS Elemental MediaConnect account.
--
-- 'entitlementArn', 'updateFlowSource_entitlementArn' - The ARN of the entitlement that allows you to subscribe to this flow.
-- The entitlement is set by the flow originator, and the ARN is generated
-- as part of the originator\'s flow.
--
-- 'ingestPort', 'updateFlowSource_ingestPort' - The port that the flow will be listening on for incoming content.
--
-- 'maxBitrate', 'updateFlowSource_maxBitrate' - The smoothing max bitrate for RIST, RTP, and RTP-FEC streams.
--
-- 'maxLatency', 'updateFlowSource_maxLatency' - The maximum latency in milliseconds. This parameter applies only to
-- RIST-based, Zixi-based, and Fujitsu-based streams.
--
-- 'maxSyncBuffer', 'updateFlowSource_maxSyncBuffer' - The size of the buffer (in milliseconds) to use to sync incoming source
-- data.
--
-- 'mediaStreamSourceConfigurations', 'updateFlowSource_mediaStreamSourceConfigurations' - The media streams that are associated with the source, and the
-- parameters for those associations.
--
-- 'minLatency', 'updateFlowSource_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.
--
-- 'protocol', 'updateFlowSource_protocol' - The protocol that is used by the source.
--
-- 'senderControlPort', 'updateFlowSource_senderControlPort' - The port that the flow uses to send outbound requests to initiate
-- connection with the sender.
--
-- 'senderIpAddress', 'updateFlowSource_senderIpAddress' - The IP address that the flow communicates with to initiate connection
-- with the sender.
--
-- 'sourceListenerAddress', 'updateFlowSource_sourceListenerAddress' - Source IP or domain name for SRT-caller protocol.
--
-- 'sourceListenerPort', 'updateFlowSource_sourceListenerPort' - Source port for SRT-caller protocol.
--
-- 'streamId', 'updateFlowSource_streamId' - The stream ID that you want to use for this transport. This parameter
-- applies only to Zixi-based streams.
--
-- 'vpcInterfaceName', 'updateFlowSource_vpcInterfaceName' - The name of the VPC interface to use for this source.
--
-- 'whitelistCidr', 'updateFlowSource_whitelistCidr' - The range of IP addresses that should be allowed to contribute content
-- to your source. These IP addresses should be in the form of a Classless
-- Inter-Domain Routing (CIDR) block; for example, 10.0.0.0\/16.
--
-- 'flowArn', 'updateFlowSource_flowArn' - The flow that is associated with the source that you want to update.
--
-- 'sourceArn', 'updateFlowSource_sourceArn' - The ARN of the source that you want to update.
newUpdateFlowSource ::
  -- | 'flowArn'
  Prelude.Text ->
  -- | 'sourceArn'
  Prelude.Text ->
  UpdateFlowSource
newUpdateFlowSource :: Text -> Text -> UpdateFlowSource
newUpdateFlowSource Text
pFlowArn_ Text
pSourceArn_ =
  UpdateFlowSource'
    { $sel:decryption:UpdateFlowSource' :: Maybe UpdateEncryption
decryption = forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateFlowSource' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:entitlementArn:UpdateFlowSource' :: Maybe Text
entitlementArn = forall a. Maybe a
Prelude.Nothing,
      $sel:ingestPort:UpdateFlowSource' :: Maybe Int
ingestPort = forall a. Maybe a
Prelude.Nothing,
      $sel:maxBitrate:UpdateFlowSource' :: Maybe Int
maxBitrate = forall a. Maybe a
Prelude.Nothing,
      $sel:maxLatency:UpdateFlowSource' :: Maybe Int
maxLatency = forall a. Maybe a
Prelude.Nothing,
      $sel:maxSyncBuffer:UpdateFlowSource' :: Maybe Int
maxSyncBuffer = forall a. Maybe a
Prelude.Nothing,
      $sel:mediaStreamSourceConfigurations:UpdateFlowSource' :: Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations = forall a. Maybe a
Prelude.Nothing,
      $sel:minLatency:UpdateFlowSource' :: Maybe Int
minLatency = forall a. Maybe a
Prelude.Nothing,
      $sel:protocol:UpdateFlowSource' :: Maybe Protocol
protocol = forall a. Maybe a
Prelude.Nothing,
      $sel:senderControlPort:UpdateFlowSource' :: Maybe Int
senderControlPort = forall a. Maybe a
Prelude.Nothing,
      $sel:senderIpAddress:UpdateFlowSource' :: Maybe Text
senderIpAddress = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceListenerAddress:UpdateFlowSource' :: Maybe Text
sourceListenerAddress = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceListenerPort:UpdateFlowSource' :: Maybe Int
sourceListenerPort = forall a. Maybe a
Prelude.Nothing,
      $sel:streamId:UpdateFlowSource' :: Maybe Text
streamId = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcInterfaceName:UpdateFlowSource' :: Maybe Text
vpcInterfaceName = forall a. Maybe a
Prelude.Nothing,
      $sel:whitelistCidr:UpdateFlowSource' :: Maybe Text
whitelistCidr = forall a. Maybe a
Prelude.Nothing,
      $sel:flowArn:UpdateFlowSource' :: Text
flowArn = Text
pFlowArn_,
      $sel:sourceArn:UpdateFlowSource' :: Text
sourceArn = Text
pSourceArn_
    }

-- | The type of encryption used on the content ingested from this source.
updateFlowSource_decryption :: Lens.Lens' UpdateFlowSource (Prelude.Maybe UpdateEncryption)
updateFlowSource_decryption :: Lens' UpdateFlowSource (Maybe UpdateEncryption)
updateFlowSource_decryption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe UpdateEncryption
decryption :: Maybe UpdateEncryption
$sel:decryption:UpdateFlowSource' :: UpdateFlowSource -> Maybe UpdateEncryption
decryption} -> Maybe UpdateEncryption
decryption) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe UpdateEncryption
a -> UpdateFlowSource
s {$sel:decryption:UpdateFlowSource' :: Maybe UpdateEncryption
decryption = Maybe UpdateEncryption
a} :: UpdateFlowSource)

-- | A description for the source. This value is not used or seen outside of
-- the current AWS Elemental MediaConnect account.
updateFlowSource_description :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Text)
updateFlowSource_description :: Lens' UpdateFlowSource (Maybe Text)
updateFlowSource_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Text
description :: Maybe Text
$sel:description:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Text
a -> UpdateFlowSource
s {$sel:description:UpdateFlowSource' :: Maybe Text
description = Maybe Text
a} :: UpdateFlowSource)

-- | The ARN of the entitlement that allows you to subscribe to this flow.
-- The entitlement is set by the flow originator, and the ARN is generated
-- as part of the originator\'s flow.
updateFlowSource_entitlementArn :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Text)
updateFlowSource_entitlementArn :: Lens' UpdateFlowSource (Maybe Text)
updateFlowSource_entitlementArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Text
entitlementArn :: Maybe Text
$sel:entitlementArn:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
entitlementArn} -> Maybe Text
entitlementArn) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Text
a -> UpdateFlowSource
s {$sel:entitlementArn:UpdateFlowSource' :: Maybe Text
entitlementArn = Maybe Text
a} :: UpdateFlowSource)

-- | The port that the flow will be listening on for incoming content.
updateFlowSource_ingestPort :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Int)
updateFlowSource_ingestPort :: Lens' UpdateFlowSource (Maybe Int)
updateFlowSource_ingestPort = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Int
ingestPort :: Maybe Int
$sel:ingestPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
ingestPort} -> Maybe Int
ingestPort) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Int
a -> UpdateFlowSource
s {$sel:ingestPort:UpdateFlowSource' :: Maybe Int
ingestPort = Maybe Int
a} :: UpdateFlowSource)

-- | The smoothing max bitrate for RIST, RTP, and RTP-FEC streams.
updateFlowSource_maxBitrate :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Int)
updateFlowSource_maxBitrate :: Lens' UpdateFlowSource (Maybe Int)
updateFlowSource_maxBitrate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Int
maxBitrate :: Maybe Int
$sel:maxBitrate:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
maxBitrate} -> Maybe Int
maxBitrate) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Int
a -> UpdateFlowSource
s {$sel:maxBitrate:UpdateFlowSource' :: Maybe Int
maxBitrate = Maybe Int
a} :: UpdateFlowSource)

-- | The maximum latency in milliseconds. This parameter applies only to
-- RIST-based, Zixi-based, and Fujitsu-based streams.
updateFlowSource_maxLatency :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Int)
updateFlowSource_maxLatency :: Lens' UpdateFlowSource (Maybe Int)
updateFlowSource_maxLatency = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Int
maxLatency :: Maybe Int
$sel:maxLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
maxLatency} -> Maybe Int
maxLatency) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Int
a -> UpdateFlowSource
s {$sel:maxLatency:UpdateFlowSource' :: Maybe Int
maxLatency = Maybe Int
a} :: UpdateFlowSource)

-- | The size of the buffer (in milliseconds) to use to sync incoming source
-- data.
updateFlowSource_maxSyncBuffer :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Int)
updateFlowSource_maxSyncBuffer :: Lens' UpdateFlowSource (Maybe Int)
updateFlowSource_maxSyncBuffer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Int
maxSyncBuffer :: Maybe Int
$sel:maxSyncBuffer:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
maxSyncBuffer} -> Maybe Int
maxSyncBuffer) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Int
a -> UpdateFlowSource
s {$sel:maxSyncBuffer:UpdateFlowSource' :: Maybe Int
maxSyncBuffer = Maybe Int
a} :: UpdateFlowSource)

-- | The media streams that are associated with the source, and the
-- parameters for those associations.
updateFlowSource_mediaStreamSourceConfigurations :: Lens.Lens' UpdateFlowSource (Prelude.Maybe [MediaStreamSourceConfigurationRequest])
updateFlowSource_mediaStreamSourceConfigurations :: Lens'
  UpdateFlowSource (Maybe [MediaStreamSourceConfigurationRequest])
updateFlowSource_mediaStreamSourceConfigurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations :: Maybe [MediaStreamSourceConfigurationRequest]
$sel:mediaStreamSourceConfigurations:UpdateFlowSource' :: UpdateFlowSource -> Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations} -> Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe [MediaStreamSourceConfigurationRequest]
a -> UpdateFlowSource
s {$sel:mediaStreamSourceConfigurations:UpdateFlowSource' :: Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations = Maybe [MediaStreamSourceConfigurationRequest]
a} :: UpdateFlowSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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.
updateFlowSource_minLatency :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Int)
updateFlowSource_minLatency :: Lens' UpdateFlowSource (Maybe Int)
updateFlowSource_minLatency = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Int
minLatency :: Maybe Int
$sel:minLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
minLatency} -> Maybe Int
minLatency) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Int
a -> UpdateFlowSource
s {$sel:minLatency:UpdateFlowSource' :: Maybe Int
minLatency = Maybe Int
a} :: UpdateFlowSource)

-- | The protocol that is used by the source.
updateFlowSource_protocol :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Protocol)
updateFlowSource_protocol :: Lens' UpdateFlowSource (Maybe Protocol)
updateFlowSource_protocol = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Protocol
protocol :: Maybe Protocol
$sel:protocol:UpdateFlowSource' :: UpdateFlowSource -> Maybe Protocol
protocol} -> Maybe Protocol
protocol) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Protocol
a -> UpdateFlowSource
s {$sel:protocol:UpdateFlowSource' :: Maybe Protocol
protocol = Maybe Protocol
a} :: UpdateFlowSource)

-- | The port that the flow uses to send outbound requests to initiate
-- connection with the sender.
updateFlowSource_senderControlPort :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Int)
updateFlowSource_senderControlPort :: Lens' UpdateFlowSource (Maybe Int)
updateFlowSource_senderControlPort = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Int
senderControlPort :: Maybe Int
$sel:senderControlPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
senderControlPort} -> Maybe Int
senderControlPort) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Int
a -> UpdateFlowSource
s {$sel:senderControlPort:UpdateFlowSource' :: Maybe Int
senderControlPort = Maybe Int
a} :: UpdateFlowSource)

-- | The IP address that the flow communicates with to initiate connection
-- with the sender.
updateFlowSource_senderIpAddress :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Text)
updateFlowSource_senderIpAddress :: Lens' UpdateFlowSource (Maybe Text)
updateFlowSource_senderIpAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Text
senderIpAddress :: Maybe Text
$sel:senderIpAddress:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
senderIpAddress} -> Maybe Text
senderIpAddress) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Text
a -> UpdateFlowSource
s {$sel:senderIpAddress:UpdateFlowSource' :: Maybe Text
senderIpAddress = Maybe Text
a} :: UpdateFlowSource)

-- | Source IP or domain name for SRT-caller protocol.
updateFlowSource_sourceListenerAddress :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Text)
updateFlowSource_sourceListenerAddress :: Lens' UpdateFlowSource (Maybe Text)
updateFlowSource_sourceListenerAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Text
sourceListenerAddress :: Maybe Text
$sel:sourceListenerAddress:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
sourceListenerAddress} -> Maybe Text
sourceListenerAddress) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Text
a -> UpdateFlowSource
s {$sel:sourceListenerAddress:UpdateFlowSource' :: Maybe Text
sourceListenerAddress = Maybe Text
a} :: UpdateFlowSource)

-- | Source port for SRT-caller protocol.
updateFlowSource_sourceListenerPort :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Int)
updateFlowSource_sourceListenerPort :: Lens' UpdateFlowSource (Maybe Int)
updateFlowSource_sourceListenerPort = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Int
sourceListenerPort :: Maybe Int
$sel:sourceListenerPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
sourceListenerPort} -> Maybe Int
sourceListenerPort) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Int
a -> UpdateFlowSource
s {$sel:sourceListenerPort:UpdateFlowSource' :: Maybe Int
sourceListenerPort = Maybe Int
a} :: UpdateFlowSource)

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

-- | The name of the VPC interface to use for this source.
updateFlowSource_vpcInterfaceName :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Text)
updateFlowSource_vpcInterfaceName :: Lens' UpdateFlowSource (Maybe Text)
updateFlowSource_vpcInterfaceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Text
vpcInterfaceName :: Maybe Text
$sel:vpcInterfaceName:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
vpcInterfaceName} -> Maybe Text
vpcInterfaceName) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Text
a -> UpdateFlowSource
s {$sel:vpcInterfaceName:UpdateFlowSource' :: Maybe Text
vpcInterfaceName = Maybe Text
a} :: UpdateFlowSource)

-- | The range of IP addresses that should be allowed to contribute content
-- to your source. These IP addresses should be in the form of a Classless
-- Inter-Domain Routing (CIDR) block; for example, 10.0.0.0\/16.
updateFlowSource_whitelistCidr :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Text)
updateFlowSource_whitelistCidr :: Lens' UpdateFlowSource (Maybe Text)
updateFlowSource_whitelistCidr = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Maybe Text
whitelistCidr :: Maybe Text
$sel:whitelistCidr:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
whitelistCidr} -> Maybe Text
whitelistCidr) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Maybe Text
a -> UpdateFlowSource
s {$sel:whitelistCidr:UpdateFlowSource' :: Maybe Text
whitelistCidr = Maybe Text
a} :: UpdateFlowSource)

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

-- | The ARN of the source that you want to update.
updateFlowSource_sourceArn :: Lens.Lens' UpdateFlowSource Prelude.Text
updateFlowSource_sourceArn :: Lens' UpdateFlowSource Text
updateFlowSource_sourceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSource' {Text
sourceArn :: Text
$sel:sourceArn:UpdateFlowSource' :: UpdateFlowSource -> Text
sourceArn} -> Text
sourceArn) (\s :: UpdateFlowSource
s@UpdateFlowSource' {} Text
a -> UpdateFlowSource
s {$sel:sourceArn:UpdateFlowSource' :: Text
sourceArn = Text
a} :: UpdateFlowSource)

instance Core.AWSRequest UpdateFlowSource where
  type
    AWSResponse UpdateFlowSource =
      UpdateFlowSourceResponse
  request :: (Service -> Service)
-> UpdateFlowSource -> Request UpdateFlowSource
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateFlowSource
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateFlowSource)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Maybe Source -> Int -> UpdateFlowSourceResponse
UpdateFlowSourceResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"flowArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"source")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateFlowSource where
  hashWithSalt :: Int -> UpdateFlowSource -> Int
hashWithSalt Int
_salt UpdateFlowSource' {Maybe Int
Maybe [MediaStreamSourceConfigurationRequest]
Maybe Text
Maybe Protocol
Maybe UpdateEncryption
Text
sourceArn :: Text
flowArn :: Text
whitelistCidr :: Maybe Text
vpcInterfaceName :: Maybe Text
streamId :: Maybe Text
sourceListenerPort :: Maybe Int
sourceListenerAddress :: Maybe Text
senderIpAddress :: Maybe Text
senderControlPort :: Maybe Int
protocol :: Maybe Protocol
minLatency :: Maybe Int
mediaStreamSourceConfigurations :: Maybe [MediaStreamSourceConfigurationRequest]
maxSyncBuffer :: Maybe Int
maxLatency :: Maybe Int
maxBitrate :: Maybe Int
ingestPort :: Maybe Int
entitlementArn :: Maybe Text
description :: Maybe Text
decryption :: Maybe UpdateEncryption
$sel:sourceArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:flowArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:whitelistCidr:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:vpcInterfaceName:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:streamId:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:sourceListenerPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:sourceListenerAddress:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:senderIpAddress:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:senderControlPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:protocol:UpdateFlowSource' :: UpdateFlowSource -> Maybe Protocol
$sel:minLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:mediaStreamSourceConfigurations:UpdateFlowSource' :: UpdateFlowSource -> Maybe [MediaStreamSourceConfigurationRequest]
$sel:maxSyncBuffer:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:maxLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:maxBitrate:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:ingestPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:entitlementArn:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:description:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:decryption:UpdateFlowSource' :: UpdateFlowSource -> Maybe UpdateEncryption
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UpdateEncryption
decryption
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
entitlementArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
ingestPort
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxBitrate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxLatency
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxSyncBuffer
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
minLatency
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Protocol
protocol
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
senderControlPort
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
senderIpAddress
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceListenerAddress
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
sourceListenerPort
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcInterfaceName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
whitelistCidr
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
flowArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sourceArn

instance Prelude.NFData UpdateFlowSource where
  rnf :: UpdateFlowSource -> ()
rnf UpdateFlowSource' {Maybe Int
Maybe [MediaStreamSourceConfigurationRequest]
Maybe Text
Maybe Protocol
Maybe UpdateEncryption
Text
sourceArn :: Text
flowArn :: Text
whitelistCidr :: Maybe Text
vpcInterfaceName :: Maybe Text
streamId :: Maybe Text
sourceListenerPort :: Maybe Int
sourceListenerAddress :: Maybe Text
senderIpAddress :: Maybe Text
senderControlPort :: Maybe Int
protocol :: Maybe Protocol
minLatency :: Maybe Int
mediaStreamSourceConfigurations :: Maybe [MediaStreamSourceConfigurationRequest]
maxSyncBuffer :: Maybe Int
maxLatency :: Maybe Int
maxBitrate :: Maybe Int
ingestPort :: Maybe Int
entitlementArn :: Maybe Text
description :: Maybe Text
decryption :: Maybe UpdateEncryption
$sel:sourceArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:flowArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:whitelistCidr:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:vpcInterfaceName:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:streamId:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:sourceListenerPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:sourceListenerAddress:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:senderIpAddress:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:senderControlPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:protocol:UpdateFlowSource' :: UpdateFlowSource -> Maybe Protocol
$sel:minLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:mediaStreamSourceConfigurations:UpdateFlowSource' :: UpdateFlowSource -> Maybe [MediaStreamSourceConfigurationRequest]
$sel:maxSyncBuffer:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:maxLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:maxBitrate:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:ingestPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:entitlementArn:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:description:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:decryption:UpdateFlowSource' :: UpdateFlowSource -> Maybe UpdateEncryption
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe UpdateEncryption
decryption
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
entitlementArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
ingestPort
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxBitrate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxLatency
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxSyncBuffer
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
minLatency
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Protocol
protocol
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
senderControlPort
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
senderIpAddress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceListenerAddress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
sourceListenerPort
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcInterfaceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
whitelistCidr
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
flowArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sourceArn

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

instance Data.ToJSON UpdateFlowSource where
  toJSON :: UpdateFlowSource -> Value
toJSON UpdateFlowSource' {Maybe Int
Maybe [MediaStreamSourceConfigurationRequest]
Maybe Text
Maybe Protocol
Maybe UpdateEncryption
Text
sourceArn :: Text
flowArn :: Text
whitelistCidr :: Maybe Text
vpcInterfaceName :: Maybe Text
streamId :: Maybe Text
sourceListenerPort :: Maybe Int
sourceListenerAddress :: Maybe Text
senderIpAddress :: Maybe Text
senderControlPort :: Maybe Int
protocol :: Maybe Protocol
minLatency :: Maybe Int
mediaStreamSourceConfigurations :: Maybe [MediaStreamSourceConfigurationRequest]
maxSyncBuffer :: Maybe Int
maxLatency :: Maybe Int
maxBitrate :: Maybe Int
ingestPort :: Maybe Int
entitlementArn :: Maybe Text
description :: Maybe Text
decryption :: Maybe UpdateEncryption
$sel:sourceArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:flowArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:whitelistCidr:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:vpcInterfaceName:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:streamId:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:sourceListenerPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:sourceListenerAddress:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:senderIpAddress:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:senderControlPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:protocol:UpdateFlowSource' :: UpdateFlowSource -> Maybe Protocol
$sel:minLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:mediaStreamSourceConfigurations:UpdateFlowSource' :: UpdateFlowSource -> Maybe [MediaStreamSourceConfigurationRequest]
$sel:maxSyncBuffer:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:maxLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:maxBitrate:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:ingestPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:entitlementArn:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:description:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:decryption:UpdateFlowSource' :: UpdateFlowSource -> Maybe UpdateEncryption
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"decryption" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateEncryption
decryption,
            (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"entitlementArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
entitlementArn,
            (Key
"ingestPort" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
ingestPort,
            (Key
"maxBitrate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxBitrate,
            (Key
"maxLatency" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxLatency,
            (Key
"maxSyncBuffer" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxSyncBuffer,
            (Key
"mediaStreamSourceConfigurations" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations,
            (Key
"minLatency" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
minLatency,
            (Key
"protocol" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Protocol
protocol,
            (Key
"senderControlPort" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
senderControlPort,
            (Key
"senderIpAddress" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
senderIpAddress,
            (Key
"sourceListenerAddress" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceListenerAddress,
            (Key
"sourceListenerPort" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
sourceListenerPort,
            (Key
"streamId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
streamId,
            (Key
"vpcInterfaceName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
vpcInterfaceName,
            (Key
"whitelistCidr" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
whitelistCidr
          ]
      )

instance Data.ToPath UpdateFlowSource where
  toPath :: UpdateFlowSource -> ByteString
toPath UpdateFlowSource' {Maybe Int
Maybe [MediaStreamSourceConfigurationRequest]
Maybe Text
Maybe Protocol
Maybe UpdateEncryption
Text
sourceArn :: Text
flowArn :: Text
whitelistCidr :: Maybe Text
vpcInterfaceName :: Maybe Text
streamId :: Maybe Text
sourceListenerPort :: Maybe Int
sourceListenerAddress :: Maybe Text
senderIpAddress :: Maybe Text
senderControlPort :: Maybe Int
protocol :: Maybe Protocol
minLatency :: Maybe Int
mediaStreamSourceConfigurations :: Maybe [MediaStreamSourceConfigurationRequest]
maxSyncBuffer :: Maybe Int
maxLatency :: Maybe Int
maxBitrate :: Maybe Int
ingestPort :: Maybe Int
entitlementArn :: Maybe Text
description :: Maybe Text
decryption :: Maybe UpdateEncryption
$sel:sourceArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:flowArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:whitelistCidr:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:vpcInterfaceName:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:streamId:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:sourceListenerPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:sourceListenerAddress:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:senderIpAddress:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:senderControlPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:protocol:UpdateFlowSource' :: UpdateFlowSource -> Maybe Protocol
$sel:minLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:mediaStreamSourceConfigurations:UpdateFlowSource' :: UpdateFlowSource -> Maybe [MediaStreamSourceConfigurationRequest]
$sel:maxSyncBuffer:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:maxLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:maxBitrate:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:ingestPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:entitlementArn:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:description:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:decryption:UpdateFlowSource' :: UpdateFlowSource -> Maybe UpdateEncryption
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v1/flows/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
flowArn,
        ByteString
"/source/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
sourceArn
      ]

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

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

-- |
-- Create a value of 'UpdateFlowSourceResponse' 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', 'updateFlowSourceResponse_flowArn' - The ARN of the flow that you want to update.
--
-- 'source', 'updateFlowSourceResponse_source' - The settings for the source of the flow.
--
-- 'httpStatus', 'updateFlowSourceResponse_httpStatus' - The response's http status code.
newUpdateFlowSourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateFlowSourceResponse
newUpdateFlowSourceResponse :: Int -> UpdateFlowSourceResponse
newUpdateFlowSourceResponse Int
pHttpStatus_ =
  UpdateFlowSourceResponse'
    { $sel:flowArn:UpdateFlowSourceResponse' :: Maybe Text
flowArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:source:UpdateFlowSourceResponse' :: Maybe Source
source = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateFlowSourceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the flow that you want to update.
updateFlowSourceResponse_flowArn :: Lens.Lens' UpdateFlowSourceResponse (Prelude.Maybe Prelude.Text)
updateFlowSourceResponse_flowArn :: Lens' UpdateFlowSourceResponse (Maybe Text)
updateFlowSourceResponse_flowArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSourceResponse' {Maybe Text
flowArn :: Maybe Text
$sel:flowArn:UpdateFlowSourceResponse' :: UpdateFlowSourceResponse -> Maybe Text
flowArn} -> Maybe Text
flowArn) (\s :: UpdateFlowSourceResponse
s@UpdateFlowSourceResponse' {} Maybe Text
a -> UpdateFlowSourceResponse
s {$sel:flowArn:UpdateFlowSourceResponse' :: Maybe Text
flowArn = Maybe Text
a} :: UpdateFlowSourceResponse)

-- | The settings for the source of the flow.
updateFlowSourceResponse_source :: Lens.Lens' UpdateFlowSourceResponse (Prelude.Maybe Source)
updateFlowSourceResponse_source :: Lens' UpdateFlowSourceResponse (Maybe Source)
updateFlowSourceResponse_source = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFlowSourceResponse' {Maybe Source
source :: Maybe Source
$sel:source:UpdateFlowSourceResponse' :: UpdateFlowSourceResponse -> Maybe Source
source} -> Maybe Source
source) (\s :: UpdateFlowSourceResponse
s@UpdateFlowSourceResponse' {} Maybe Source
a -> UpdateFlowSourceResponse
s {$sel:source:UpdateFlowSourceResponse' :: Maybe Source
source = Maybe Source
a} :: UpdateFlowSourceResponse)

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

instance Prelude.NFData UpdateFlowSourceResponse where
  rnf :: UpdateFlowSourceResponse -> ()
rnf UpdateFlowSourceResponse' {Int
Maybe Text
Maybe Source
httpStatus :: Int
source :: Maybe Source
flowArn :: Maybe Text
$sel:httpStatus:UpdateFlowSourceResponse' :: UpdateFlowSourceResponse -> Int
$sel:source:UpdateFlowSourceResponse' :: UpdateFlowSourceResponse -> Maybe Source
$sel:flowArn:UpdateFlowSourceResponse' :: UpdateFlowSourceResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
flowArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Source
source
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus