{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.AddOutputRequest
-- 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)
module Amazonka.MediaConnect.Types.AddOutputRequest where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConnect.Types.Encryption
import Amazonka.MediaConnect.Types.MediaStreamOutputConfigurationRequest
import Amazonka.MediaConnect.Types.Protocol
import Amazonka.MediaConnect.Types.VpcInterfaceAttachment
import qualified Amazonka.Prelude as Prelude

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

-- |
-- Create a value of 'AddOutputRequest' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'destination', 'addOutputRequest_destination' - The IP address from which video will be sent to output destinations.
--
-- 'maxLatency', 'addOutputRequest_maxLatency' - The maximum latency in milliseconds for Zixi-based streams.
--
-- 'mediaStreamOutputConfigurations', 'addOutputRequest_mediaStreamOutputConfigurations' - The media streams that are associated with the output, and the
-- parameters for those associations.
--
-- 'encryption', 'addOutputRequest_encryption' - The type of key used for the encryption. If no keyType is provided, the
-- service will use the default setting (static-key).
--
-- 'name', 'addOutputRequest_name' - The name of the output. This value must be unique within the current
-- flow.
--
-- 'cidrAllowList', 'addOutputRequest_cidrAllowList' - The range of IP addresses that should be allowed to initiate output
-- requests to this flow. These IP addresses should be in the form of a
-- Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0\/16.
--
-- 'smoothingLatency', 'addOutputRequest_smoothingLatency' - The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC
-- streams.
--
-- 'minLatency', 'addOutputRequest_minLatency' - The minimum latency in milliseconds for SRT-based streams. In streams
-- that use the SRT protocol, this value that you set on your MediaConnect
-- source or output represents the minimal potential latency of that
-- connection. The latency of the stream is set to the highest number
-- between the sender’s minimum latency and the receiver’s minimum latency.
--
-- 'description', 'addOutputRequest_description' - A description of the output. This description appears only on the AWS
-- Elemental MediaConnect console and will not be seen by the end user.
--
-- 'port', 'addOutputRequest_port' - The port to use when content is distributed to this output.
--
-- 'streamId', 'addOutputRequest_streamId' - The stream ID that you want to use for this transport. This parameter
-- applies only to Zixi-based streams.
--
-- 'remoteId', 'addOutputRequest_remoteId' - The remote ID for the Zixi-pull output stream.
--
-- 'vpcInterfaceAttachment', 'addOutputRequest_vpcInterfaceAttachment' - The name of the VPC interface attachment to use for this output.
--
-- 'protocol', 'addOutputRequest_protocol' - The protocol to use for the output.
newAddOutputRequest ::
  -- | 'protocol'
  Protocol ->
  AddOutputRequest
newAddOutputRequest :: Protocol -> AddOutputRequest
newAddOutputRequest Protocol
pProtocol_ =
  AddOutputRequest' :: Maybe Text
-> Maybe Int
-> Maybe [MediaStreamOutputConfigurationRequest]
-> Maybe Encryption
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe VpcInterfaceAttachment
-> Protocol
-> AddOutputRequest
AddOutputRequest'
    { $sel:destination:AddOutputRequest' :: Maybe Text
destination = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxLatency:AddOutputRequest' :: Maybe Int
maxLatency = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:mediaStreamOutputConfigurations:AddOutputRequest' :: Maybe [MediaStreamOutputConfigurationRequest]
mediaStreamOutputConfigurations = Maybe [MediaStreamOutputConfigurationRequest]
forall a. Maybe a
Prelude.Nothing,
      $sel:encryption:AddOutputRequest' :: Maybe Encryption
encryption = Maybe Encryption
forall a. Maybe a
Prelude.Nothing,
      $sel:name:AddOutputRequest' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cidrAllowList:AddOutputRequest' :: Maybe [Text]
cidrAllowList = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:smoothingLatency:AddOutputRequest' :: Maybe Int
smoothingLatency = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:minLatency:AddOutputRequest' :: Maybe Int
minLatency = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:description:AddOutputRequest' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:port:AddOutputRequest' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:streamId:AddOutputRequest' :: Maybe Text
streamId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:remoteId:AddOutputRequest' :: Maybe Text
remoteId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcInterfaceAttachment:AddOutputRequest' :: Maybe VpcInterfaceAttachment
vpcInterfaceAttachment = Maybe VpcInterfaceAttachment
forall a. Maybe a
Prelude.Nothing,
      $sel:protocol:AddOutputRequest' :: Protocol
protocol = Protocol
pProtocol_
    }

-- | The IP address from which video will be sent to output destinations.
addOutputRequest_destination :: Lens.Lens' AddOutputRequest (Prelude.Maybe Prelude.Text)
addOutputRequest_destination :: (Maybe Text -> f (Maybe Text))
-> AddOutputRequest -> f AddOutputRequest
addOutputRequest_destination = (AddOutputRequest -> Maybe Text)
-> (AddOutputRequest -> Maybe Text -> AddOutputRequest)
-> Lens AddOutputRequest AddOutputRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddOutputRequest' {Maybe Text
destination :: Maybe Text
$sel:destination:AddOutputRequest' :: AddOutputRequest -> Maybe Text
destination} -> Maybe Text
destination) (\s :: AddOutputRequest
s@AddOutputRequest' {} Maybe Text
a -> AddOutputRequest
s {$sel:destination:AddOutputRequest' :: Maybe Text
destination = Maybe Text
a} :: AddOutputRequest)

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

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

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

-- | The name of the output. This value must be unique within the current
-- flow.
addOutputRequest_name :: Lens.Lens' AddOutputRequest (Prelude.Maybe Prelude.Text)
addOutputRequest_name :: (Maybe Text -> f (Maybe Text))
-> AddOutputRequest -> f AddOutputRequest
addOutputRequest_name = (AddOutputRequest -> Maybe Text)
-> (AddOutputRequest -> Maybe Text -> AddOutputRequest)
-> Lens AddOutputRequest AddOutputRequest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddOutputRequest' {Maybe Text
name :: Maybe Text
$sel:name:AddOutputRequest' :: AddOutputRequest -> Maybe Text
name} -> Maybe Text
name) (\s :: AddOutputRequest
s@AddOutputRequest' {} Maybe Text
a -> AddOutputRequest
s {$sel:name:AddOutputRequest' :: Maybe Text
name = Maybe Text
a} :: AddOutputRequest)

-- | The range of IP addresses that should be allowed to initiate output
-- requests to this flow. These IP addresses should be in the form of a
-- Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0\/16.
addOutputRequest_cidrAllowList :: Lens.Lens' AddOutputRequest (Prelude.Maybe [Prelude.Text])
addOutputRequest_cidrAllowList :: (Maybe [Text] -> f (Maybe [Text]))
-> AddOutputRequest -> f AddOutputRequest
addOutputRequest_cidrAllowList = (AddOutputRequest -> Maybe [Text])
-> (AddOutputRequest -> Maybe [Text] -> AddOutputRequest)
-> Lens
     AddOutputRequest AddOutputRequest (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddOutputRequest' {Maybe [Text]
cidrAllowList :: Maybe [Text]
$sel:cidrAllowList:AddOutputRequest' :: AddOutputRequest -> Maybe [Text]
cidrAllowList} -> Maybe [Text]
cidrAllowList) (\s :: AddOutputRequest
s@AddOutputRequest' {} Maybe [Text]
a -> AddOutputRequest
s {$sel:cidrAllowList:AddOutputRequest' :: Maybe [Text]
cidrAllowList = Maybe [Text]
a} :: AddOutputRequest) ((Maybe [Text] -> f (Maybe [Text]))
 -> AddOutputRequest -> f AddOutputRequest)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AddOutputRequest
-> f AddOutputRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC
-- streams.
addOutputRequest_smoothingLatency :: Lens.Lens' AddOutputRequest (Prelude.Maybe Prelude.Int)
addOutputRequest_smoothingLatency :: (Maybe Int -> f (Maybe Int))
-> AddOutputRequest -> f AddOutputRequest
addOutputRequest_smoothingLatency = (AddOutputRequest -> Maybe Int)
-> (AddOutputRequest -> Maybe Int -> AddOutputRequest)
-> Lens AddOutputRequest AddOutputRequest (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddOutputRequest' {Maybe Int
smoothingLatency :: Maybe Int
$sel:smoothingLatency:AddOutputRequest' :: AddOutputRequest -> Maybe Int
smoothingLatency} -> Maybe Int
smoothingLatency) (\s :: AddOutputRequest
s@AddOutputRequest' {} Maybe Int
a -> AddOutputRequest
s {$sel:smoothingLatency:AddOutputRequest' :: Maybe Int
smoothingLatency = Maybe Int
a} :: AddOutputRequest)

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

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

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

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

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

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

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

instance Prelude.Hashable AddOutputRequest

instance Prelude.NFData AddOutputRequest

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