{-# 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 #-}
module Amazonka.MediaConnect.Types.Flow where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConnect.Types.Entitlement
import Amazonka.MediaConnect.Types.FailoverConfig
import Amazonka.MediaConnect.Types.MediaStream
import Amazonka.MediaConnect.Types.Output
import Amazonka.MediaConnect.Types.Source
import Amazonka.MediaConnect.Types.Status
import Amazonka.MediaConnect.Types.VpcInterface
import qualified Amazonka.Prelude as Prelude
data Flow = Flow'
{
Flow -> Maybe [MediaStream]
mediaStreams :: Prelude.Maybe [MediaStream],
Flow -> Maybe FailoverConfig
sourceFailoverConfig :: Prelude.Maybe FailoverConfig,
Flow -> Maybe [VpcInterface]
vpcInterfaces :: Prelude.Maybe [VpcInterface],
Flow -> Maybe [Source]
sources :: Prelude.Maybe [Source],
Flow -> Maybe Text
egressIp :: Prelude.Maybe Prelude.Text,
Flow -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Flow -> Status
status :: Status,
Flow -> [Entitlement]
entitlements :: [Entitlement],
Flow -> [Output]
outputs :: [Output],
Flow -> Text
availabilityZone :: Prelude.Text,
Flow -> Text
flowArn :: Prelude.Text,
Flow -> Source
source :: Source,
Flow -> Text
name :: Prelude.Text
}
deriving (Flow -> Flow -> Bool
(Flow -> Flow -> Bool) -> (Flow -> Flow -> Bool) -> Eq Flow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Flow -> Flow -> Bool
$c/= :: Flow -> Flow -> Bool
== :: Flow -> Flow -> Bool
$c== :: Flow -> Flow -> Bool
Prelude.Eq, ReadPrec [Flow]
ReadPrec Flow
Int -> ReadS Flow
ReadS [Flow]
(Int -> ReadS Flow)
-> ReadS [Flow] -> ReadPrec Flow -> ReadPrec [Flow] -> Read Flow
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Flow]
$creadListPrec :: ReadPrec [Flow]
readPrec :: ReadPrec Flow
$creadPrec :: ReadPrec Flow
readList :: ReadS [Flow]
$creadList :: ReadS [Flow]
readsPrec :: Int -> ReadS Flow
$creadsPrec :: Int -> ReadS Flow
Prelude.Read, Int -> Flow -> ShowS
[Flow] -> ShowS
Flow -> String
(Int -> Flow -> ShowS)
-> (Flow -> String) -> ([Flow] -> ShowS) -> Show Flow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Flow] -> ShowS
$cshowList :: [Flow] -> ShowS
show :: Flow -> String
$cshow :: Flow -> String
showsPrec :: Int -> Flow -> ShowS
$cshowsPrec :: Int -> Flow -> ShowS
Prelude.Show, (forall x. Flow -> Rep Flow x)
-> (forall x. Rep Flow x -> Flow) -> Generic Flow
forall x. Rep Flow x -> Flow
forall x. Flow -> Rep Flow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Flow x -> Flow
$cfrom :: forall x. Flow -> Rep Flow x
Prelude.Generic)
newFlow ::
Status ->
Prelude.Text ->
Prelude.Text ->
Source ->
Prelude.Text ->
Flow
newFlow :: Status -> Text -> Text -> Source -> Text -> Flow
newFlow
Status
pStatus_
Text
pAvailabilityZone_
Text
pFlowArn_
Source
pSource_
Text
pName_ =
Flow' :: Maybe [MediaStream]
-> Maybe FailoverConfig
-> Maybe [VpcInterface]
-> Maybe [Source]
-> Maybe Text
-> Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow
Flow'
{ $sel:mediaStreams:Flow' :: Maybe [MediaStream]
mediaStreams = Maybe [MediaStream]
forall a. Maybe a
Prelude.Nothing,
$sel:sourceFailoverConfig:Flow' :: Maybe FailoverConfig
sourceFailoverConfig = Maybe FailoverConfig
forall a. Maybe a
Prelude.Nothing,
$sel:vpcInterfaces:Flow' :: Maybe [VpcInterface]
vpcInterfaces = Maybe [VpcInterface]
forall a. Maybe a
Prelude.Nothing,
$sel:sources:Flow' :: Maybe [Source]
sources = Maybe [Source]
forall a. Maybe a
Prelude.Nothing,
$sel:egressIp:Flow' :: Maybe Text
egressIp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:Flow' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:Flow' :: Status
status = Status
pStatus_,
$sel:entitlements:Flow' :: [Entitlement]
entitlements = [Entitlement]
forall a. Monoid a => a
Prelude.mempty,
$sel:outputs:Flow' :: [Output]
outputs = [Output]
forall a. Monoid a => a
Prelude.mempty,
$sel:availabilityZone:Flow' :: Text
availabilityZone = Text
pAvailabilityZone_,
$sel:flowArn:Flow' :: Text
flowArn = Text
pFlowArn_,
$sel:source:Flow' :: Source
source = Source
pSource_,
$sel:name:Flow' :: Text
name = Text
pName_
}
flow_mediaStreams :: Lens.Lens' Flow (Prelude.Maybe [MediaStream])
flow_mediaStreams :: (Maybe [MediaStream] -> f (Maybe [MediaStream])) -> Flow -> f Flow
flow_mediaStreams = (Flow -> Maybe [MediaStream])
-> (Flow -> Maybe [MediaStream] -> Flow)
-> Lens Flow Flow (Maybe [MediaStream]) (Maybe [MediaStream])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {Maybe [MediaStream]
mediaStreams :: Maybe [MediaStream]
$sel:mediaStreams:Flow' :: Flow -> Maybe [MediaStream]
mediaStreams} -> Maybe [MediaStream]
mediaStreams) (\s :: Flow
s@Flow' {} Maybe [MediaStream]
a -> Flow
s {$sel:mediaStreams:Flow' :: Maybe [MediaStream]
mediaStreams = Maybe [MediaStream]
a} :: Flow) ((Maybe [MediaStream] -> f (Maybe [MediaStream]))
-> Flow -> f Flow)
-> ((Maybe [MediaStream] -> f (Maybe [MediaStream]))
-> Maybe [MediaStream] -> f (Maybe [MediaStream]))
-> (Maybe [MediaStream] -> f (Maybe [MediaStream]))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [MediaStream] [MediaStream] [MediaStream] [MediaStream]
-> Iso
(Maybe [MediaStream])
(Maybe [MediaStream])
(Maybe [MediaStream])
(Maybe [MediaStream])
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 [MediaStream] [MediaStream] [MediaStream] [MediaStream]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
flow_sourceFailoverConfig :: Lens.Lens' Flow (Prelude.Maybe FailoverConfig)
flow_sourceFailoverConfig :: (Maybe FailoverConfig -> f (Maybe FailoverConfig))
-> Flow -> f Flow
flow_sourceFailoverConfig = (Flow -> Maybe FailoverConfig)
-> (Flow -> Maybe FailoverConfig -> Flow)
-> Lens Flow Flow (Maybe FailoverConfig) (Maybe FailoverConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {Maybe FailoverConfig
sourceFailoverConfig :: Maybe FailoverConfig
$sel:sourceFailoverConfig:Flow' :: Flow -> Maybe FailoverConfig
sourceFailoverConfig} -> Maybe FailoverConfig
sourceFailoverConfig) (\s :: Flow
s@Flow' {} Maybe FailoverConfig
a -> Flow
s {$sel:sourceFailoverConfig:Flow' :: Maybe FailoverConfig
sourceFailoverConfig = Maybe FailoverConfig
a} :: Flow)
flow_vpcInterfaces :: Lens.Lens' Flow (Prelude.Maybe [VpcInterface])
flow_vpcInterfaces :: (Maybe [VpcInterface] -> f (Maybe [VpcInterface]))
-> Flow -> f Flow
flow_vpcInterfaces = (Flow -> Maybe [VpcInterface])
-> (Flow -> Maybe [VpcInterface] -> Flow)
-> Lens Flow Flow (Maybe [VpcInterface]) (Maybe [VpcInterface])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {Maybe [VpcInterface]
vpcInterfaces :: Maybe [VpcInterface]
$sel:vpcInterfaces:Flow' :: Flow -> Maybe [VpcInterface]
vpcInterfaces} -> Maybe [VpcInterface]
vpcInterfaces) (\s :: Flow
s@Flow' {} Maybe [VpcInterface]
a -> Flow
s {$sel:vpcInterfaces:Flow' :: Maybe [VpcInterface]
vpcInterfaces = Maybe [VpcInterface]
a} :: Flow) ((Maybe [VpcInterface] -> f (Maybe [VpcInterface]))
-> Flow -> f Flow)
-> ((Maybe [VpcInterface] -> f (Maybe [VpcInterface]))
-> Maybe [VpcInterface] -> f (Maybe [VpcInterface]))
-> (Maybe [VpcInterface] -> f (Maybe [VpcInterface]))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [VpcInterface] [VpcInterface] [VpcInterface] [VpcInterface]
-> Iso
(Maybe [VpcInterface])
(Maybe [VpcInterface])
(Maybe [VpcInterface])
(Maybe [VpcInterface])
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 [VpcInterface] [VpcInterface] [VpcInterface] [VpcInterface]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
flow_sources :: Lens.Lens' Flow (Prelude.Maybe [Source])
flow_sources :: (Maybe [Source] -> f (Maybe [Source])) -> Flow -> f Flow
flow_sources = (Flow -> Maybe [Source])
-> (Flow -> Maybe [Source] -> Flow)
-> Lens Flow Flow (Maybe [Source]) (Maybe [Source])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {Maybe [Source]
sources :: Maybe [Source]
$sel:sources:Flow' :: Flow -> Maybe [Source]
sources} -> Maybe [Source]
sources) (\s :: Flow
s@Flow' {} Maybe [Source]
a -> Flow
s {$sel:sources:Flow' :: Maybe [Source]
sources = Maybe [Source]
a} :: Flow) ((Maybe [Source] -> f (Maybe [Source])) -> Flow -> f Flow)
-> ((Maybe [Source] -> f (Maybe [Source]))
-> Maybe [Source] -> f (Maybe [Source]))
-> (Maybe [Source] -> f (Maybe [Source]))
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Source] [Source] [Source] [Source]
-> Iso
(Maybe [Source]) (Maybe [Source]) (Maybe [Source]) (Maybe [Source])
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 [Source] [Source] [Source] [Source]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
flow_egressIp :: Lens.Lens' Flow (Prelude.Maybe Prelude.Text)
flow_egressIp :: (Maybe Text -> f (Maybe Text)) -> Flow -> f Flow
flow_egressIp = (Flow -> Maybe Text)
-> (Flow -> Maybe Text -> Flow)
-> Lens Flow Flow (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {Maybe Text
egressIp :: Maybe Text
$sel:egressIp:Flow' :: Flow -> Maybe Text
egressIp} -> Maybe Text
egressIp) (\s :: Flow
s@Flow' {} Maybe Text
a -> Flow
s {$sel:egressIp:Flow' :: Maybe Text
egressIp = Maybe Text
a} :: Flow)
flow_description :: Lens.Lens' Flow (Prelude.Maybe Prelude.Text)
flow_description :: (Maybe Text -> f (Maybe Text)) -> Flow -> f Flow
flow_description = (Flow -> Maybe Text)
-> (Flow -> Maybe Text -> Flow)
-> Lens Flow Flow (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {Maybe Text
description :: Maybe Text
$sel:description:Flow' :: Flow -> Maybe Text
description} -> Maybe Text
description) (\s :: Flow
s@Flow' {} Maybe Text
a -> Flow
s {$sel:description:Flow' :: Maybe Text
description = Maybe Text
a} :: Flow)
flow_status :: Lens.Lens' Flow Status
flow_status :: (Status -> f Status) -> Flow -> f Flow
flow_status = (Flow -> Status)
-> (Flow -> Status -> Flow) -> Lens Flow Flow Status Status
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {Status
status :: Status
$sel:status:Flow' :: Flow -> Status
status} -> Status
status) (\s :: Flow
s@Flow' {} Status
a -> Flow
s {$sel:status:Flow' :: Status
status = Status
a} :: Flow)
flow_entitlements :: Lens.Lens' Flow [Entitlement]
flow_entitlements :: ([Entitlement] -> f [Entitlement]) -> Flow -> f Flow
flow_entitlements = (Flow -> [Entitlement])
-> (Flow -> [Entitlement] -> Flow)
-> Lens Flow Flow [Entitlement] [Entitlement]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {[Entitlement]
entitlements :: [Entitlement]
$sel:entitlements:Flow' :: Flow -> [Entitlement]
entitlements} -> [Entitlement]
entitlements) (\s :: Flow
s@Flow' {} [Entitlement]
a -> Flow
s {$sel:entitlements:Flow' :: [Entitlement]
entitlements = [Entitlement]
a} :: Flow) (([Entitlement] -> f [Entitlement]) -> Flow -> f Flow)
-> (([Entitlement] -> f [Entitlement])
-> [Entitlement] -> f [Entitlement])
-> ([Entitlement] -> f [Entitlement])
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Entitlement] -> f [Entitlement])
-> [Entitlement] -> f [Entitlement]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
flow_outputs :: Lens.Lens' Flow [Output]
flow_outputs :: ([Output] -> f [Output]) -> Flow -> f Flow
flow_outputs = (Flow -> [Output])
-> (Flow -> [Output] -> Flow) -> Lens Flow Flow [Output] [Output]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {[Output]
outputs :: [Output]
$sel:outputs:Flow' :: Flow -> [Output]
outputs} -> [Output]
outputs) (\s :: Flow
s@Flow' {} [Output]
a -> Flow
s {$sel:outputs:Flow' :: [Output]
outputs = [Output]
a} :: Flow) (([Output] -> f [Output]) -> Flow -> f Flow)
-> (([Output] -> f [Output]) -> [Output] -> f [Output])
-> ([Output] -> f [Output])
-> Flow
-> f Flow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Output] -> f [Output]) -> [Output] -> f [Output]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
flow_availabilityZone :: Lens.Lens' Flow Prelude.Text
flow_availabilityZone :: (Text -> f Text) -> Flow -> f Flow
flow_availabilityZone = (Flow -> Text)
-> (Flow -> Text -> Flow) -> Lens Flow Flow Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {Text
availabilityZone :: Text
$sel:availabilityZone:Flow' :: Flow -> Text
availabilityZone} -> Text
availabilityZone) (\s :: Flow
s@Flow' {} Text
a -> Flow
s {$sel:availabilityZone:Flow' :: Text
availabilityZone = Text
a} :: Flow)
flow_flowArn :: Lens.Lens' Flow Prelude.Text
flow_flowArn :: (Text -> f Text) -> Flow -> f Flow
flow_flowArn = (Flow -> Text)
-> (Flow -> Text -> Flow) -> Lens Flow Flow Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {Text
flowArn :: Text
$sel:flowArn:Flow' :: Flow -> Text
flowArn} -> Text
flowArn) (\s :: Flow
s@Flow' {} Text
a -> Flow
s {$sel:flowArn:Flow' :: Text
flowArn = Text
a} :: Flow)
flow_source :: Lens.Lens' Flow Source
flow_source :: (Source -> f Source) -> Flow -> f Flow
flow_source = (Flow -> Source)
-> (Flow -> Source -> Flow) -> Lens Flow Flow Source Source
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {Source
source :: Source
$sel:source:Flow' :: Flow -> Source
source} -> Source
source) (\s :: Flow
s@Flow' {} Source
a -> Flow
s {$sel:source:Flow' :: Source
source = Source
a} :: Flow)
flow_name :: Lens.Lens' Flow Prelude.Text
flow_name :: (Text -> f Text) -> Flow -> f Flow
flow_name = (Flow -> Text)
-> (Flow -> Text -> Flow) -> Lens Flow Flow Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Flow' {Text
name :: Text
$sel:name:Flow' :: Flow -> Text
name} -> Text
name) (\s :: Flow
s@Flow' {} Text
a -> Flow
s {$sel:name:Flow' :: Text
name = Text
a} :: Flow)
instance Core.FromJSON Flow where
parseJSON :: Value -> Parser Flow
parseJSON =
String -> (Object -> Parser Flow) -> Value -> Parser Flow
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Flow"
( \Object
x ->
Maybe [MediaStream]
-> Maybe FailoverConfig
-> Maybe [VpcInterface]
-> Maybe [Source]
-> Maybe Text
-> Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow
Flow'
(Maybe [MediaStream]
-> Maybe FailoverConfig
-> Maybe [VpcInterface]
-> Maybe [Source]
-> Maybe Text
-> Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
-> Parser (Maybe [MediaStream])
-> Parser
(Maybe FailoverConfig
-> Maybe [VpcInterface]
-> Maybe [Source]
-> Maybe Text
-> Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [MediaStream]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mediaStreams" Parser (Maybe (Maybe [MediaStream]))
-> Maybe [MediaStream] -> Parser (Maybe [MediaStream])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [MediaStream]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe FailoverConfig
-> Maybe [VpcInterface]
-> Maybe [Source]
-> Maybe Text
-> Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
-> Parser (Maybe FailoverConfig)
-> Parser
(Maybe [VpcInterface]
-> Maybe [Source]
-> Maybe Text
-> Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FailoverConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sourceFailoverConfig")
Parser
(Maybe [VpcInterface]
-> Maybe [Source]
-> Maybe Text
-> Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
-> Parser (Maybe [VpcInterface])
-> Parser
(Maybe [Source]
-> Maybe Text
-> Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [VpcInterface]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"vpcInterfaces" Parser (Maybe (Maybe [VpcInterface]))
-> Maybe [VpcInterface] -> Parser (Maybe [VpcInterface])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [VpcInterface]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe [Source]
-> Maybe Text
-> Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
-> Parser (Maybe [Source])
-> Parser
(Maybe Text
-> Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Source]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sources" Parser (Maybe (Maybe [Source]))
-> Maybe [Source] -> Parser (Maybe [Source])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Source]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
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
"egressIp")
Parser
(Maybe Text
-> Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
-> Parser (Maybe Text)
-> Parser
(Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
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
(Status
-> [Entitlement]
-> [Output]
-> Text
-> Text
-> Source
-> Text
-> Flow)
-> Parser Status
-> Parser
([Entitlement]
-> [Output] -> Text -> Text -> Source -> Text -> Flow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Status
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser
([Entitlement]
-> [Output] -> Text -> Text -> Source -> Text -> Flow)
-> Parser [Entitlement]
-> Parser ([Output] -> Text -> Text -> Source -> Text -> Flow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe [Entitlement])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"entitlements" Parser (Maybe [Entitlement])
-> [Entitlement] -> Parser [Entitlement]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [Entitlement]
forall a. Monoid a => a
Prelude.mempty)
Parser ([Output] -> Text -> Text -> Source -> Text -> Flow)
-> Parser [Output]
-> Parser (Text -> Text -> Source -> Text -> Flow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe [Output])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outputs" Parser (Maybe [Output]) -> [Output] -> Parser [Output]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [Output]
forall a. Monoid a => a
Prelude.mempty)
Parser (Text -> Text -> Source -> Text -> Flow)
-> Parser Text -> Parser (Text -> Source -> Text -> Flow)
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
"availabilityZone")
Parser (Text -> Source -> Text -> Flow)
-> Parser Text -> Parser (Source -> Text -> Flow)
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
"flowArn")
Parser (Source -> Text -> Flow)
-> Parser Source -> Parser (Text -> Flow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Source
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"source")
Parser (Text -> Flow) -> Parser Text -> Parser Flow
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 Flow
instance Prelude.NFData Flow