{-# 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.Output
-- 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.Output where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConnect.Types.Encryption
import Amazonka.MediaConnect.Types.MediaStreamOutputConfiguration
import Amazonka.MediaConnect.Types.Transport
import Amazonka.MediaConnect.Types.VpcInterfaceAttachment
import qualified Amazonka.Prelude as Prelude

-- | The settings for an output.
--
-- /See:/ 'newOutput' smart constructor.
data Output = Output'
  { -- | The ARN of the entitlement on the originator\'\'s flow. This value is
    -- relevant only on entitled flows.
    Output -> Maybe Text
entitlementArn :: Prelude.Maybe Prelude.Text,
    -- | Percentage from 0-100 of the data transfer cost to be billed to the
    -- subscriber.
    Output -> Maybe Int
dataTransferSubscriberFeePercent :: Prelude.Maybe Prelude.Int,
    -- | The address where you want to send the output.
    Output -> Maybe Text
destination :: Prelude.Maybe Prelude.Text,
    -- | The configuration for each media stream that is associated with the
    -- output.
    Output -> Maybe [MediaStreamOutputConfiguration]
mediaStreamOutputConfigurations :: Prelude.Maybe [MediaStreamOutputConfiguration],
    -- | The input ARN of the AWS Elemental MediaLive channel. This parameter is
    -- relevant only for outputs that were added by creating a MediaLive input.
    Output -> Maybe Text
mediaLiveInputArn :: Prelude.Maybe Prelude.Text,
    -- | The type of key used for the encryption. If no keyType is provided, the
    -- service will use the default setting (static-key).
    Output -> Maybe Encryption
encryption :: Prelude.Maybe Encryption,
    -- | The IP address that the receiver requires in order to establish a
    -- connection with the flow. For public networking, the ListenerAddress is
    -- represented by the elastic IP address of the flow. For private
    -- networking, the ListenerAddress is represented by the elastic network
    -- interface IP address of the VPC. This field applies only to outputs that
    -- use the Zixi pull or SRT listener protocol.
    Output -> Maybe Text
listenerAddress :: Prelude.Maybe Prelude.Text,
    -- | Attributes related to the transport stream that are used in the output.
    Output -> Maybe Transport
transport :: Prelude.Maybe Transport,
    -- | A description of the output.
    Output -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The port to use when content is distributed to this output.
    Output -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | The name of the VPC interface attachment to use for this output.
    Output -> Maybe VpcInterfaceAttachment
vpcInterfaceAttachment :: Prelude.Maybe VpcInterfaceAttachment,
    -- | The ARN of the output.
    Output -> Text
outputArn :: Prelude.Text,
    -- | The name of the output. This value must be unique within the current
    -- flow.
    Output -> Text
name :: Prelude.Text
  }
  deriving (Output -> Output -> Bool
(Output -> Output -> Bool)
-> (Output -> Output -> Bool) -> Eq Output
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Output -> Output -> Bool
$c/= :: Output -> Output -> Bool
== :: Output -> Output -> Bool
$c== :: Output -> Output -> Bool
Prelude.Eq, ReadPrec [Output]
ReadPrec Output
Int -> ReadS Output
ReadS [Output]
(Int -> ReadS Output)
-> ReadS [Output]
-> ReadPrec Output
-> ReadPrec [Output]
-> Read Output
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Output]
$creadListPrec :: ReadPrec [Output]
readPrec :: ReadPrec Output
$creadPrec :: ReadPrec Output
readList :: ReadS [Output]
$creadList :: ReadS [Output]
readsPrec :: Int -> ReadS Output
$creadsPrec :: Int -> ReadS Output
Prelude.Read, Int -> Output -> ShowS
[Output] -> ShowS
Output -> String
(Int -> Output -> ShowS)
-> (Output -> String) -> ([Output] -> ShowS) -> Show Output
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Output] -> ShowS
$cshowList :: [Output] -> ShowS
show :: Output -> String
$cshow :: Output -> String
showsPrec :: Int -> Output -> ShowS
$cshowsPrec :: Int -> Output -> ShowS
Prelude.Show, (forall x. Output -> Rep Output x)
-> (forall x. Rep Output x -> Output) -> Generic Output
forall x. Rep Output x -> Output
forall x. Output -> Rep Output x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Output x -> Output
$cfrom :: forall x. Output -> Rep Output x
Prelude.Generic)

-- |
-- Create a value of 'Output' 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', 'output_entitlementArn' - The ARN of the entitlement on the originator\'\'s flow. This value is
-- relevant only on entitled flows.
--
-- 'dataTransferSubscriberFeePercent', 'output_dataTransferSubscriberFeePercent' - Percentage from 0-100 of the data transfer cost to be billed to the
-- subscriber.
--
-- 'destination', 'output_destination' - The address where you want to send the output.
--
-- 'mediaStreamOutputConfigurations', 'output_mediaStreamOutputConfigurations' - The configuration for each media stream that is associated with the
-- output.
--
-- 'mediaLiveInputArn', 'output_mediaLiveInputArn' - The input ARN of the AWS Elemental MediaLive channel. This parameter is
-- relevant only for outputs that were added by creating a MediaLive input.
--
-- 'encryption', 'output_encryption' - The type of key used for the encryption. If no keyType is provided, the
-- service will use the default setting (static-key).
--
-- 'listenerAddress', 'output_listenerAddress' - The IP address that the receiver requires in order to establish a
-- connection with the flow. For public networking, the ListenerAddress is
-- represented by the elastic IP address of the flow. For private
-- networking, the ListenerAddress is represented by the elastic network
-- interface IP address of the VPC. This field applies only to outputs that
-- use the Zixi pull or SRT listener protocol.
--
-- 'transport', 'output_transport' - Attributes related to the transport stream that are used in the output.
--
-- 'description', 'output_description' - A description of the output.
--
-- 'port', 'output_port' - The port to use when content is distributed to this output.
--
-- 'vpcInterfaceAttachment', 'output_vpcInterfaceAttachment' - The name of the VPC interface attachment to use for this output.
--
-- 'outputArn', 'output_outputArn' - The ARN of the output.
--
-- 'name', 'output_name' - The name of the output. This value must be unique within the current
-- flow.
newOutput ::
  -- | 'outputArn'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  Output
newOutput :: Text -> Text -> Output
newOutput Text
pOutputArn_ Text
pName_ =
  Output' :: Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [MediaStreamOutputConfiguration]
-> Maybe Text
-> Maybe Encryption
-> Maybe Text
-> Maybe Transport
-> Maybe Text
-> Maybe Int
-> Maybe VpcInterfaceAttachment
-> Text
-> Text
-> Output
Output'
    { $sel:entitlementArn:Output' :: Maybe Text
entitlementArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataTransferSubscriberFeePercent:Output' :: Maybe Int
dataTransferSubscriberFeePercent = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:destination:Output' :: Maybe Text
destination = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mediaStreamOutputConfigurations:Output' :: Maybe [MediaStreamOutputConfiguration]
mediaStreamOutputConfigurations = Maybe [MediaStreamOutputConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:mediaLiveInputArn:Output' :: Maybe Text
mediaLiveInputArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encryption:Output' :: Maybe Encryption
encryption = Maybe Encryption
forall a. Maybe a
Prelude.Nothing,
      $sel:listenerAddress:Output' :: Maybe Text
listenerAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:transport:Output' :: Maybe Transport
transport = Maybe Transport
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Output' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:port:Output' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcInterfaceAttachment:Output' :: Maybe VpcInterfaceAttachment
vpcInterfaceAttachment = Maybe VpcInterfaceAttachment
forall a. Maybe a
Prelude.Nothing,
      $sel:outputArn:Output' :: Text
outputArn = Text
pOutputArn_,
      $sel:name:Output' :: Text
name = Text
pName_
    }

-- | The ARN of the entitlement on the originator\'\'s flow. This value is
-- relevant only on entitled flows.
output_entitlementArn :: Lens.Lens' Output (Prelude.Maybe Prelude.Text)
output_entitlementArn :: (Maybe Text -> f (Maybe Text)) -> Output -> f Output
output_entitlementArn = (Output -> Maybe Text)
-> (Output -> Maybe Text -> Output)
-> Lens Output Output (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Maybe Text
entitlementArn :: Maybe Text
$sel:entitlementArn:Output' :: Output -> Maybe Text
entitlementArn} -> Maybe Text
entitlementArn) (\s :: Output
s@Output' {} Maybe Text
a -> Output
s {$sel:entitlementArn:Output' :: Maybe Text
entitlementArn = Maybe Text
a} :: Output)

-- | Percentage from 0-100 of the data transfer cost to be billed to the
-- subscriber.
output_dataTransferSubscriberFeePercent :: Lens.Lens' Output (Prelude.Maybe Prelude.Int)
output_dataTransferSubscriberFeePercent :: (Maybe Int -> f (Maybe Int)) -> Output -> f Output
output_dataTransferSubscriberFeePercent = (Output -> Maybe Int)
-> (Output -> Maybe Int -> Output)
-> Lens Output Output (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Maybe Int
dataTransferSubscriberFeePercent :: Maybe Int
$sel:dataTransferSubscriberFeePercent:Output' :: Output -> Maybe Int
dataTransferSubscriberFeePercent} -> Maybe Int
dataTransferSubscriberFeePercent) (\s :: Output
s@Output' {} Maybe Int
a -> Output
s {$sel:dataTransferSubscriberFeePercent:Output' :: Maybe Int
dataTransferSubscriberFeePercent = Maybe Int
a} :: Output)

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

-- | The configuration for each media stream that is associated with the
-- output.
output_mediaStreamOutputConfigurations :: Lens.Lens' Output (Prelude.Maybe [MediaStreamOutputConfiguration])
output_mediaStreamOutputConfigurations :: (Maybe [MediaStreamOutputConfiguration]
 -> f (Maybe [MediaStreamOutputConfiguration]))
-> Output -> f Output
output_mediaStreamOutputConfigurations = (Output -> Maybe [MediaStreamOutputConfiguration])
-> (Output -> Maybe [MediaStreamOutputConfiguration] -> Output)
-> Lens
     Output
     Output
     (Maybe [MediaStreamOutputConfiguration])
     (Maybe [MediaStreamOutputConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Maybe [MediaStreamOutputConfiguration]
mediaStreamOutputConfigurations :: Maybe [MediaStreamOutputConfiguration]
$sel:mediaStreamOutputConfigurations:Output' :: Output -> Maybe [MediaStreamOutputConfiguration]
mediaStreamOutputConfigurations} -> Maybe [MediaStreamOutputConfiguration]
mediaStreamOutputConfigurations) (\s :: Output
s@Output' {} Maybe [MediaStreamOutputConfiguration]
a -> Output
s {$sel:mediaStreamOutputConfigurations:Output' :: Maybe [MediaStreamOutputConfiguration]
mediaStreamOutputConfigurations = Maybe [MediaStreamOutputConfiguration]
a} :: Output) ((Maybe [MediaStreamOutputConfiguration]
  -> f (Maybe [MediaStreamOutputConfiguration]))
 -> Output -> f Output)
-> ((Maybe [MediaStreamOutputConfiguration]
     -> f (Maybe [MediaStreamOutputConfiguration]))
    -> Maybe [MediaStreamOutputConfiguration]
    -> f (Maybe [MediaStreamOutputConfiguration]))
-> (Maybe [MediaStreamOutputConfiguration]
    -> f (Maybe [MediaStreamOutputConfiguration]))
-> Output
-> f Output
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MediaStreamOutputConfiguration]
  [MediaStreamOutputConfiguration]
  [MediaStreamOutputConfiguration]
  [MediaStreamOutputConfiguration]
-> Iso
     (Maybe [MediaStreamOutputConfiguration])
     (Maybe [MediaStreamOutputConfiguration])
     (Maybe [MediaStreamOutputConfiguration])
     (Maybe [MediaStreamOutputConfiguration])
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
  [MediaStreamOutputConfiguration]
  [MediaStreamOutputConfiguration]
  [MediaStreamOutputConfiguration]
  [MediaStreamOutputConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The input ARN of the AWS Elemental MediaLive channel. This parameter is
-- relevant only for outputs that were added by creating a MediaLive input.
output_mediaLiveInputArn :: Lens.Lens' Output (Prelude.Maybe Prelude.Text)
output_mediaLiveInputArn :: (Maybe Text -> f (Maybe Text)) -> Output -> f Output
output_mediaLiveInputArn = (Output -> Maybe Text)
-> (Output -> Maybe Text -> Output)
-> Lens Output Output (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Maybe Text
mediaLiveInputArn :: Maybe Text
$sel:mediaLiveInputArn:Output' :: Output -> Maybe Text
mediaLiveInputArn} -> Maybe Text
mediaLiveInputArn) (\s :: Output
s@Output' {} Maybe Text
a -> Output
s {$sel:mediaLiveInputArn:Output' :: Maybe Text
mediaLiveInputArn = Maybe Text
a} :: Output)

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

-- | The IP address that the receiver requires in order to establish a
-- connection with the flow. For public networking, the ListenerAddress is
-- represented by the elastic IP address of the flow. For private
-- networking, the ListenerAddress is represented by the elastic network
-- interface IP address of the VPC. This field applies only to outputs that
-- use the Zixi pull or SRT listener protocol.
output_listenerAddress :: Lens.Lens' Output (Prelude.Maybe Prelude.Text)
output_listenerAddress :: (Maybe Text -> f (Maybe Text)) -> Output -> f Output
output_listenerAddress = (Output -> Maybe Text)
-> (Output -> Maybe Text -> Output)
-> Lens Output Output (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Maybe Text
listenerAddress :: Maybe Text
$sel:listenerAddress:Output' :: Output -> Maybe Text
listenerAddress} -> Maybe Text
listenerAddress) (\s :: Output
s@Output' {} Maybe Text
a -> Output
s {$sel:listenerAddress:Output' :: Maybe Text
listenerAddress = Maybe Text
a} :: Output)

-- | Attributes related to the transport stream that are used in the output.
output_transport :: Lens.Lens' Output (Prelude.Maybe Transport)
output_transport :: (Maybe Transport -> f (Maybe Transport)) -> Output -> f Output
output_transport = (Output -> Maybe Transport)
-> (Output -> Maybe Transport -> Output)
-> Lens Output Output (Maybe Transport) (Maybe Transport)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Maybe Transport
transport :: Maybe Transport
$sel:transport:Output' :: Output -> Maybe Transport
transport} -> Maybe Transport
transport) (\s :: Output
s@Output' {} Maybe Transport
a -> Output
s {$sel:transport:Output' :: Maybe Transport
transport = Maybe Transport
a} :: Output)

-- | A description of the output.
output_description :: Lens.Lens' Output (Prelude.Maybe Prelude.Text)
output_description :: (Maybe Text -> f (Maybe Text)) -> Output -> f Output
output_description = (Output -> Maybe Text)
-> (Output -> Maybe Text -> Output)
-> Lens Output Output (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Maybe Text
description :: Maybe Text
$sel:description:Output' :: Output -> Maybe Text
description} -> Maybe Text
description) (\s :: Output
s@Output' {} Maybe Text
a -> Output
s {$sel:description:Output' :: Maybe Text
description = Maybe Text
a} :: Output)

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

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

-- | The ARN of the output.
output_outputArn :: Lens.Lens' Output Prelude.Text
output_outputArn :: (Text -> f Text) -> Output -> f Output
output_outputArn = (Output -> Text)
-> (Output -> Text -> Output) -> Lens Output Output Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Output' {Text
outputArn :: Text
$sel:outputArn:Output' :: Output -> Text
outputArn} -> Text
outputArn) (\s :: Output
s@Output' {} Text
a -> Output
s {$sel:outputArn:Output' :: Text
outputArn = Text
a} :: Output)

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

instance Core.FromJSON Output where
  parseJSON :: Value -> Parser Output
parseJSON =
    String -> (Object -> Parser Output) -> Value -> Parser Output
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Output"
      ( \Object
x ->
          Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe [MediaStreamOutputConfiguration]
-> Maybe Text
-> Maybe Encryption
-> Maybe Text
-> Maybe Transport
-> Maybe Text
-> Maybe Int
-> Maybe VpcInterfaceAttachment
-> Text
-> Text
-> Output
Output'
            (Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe [MediaStreamOutputConfiguration]
 -> Maybe Text
 -> Maybe Encryption
 -> Maybe Text
 -> Maybe Transport
 -> Maybe Text
 -> Maybe Int
 -> Maybe VpcInterfaceAttachment
 -> Text
 -> Text
 -> Output)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe [MediaStreamOutputConfiguration]
      -> Maybe Text
      -> Maybe Encryption
      -> Maybe Text
      -> Maybe Transport
      -> Maybe Text
      -> Maybe Int
      -> Maybe VpcInterfaceAttachment
      -> Text
      -> Text
      -> Output)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"entitlementArn")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe [MediaStreamOutputConfiguration]
   -> Maybe Text
   -> Maybe Encryption
   -> Maybe Text
   -> Maybe Transport
   -> Maybe Text
   -> Maybe Int
   -> Maybe VpcInterfaceAttachment
   -> Text
   -> Text
   -> Output)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe [MediaStreamOutputConfiguration]
      -> Maybe Text
      -> Maybe Encryption
      -> Maybe Text
      -> Maybe Transport
      -> Maybe Text
      -> Maybe Int
      -> Maybe VpcInterfaceAttachment
      -> Text
      -> Text
      -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dataTransferSubscriberFeePercent")
            Parser
  (Maybe Text
   -> Maybe [MediaStreamOutputConfiguration]
   -> Maybe Text
   -> Maybe Encryption
   -> Maybe Text
   -> Maybe Transport
   -> Maybe Text
   -> Maybe Int
   -> Maybe VpcInterfaceAttachment
   -> Text
   -> Text
   -> Output)
-> Parser (Maybe Text)
-> Parser
     (Maybe [MediaStreamOutputConfiguration]
      -> Maybe Text
      -> Maybe Encryption
      -> Maybe Text
      -> Maybe Transport
      -> Maybe Text
      -> Maybe Int
      -> Maybe VpcInterfaceAttachment
      -> Text
      -> Text
      -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"destination")
            Parser
  (Maybe [MediaStreamOutputConfiguration]
   -> Maybe Text
   -> Maybe Encryption
   -> Maybe Text
   -> Maybe Transport
   -> Maybe Text
   -> Maybe Int
   -> Maybe VpcInterfaceAttachment
   -> Text
   -> Text
   -> Output)
-> Parser (Maybe [MediaStreamOutputConfiguration])
-> Parser
     (Maybe Text
      -> Maybe Encryption
      -> Maybe Text
      -> Maybe Transport
      -> Maybe Text
      -> Maybe Int
      -> Maybe VpcInterfaceAttachment
      -> Text
      -> Text
      -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [MediaStreamOutputConfiguration]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mediaStreamOutputConfigurations"
                            Parser (Maybe (Maybe [MediaStreamOutputConfiguration]))
-> Maybe [MediaStreamOutputConfiguration]
-> Parser (Maybe [MediaStreamOutputConfiguration])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [MediaStreamOutputConfiguration]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Encryption
   -> Maybe Text
   -> Maybe Transport
   -> Maybe Text
   -> Maybe Int
   -> Maybe VpcInterfaceAttachment
   -> Text
   -> Text
   -> Output)
-> Parser (Maybe Text)
-> Parser
     (Maybe Encryption
      -> Maybe Text
      -> Maybe Transport
      -> Maybe Text
      -> Maybe Int
      -> Maybe VpcInterfaceAttachment
      -> Text
      -> Text
      -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mediaLiveInputArn")
            Parser
  (Maybe Encryption
   -> Maybe Text
   -> Maybe Transport
   -> Maybe Text
   -> Maybe Int
   -> Maybe VpcInterfaceAttachment
   -> Text
   -> Text
   -> Output)
-> Parser (Maybe Encryption)
-> Parser
     (Maybe Text
      -> Maybe Transport
      -> Maybe Text
      -> Maybe Int
      -> Maybe VpcInterfaceAttachment
      -> Text
      -> Text
      -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Encryption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"encryption")
            Parser
  (Maybe Text
   -> Maybe Transport
   -> Maybe Text
   -> Maybe Int
   -> Maybe VpcInterfaceAttachment
   -> Text
   -> Text
   -> Output)
-> Parser (Maybe Text)
-> Parser
     (Maybe Transport
      -> Maybe Text
      -> Maybe Int
      -> Maybe VpcInterfaceAttachment
      -> Text
      -> Text
      -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"listenerAddress")
            Parser
  (Maybe Transport
   -> Maybe Text
   -> Maybe Int
   -> Maybe VpcInterfaceAttachment
   -> Text
   -> Text
   -> Output)
-> Parser (Maybe Transport)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe VpcInterfaceAttachment
      -> Text
      -> Text
      -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Transport)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"transport")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe VpcInterfaceAttachment
   -> Text
   -> Text
   -> Output)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe VpcInterfaceAttachment -> Text -> Text -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
            Parser
  (Maybe Int
   -> Maybe VpcInterfaceAttachment -> Text -> Text -> Output)
-> Parser (Maybe Int)
-> Parser (Maybe VpcInterfaceAttachment -> Text -> Text -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"port")
            Parser (Maybe VpcInterfaceAttachment -> Text -> Text -> Output)
-> Parser (Maybe VpcInterfaceAttachment)
-> Parser (Text -> Text -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VpcInterfaceAttachment)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vpcInterfaceAttachment")
            Parser (Text -> Text -> Output)
-> Parser Text -> Parser (Text -> Output)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"outputArn")
            Parser (Text -> Output) -> Parser Text -> Parser Output
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
      )

instance Prelude.Hashable Output

instance Prelude.NFData Output