{-# 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-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 the source of a flow.
module Amazonka.MediaConnect.UpdateFlowSource
  ( -- * Creating a Request
    UpdateFlowSource (..),
    newUpdateFlowSource,

    -- * Request Lenses
    updateFlowSource_entitlementArn,
    updateFlowSource_maxLatency,
    updateFlowSource_vpcInterfaceName,
    updateFlowSource_decryption,
    updateFlowSource_maxSyncBuffer,
    updateFlowSource_protocol,
    updateFlowSource_minLatency,
    updateFlowSource_ingestPort,
    updateFlowSource_description,
    updateFlowSource_mediaStreamSourceConfigurations,
    updateFlowSource_whitelistCidr,
    updateFlowSource_maxBitrate,
    updateFlowSource_streamId,
    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.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

-- | A request to update the source of a flow.
--
-- /See:/ 'newUpdateFlowSource' smart constructor.
data UpdateFlowSource = 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 -> Maybe Text
entitlementArn :: Prelude.Maybe Prelude.Text,
    -- | The maximum latency in milliseconds. This parameter applies only to
    -- RIST-based and Zixi-based streams.
    UpdateFlowSource -> Maybe Int
maxLatency :: Prelude.Maybe Prelude.Int,
    -- | The name of the VPC interface to use for this source.
    UpdateFlowSource -> Maybe Text
vpcInterfaceName :: Prelude.Maybe Prelude.Text,
    -- | The type of encryption used on the content ingested from this source.
    UpdateFlowSource -> Maybe UpdateEncryption
decryption :: Prelude.Maybe UpdateEncryption,
    -- | The size of the buffer (in milliseconds) to use to sync incoming source
    -- data.
    UpdateFlowSource -> Maybe Int
maxSyncBuffer :: Prelude.Maybe Prelude.Int,
    -- | The protocol that is used by the source.
    UpdateFlowSource -> Maybe Protocol
protocol :: Prelude.Maybe Protocol,
    -- | 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 port that the flow will be listening on for incoming content.
    UpdateFlowSource -> Maybe Int
ingestPort :: Prelude.Maybe Prelude.Int,
    -- | 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 media streams that are associated with the source, and the
    -- parameters for those associations.
    UpdateFlowSource -> Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations :: Prelude.Maybe [MediaStreamSourceConfigurationRequest],
    -- | 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 smoothing max bitrate for RIST, RTP, and RTP-FEC streams.
    UpdateFlowSource -> Maybe Int
maxBitrate :: 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 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
(UpdateFlowSource -> UpdateFlowSource -> Bool)
-> (UpdateFlowSource -> UpdateFlowSource -> Bool)
-> Eq UpdateFlowSource
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]
(Int -> ReadS UpdateFlowSource)
-> ReadS [UpdateFlowSource]
-> ReadPrec UpdateFlowSource
-> ReadPrec [UpdateFlowSource]
-> Read 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
(Int -> UpdateFlowSource -> ShowS)
-> (UpdateFlowSource -> String)
-> ([UpdateFlowSource] -> ShowS)
-> Show UpdateFlowSource
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. UpdateFlowSource -> Rep UpdateFlowSource x)
-> (forall x. Rep UpdateFlowSource x -> UpdateFlowSource)
-> Generic UpdateFlowSource
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:
--
-- '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.
--
-- 'maxLatency', 'updateFlowSource_maxLatency' - The maximum latency in milliseconds. This parameter applies only to
-- RIST-based and Zixi-based streams.
--
-- 'vpcInterfaceName', 'updateFlowSource_vpcInterfaceName' - The name of the VPC interface to use for this source.
--
-- 'decryption', 'updateFlowSource_decryption' - The type of encryption used on the content ingested from this source.
--
-- 'maxSyncBuffer', 'updateFlowSource_maxSyncBuffer' - The size of the buffer (in milliseconds) to use to sync incoming source
-- data.
--
-- 'protocol', 'updateFlowSource_protocol' - The protocol that is used by the source.
--
-- '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.
--
-- 'ingestPort', 'updateFlowSource_ingestPort' - The port that the flow will be listening on for incoming content.
--
-- 'description', 'updateFlowSource_description' - A description for the source. This value is not used or seen outside of
-- the current AWS Elemental MediaConnect account.
--
-- 'mediaStreamSourceConfigurations', 'updateFlowSource_mediaStreamSourceConfigurations' - The media streams that are associated with the source, and the
-- parameters for those associations.
--
-- '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.
--
-- 'maxBitrate', 'updateFlowSource_maxBitrate' - The smoothing max bitrate for RIST, RTP, and RTP-FEC streams.
--
-- 'streamId', 'updateFlowSource_streamId' - The stream ID that you want to use for this transport. This parameter
-- applies only to Zixi-based streams.
--
-- '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' :: Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe UpdateEncryption
-> Maybe Int
-> Maybe Protocol
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe [MediaStreamSourceConfigurationRequest]
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Text
-> Text
-> UpdateFlowSource
UpdateFlowSource'
    { $sel:entitlementArn:UpdateFlowSource' :: Maybe Text
entitlementArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxLatency:UpdateFlowSource' :: Maybe Int
maxLatency = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcInterfaceName:UpdateFlowSource' :: Maybe Text
vpcInterfaceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:decryption:UpdateFlowSource' :: Maybe UpdateEncryption
decryption = Maybe UpdateEncryption
forall a. Maybe a
Prelude.Nothing,
      $sel:maxSyncBuffer:UpdateFlowSource' :: Maybe Int
maxSyncBuffer = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:protocol:UpdateFlowSource' :: Maybe Protocol
protocol = Maybe Protocol
forall a. Maybe a
Prelude.Nothing,
      $sel:minLatency:UpdateFlowSource' :: Maybe Int
minLatency = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:ingestPort:UpdateFlowSource' :: Maybe Int
ingestPort = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateFlowSource' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mediaStreamSourceConfigurations:UpdateFlowSource' :: Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations = Maybe [MediaStreamSourceConfigurationRequest]
forall a. Maybe a
Prelude.Nothing,
      $sel:whitelistCidr:UpdateFlowSource' :: Maybe Text
whitelistCidr = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxBitrate:UpdateFlowSource' :: Maybe Int
maxBitrate = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:streamId:UpdateFlowSource' :: Maybe Text
streamId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:flowArn:UpdateFlowSource' :: Text
flowArn = Text
pFlowArn_,
      $sel:sourceArn:UpdateFlowSource' :: Text
sourceArn = Text
pSourceArn_
    }

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_entitlementArn = (UpdateFlowSource -> Maybe Text)
-> (UpdateFlowSource -> Maybe Text -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource (Maybe Text) (Maybe Text)
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 maximum latency in milliseconds. This parameter applies only to
-- RIST-based and Zixi-based streams.
updateFlowSource_maxLatency :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Int)
updateFlowSource_maxLatency :: (Maybe Int -> f (Maybe Int))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_maxLatency = (UpdateFlowSource -> Maybe Int)
-> (UpdateFlowSource -> Maybe Int -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource (Maybe Int) (Maybe Int)
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 name of the VPC interface to use for this source.
updateFlowSource_vpcInterfaceName :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Text)
updateFlowSource_vpcInterfaceName :: (Maybe Text -> f (Maybe Text))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_vpcInterfaceName = (UpdateFlowSource -> Maybe Text)
-> (UpdateFlowSource -> Maybe Text -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource (Maybe Text) (Maybe Text)
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 type of encryption used on the content ingested from this source.
updateFlowSource_decryption :: Lens.Lens' UpdateFlowSource (Prelude.Maybe UpdateEncryption)
updateFlowSource_decryption :: (Maybe UpdateEncryption -> f (Maybe UpdateEncryption))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_decryption = (UpdateFlowSource -> Maybe UpdateEncryption)
-> (UpdateFlowSource -> Maybe UpdateEncryption -> UpdateFlowSource)
-> Lens
     UpdateFlowSource
     UpdateFlowSource
     (Maybe UpdateEncryption)
     (Maybe UpdateEncryption)
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)

-- | 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 :: (Maybe Int -> f (Maybe Int))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_maxSyncBuffer = (UpdateFlowSource -> Maybe Int)
-> (UpdateFlowSource -> Maybe Int -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource (Maybe Int) (Maybe Int)
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 protocol that is used by the source.
updateFlowSource_protocol :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Protocol)
updateFlowSource_protocol :: (Maybe Protocol -> f (Maybe Protocol))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_protocol = (UpdateFlowSource -> Maybe Protocol)
-> (UpdateFlowSource -> Maybe Protocol -> UpdateFlowSource)
-> Lens
     UpdateFlowSource UpdateFlowSource (Maybe Protocol) (Maybe 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 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 :: (Maybe Int -> f (Maybe Int))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_minLatency = (UpdateFlowSource -> Maybe Int)
-> (UpdateFlowSource -> Maybe Int -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource (Maybe Int) (Maybe Int)
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 port that the flow will be listening on for incoming content.
updateFlowSource_ingestPort :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Int)
updateFlowSource_ingestPort :: (Maybe Int -> f (Maybe Int))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_ingestPort = (UpdateFlowSource -> Maybe Int)
-> (UpdateFlowSource -> Maybe Int -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource (Maybe Int) (Maybe Int)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_description = (UpdateFlowSource -> Maybe Text)
-> (UpdateFlowSource -> Maybe Text -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource (Maybe Text) (Maybe Text)
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 media streams that are associated with the source, and the
-- parameters for those associations.
updateFlowSource_mediaStreamSourceConfigurations :: Lens.Lens' UpdateFlowSource (Prelude.Maybe [MediaStreamSourceConfigurationRequest])
updateFlowSource_mediaStreamSourceConfigurations :: (Maybe [MediaStreamSourceConfigurationRequest]
 -> f (Maybe [MediaStreamSourceConfigurationRequest]))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_mediaStreamSourceConfigurations = (UpdateFlowSource -> Maybe [MediaStreamSourceConfigurationRequest])
-> (UpdateFlowSource
    -> Maybe [MediaStreamSourceConfigurationRequest]
    -> UpdateFlowSource)
-> Lens
     UpdateFlowSource
     UpdateFlowSource
     (Maybe [MediaStreamSourceConfigurationRequest])
     (Maybe [MediaStreamSourceConfigurationRequest])
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) ((Maybe [MediaStreamSourceConfigurationRequest]
  -> f (Maybe [MediaStreamSourceConfigurationRequest]))
 -> UpdateFlowSource -> f UpdateFlowSource)
-> ((Maybe [MediaStreamSourceConfigurationRequest]
     -> f (Maybe [MediaStreamSourceConfigurationRequest]))
    -> Maybe [MediaStreamSourceConfigurationRequest]
    -> f (Maybe [MediaStreamSourceConfigurationRequest]))
-> (Maybe [MediaStreamSourceConfigurationRequest]
    -> f (Maybe [MediaStreamSourceConfigurationRequest]))
-> UpdateFlowSource
-> f UpdateFlowSource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MediaStreamSourceConfigurationRequest]
  [MediaStreamSourceConfigurationRequest]
  [MediaStreamSourceConfigurationRequest]
  [MediaStreamSourceConfigurationRequest]
-> Iso
     (Maybe [MediaStreamSourceConfigurationRequest])
     (Maybe [MediaStreamSourceConfigurationRequest])
     (Maybe [MediaStreamSourceConfigurationRequest])
     (Maybe [MediaStreamSourceConfigurationRequest])
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
  [MediaStreamSourceConfigurationRequest]
  [MediaStreamSourceConfigurationRequest]
  [MediaStreamSourceConfigurationRequest]
  [MediaStreamSourceConfigurationRequest]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_whitelistCidr = (UpdateFlowSource -> Maybe Text)
-> (UpdateFlowSource -> Maybe Text -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource (Maybe Text) (Maybe Text)
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 smoothing max bitrate for RIST, RTP, and RTP-FEC streams.
updateFlowSource_maxBitrate :: Lens.Lens' UpdateFlowSource (Prelude.Maybe Prelude.Int)
updateFlowSource_maxBitrate :: (Maybe Int -> f (Maybe Int))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_maxBitrate = (UpdateFlowSource -> Maybe Int)
-> (UpdateFlowSource -> Maybe Int -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource (Maybe Int) (Maybe Int)
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 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_streamId = (UpdateFlowSource -> Maybe Text)
-> (UpdateFlowSource -> Maybe Text -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource (Maybe Text) (Maybe Text)
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 flow that is associated with the source that you want to update.
updateFlowSource_flowArn :: Lens.Lens' UpdateFlowSource Prelude.Text
updateFlowSource_flowArn :: (Text -> f Text) -> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_flowArn = (UpdateFlowSource -> Text)
-> (UpdateFlowSource -> Text -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource Text Text
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 :: (Text -> f Text) -> UpdateFlowSource -> f UpdateFlowSource
updateFlowSource_sourceArn = (UpdateFlowSource -> Text)
-> (UpdateFlowSource -> Text -> UpdateFlowSource)
-> Lens UpdateFlowSource UpdateFlowSource Text Text
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 :: UpdateFlowSource -> Request UpdateFlowSource
request = Service -> UpdateFlowSource -> Request UpdateFlowSource
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateFlowSource
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateFlowSource)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateFlowSource))
-> Logger
-> Service
-> Proxy UpdateFlowSource
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateFlowSource)))
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 Source -> Int -> UpdateFlowSourceResponse
UpdateFlowSourceResponse'
            (Maybe Text -> Maybe Source -> Int -> UpdateFlowSourceResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Source -> Int -> UpdateFlowSourceResponse)
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 Source -> Int -> UpdateFlowSourceResponse)
-> Either String (Maybe Source)
-> Either String (Int -> UpdateFlowSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Source)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"source")
            Either String (Int -> UpdateFlowSourceResponse)
-> Either String Int -> Either String UpdateFlowSourceResponse
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 UpdateFlowSource

instance Prelude.NFData UpdateFlowSource

instance Core.ToHeaders UpdateFlowSource where
  toHeaders :: UpdateFlowSource -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateFlowSource -> 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 UpdateFlowSource where
  toJSON :: UpdateFlowSource -> Value
toJSON UpdateFlowSource' {Maybe Int
Maybe [MediaStreamSourceConfigurationRequest]
Maybe Text
Maybe Protocol
Maybe UpdateEncryption
Text
sourceArn :: Text
flowArn :: Text
streamId :: Maybe Text
maxBitrate :: Maybe Int
whitelistCidr :: Maybe Text
mediaStreamSourceConfigurations :: Maybe [MediaStreamSourceConfigurationRequest]
description :: Maybe Text
ingestPort :: Maybe Int
minLatency :: Maybe Int
protocol :: Maybe Protocol
maxSyncBuffer :: Maybe Int
decryption :: Maybe UpdateEncryption
vpcInterfaceName :: Maybe Text
maxLatency :: Maybe Int
entitlementArn :: Maybe Text
$sel:sourceArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:flowArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:streamId:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:maxBitrate:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:whitelistCidr:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:mediaStreamSourceConfigurations:UpdateFlowSource' :: UpdateFlowSource -> Maybe [MediaStreamSourceConfigurationRequest]
$sel:description:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:ingestPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:minLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:protocol:UpdateFlowSource' :: UpdateFlowSource -> Maybe Protocol
$sel:maxSyncBuffer:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:decryption:UpdateFlowSource' :: UpdateFlowSource -> Maybe UpdateEncryption
$sel:vpcInterfaceName:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:maxLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:entitlementArn:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"entitlementArn" 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
entitlementArn,
            (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
"vpcInterfaceName" 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
vpcInterfaceName,
            (Text
"decryption" 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
decryption,
            (Text
"maxSyncBuffer" 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
maxSyncBuffer,
            (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
"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
"ingestPort" 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
ingestPort,
            (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
"mediaStreamSourceConfigurations" Text -> [MediaStreamSourceConfigurationRequest] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([MediaStreamSourceConfigurationRequest] -> Pair)
-> Maybe [MediaStreamSourceConfigurationRequest] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MediaStreamSourceConfigurationRequest]
mediaStreamSourceConfigurations,
            (Text
"whitelistCidr" 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
whitelistCidr,
            (Text
"maxBitrate" 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
maxBitrate,
            (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
          ]
      )

instance Core.ToPath UpdateFlowSource where
  toPath :: UpdateFlowSource -> ByteString
toPath UpdateFlowSource' {Maybe Int
Maybe [MediaStreamSourceConfigurationRequest]
Maybe Text
Maybe Protocol
Maybe UpdateEncryption
Text
sourceArn :: Text
flowArn :: Text
streamId :: Maybe Text
maxBitrate :: Maybe Int
whitelistCidr :: Maybe Text
mediaStreamSourceConfigurations :: Maybe [MediaStreamSourceConfigurationRequest]
description :: Maybe Text
ingestPort :: Maybe Int
minLatency :: Maybe Int
protocol :: Maybe Protocol
maxSyncBuffer :: Maybe Int
decryption :: Maybe UpdateEncryption
vpcInterfaceName :: Maybe Text
maxLatency :: Maybe Int
entitlementArn :: Maybe Text
$sel:sourceArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:flowArn:UpdateFlowSource' :: UpdateFlowSource -> Text
$sel:streamId:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:maxBitrate:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:whitelistCidr:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:mediaStreamSourceConfigurations:UpdateFlowSource' :: UpdateFlowSource -> Maybe [MediaStreamSourceConfigurationRequest]
$sel:description:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:ingestPort:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:minLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:protocol:UpdateFlowSource' :: UpdateFlowSource -> Maybe Protocol
$sel:maxSyncBuffer:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:decryption:UpdateFlowSource' :: UpdateFlowSource -> Maybe UpdateEncryption
$sel:vpcInterfaceName:UpdateFlowSource' :: UpdateFlowSource -> Maybe Text
$sel:maxLatency:UpdateFlowSource' :: UpdateFlowSource -> Maybe Int
$sel:entitlementArn:UpdateFlowSource' :: UpdateFlowSource -> 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
"/source/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
sourceArn
      ]

instance Core.ToQuery UpdateFlowSource where
  toQuery :: UpdateFlowSource -> QueryString
toQuery = QueryString -> UpdateFlowSource -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(UpdateFlowSourceResponse -> UpdateFlowSourceResponse -> Bool)
-> (UpdateFlowSourceResponse -> UpdateFlowSourceResponse -> Bool)
-> Eq UpdateFlowSourceResponse
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]
(Int -> ReadS UpdateFlowSourceResponse)
-> ReadS [UpdateFlowSourceResponse]
-> ReadPrec UpdateFlowSourceResponse
-> ReadPrec [UpdateFlowSourceResponse]
-> Read 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
(Int -> UpdateFlowSourceResponse -> ShowS)
-> (UpdateFlowSourceResponse -> String)
-> ([UpdateFlowSourceResponse] -> ShowS)
-> Show UpdateFlowSourceResponse
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.
 UpdateFlowSourceResponse -> Rep UpdateFlowSourceResponse x)
-> (forall x.
    Rep UpdateFlowSourceResponse x -> UpdateFlowSourceResponse)
-> Generic UpdateFlowSourceResponse
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' :: Maybe Text -> Maybe Source -> Int -> UpdateFlowSourceResponse
UpdateFlowSourceResponse'
    { $sel:flowArn:UpdateFlowSourceResponse' :: Maybe Text
flowArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:UpdateFlowSourceResponse' :: Maybe Source
source = Maybe 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateFlowSourceResponse -> f UpdateFlowSourceResponse
updateFlowSourceResponse_flowArn = (UpdateFlowSourceResponse -> Maybe Text)
-> (UpdateFlowSourceResponse
    -> Maybe Text -> UpdateFlowSourceResponse)
-> Lens
     UpdateFlowSourceResponse
     UpdateFlowSourceResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Source -> f (Maybe Source))
-> UpdateFlowSourceResponse -> f UpdateFlowSourceResponse
updateFlowSourceResponse_source = (UpdateFlowSourceResponse -> Maybe Source)
-> (UpdateFlowSourceResponse
    -> Maybe Source -> UpdateFlowSourceResponse)
-> Lens
     UpdateFlowSourceResponse
     UpdateFlowSourceResponse
     (Maybe Source)
     (Maybe 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 :: (Int -> f Int)
-> UpdateFlowSourceResponse -> f UpdateFlowSourceResponse
updateFlowSourceResponse_httpStatus = (UpdateFlowSourceResponse -> Int)
-> (UpdateFlowSourceResponse -> Int -> UpdateFlowSourceResponse)
-> Lens UpdateFlowSourceResponse UpdateFlowSourceResponse Int Int
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