{-# 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.ListedFlow where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConnect.Types.SourceType
import Amazonka.MediaConnect.Types.Status
import qualified Amazonka.Prelude as Prelude
data ListedFlow = ListedFlow'
{
ListedFlow -> Status
status :: Status,
ListedFlow -> Text
description :: Prelude.Text,
ListedFlow -> SourceType
sourceType :: SourceType,
ListedFlow -> Text
availabilityZone :: Prelude.Text,
ListedFlow -> Text
flowArn :: Prelude.Text,
ListedFlow -> Text
name :: Prelude.Text
}
deriving (ListedFlow -> ListedFlow -> Bool
(ListedFlow -> ListedFlow -> Bool)
-> (ListedFlow -> ListedFlow -> Bool) -> Eq ListedFlow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListedFlow -> ListedFlow -> Bool
$c/= :: ListedFlow -> ListedFlow -> Bool
== :: ListedFlow -> ListedFlow -> Bool
$c== :: ListedFlow -> ListedFlow -> Bool
Prelude.Eq, ReadPrec [ListedFlow]
ReadPrec ListedFlow
Int -> ReadS ListedFlow
ReadS [ListedFlow]
(Int -> ReadS ListedFlow)
-> ReadS [ListedFlow]
-> ReadPrec ListedFlow
-> ReadPrec [ListedFlow]
-> Read ListedFlow
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListedFlow]
$creadListPrec :: ReadPrec [ListedFlow]
readPrec :: ReadPrec ListedFlow
$creadPrec :: ReadPrec ListedFlow
readList :: ReadS [ListedFlow]
$creadList :: ReadS [ListedFlow]
readsPrec :: Int -> ReadS ListedFlow
$creadsPrec :: Int -> ReadS ListedFlow
Prelude.Read, Int -> ListedFlow -> ShowS
[ListedFlow] -> ShowS
ListedFlow -> String
(Int -> ListedFlow -> ShowS)
-> (ListedFlow -> String)
-> ([ListedFlow] -> ShowS)
-> Show ListedFlow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListedFlow] -> ShowS
$cshowList :: [ListedFlow] -> ShowS
show :: ListedFlow -> String
$cshow :: ListedFlow -> String
showsPrec :: Int -> ListedFlow -> ShowS
$cshowsPrec :: Int -> ListedFlow -> ShowS
Prelude.Show, (forall x. ListedFlow -> Rep ListedFlow x)
-> (forall x. Rep ListedFlow x -> ListedFlow) -> Generic ListedFlow
forall x. Rep ListedFlow x -> ListedFlow
forall x. ListedFlow -> Rep ListedFlow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListedFlow x -> ListedFlow
$cfrom :: forall x. ListedFlow -> Rep ListedFlow x
Prelude.Generic)
newListedFlow ::
Status ->
Prelude.Text ->
SourceType ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ListedFlow
newListedFlow :: Status -> Text -> SourceType -> Text -> Text -> Text -> ListedFlow
newListedFlow
Status
pStatus_
Text
pDescription_
SourceType
pSourceType_
Text
pAvailabilityZone_
Text
pFlowArn_
Text
pName_ =
ListedFlow' :: Status -> Text -> SourceType -> Text -> Text -> Text -> ListedFlow
ListedFlow'
{ $sel:status:ListedFlow' :: Status
status = Status
pStatus_,
$sel:description:ListedFlow' :: Text
description = Text
pDescription_,
$sel:sourceType:ListedFlow' :: SourceType
sourceType = SourceType
pSourceType_,
$sel:availabilityZone:ListedFlow' :: Text
availabilityZone = Text
pAvailabilityZone_,
$sel:flowArn:ListedFlow' :: Text
flowArn = Text
pFlowArn_,
$sel:name:ListedFlow' :: Text
name = Text
pName_
}
listedFlow_status :: Lens.Lens' ListedFlow Status
listedFlow_status :: (Status -> f Status) -> ListedFlow -> f ListedFlow
listedFlow_status = (ListedFlow -> Status)
-> (ListedFlow -> Status -> ListedFlow)
-> Lens ListedFlow ListedFlow Status Status
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedFlow' {Status
status :: Status
$sel:status:ListedFlow' :: ListedFlow -> Status
status} -> Status
status) (\s :: ListedFlow
s@ListedFlow' {} Status
a -> ListedFlow
s {$sel:status:ListedFlow' :: Status
status = Status
a} :: ListedFlow)
listedFlow_description :: Lens.Lens' ListedFlow Prelude.Text
listedFlow_description :: (Text -> f Text) -> ListedFlow -> f ListedFlow
listedFlow_description = (ListedFlow -> Text)
-> (ListedFlow -> Text -> ListedFlow)
-> Lens ListedFlow ListedFlow Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedFlow' {Text
description :: Text
$sel:description:ListedFlow' :: ListedFlow -> Text
description} -> Text
description) (\s :: ListedFlow
s@ListedFlow' {} Text
a -> ListedFlow
s {$sel:description:ListedFlow' :: Text
description = Text
a} :: ListedFlow)
listedFlow_sourceType :: Lens.Lens' ListedFlow SourceType
listedFlow_sourceType :: (SourceType -> f SourceType) -> ListedFlow -> f ListedFlow
listedFlow_sourceType = (ListedFlow -> SourceType)
-> (ListedFlow -> SourceType -> ListedFlow)
-> Lens ListedFlow ListedFlow SourceType SourceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedFlow' {SourceType
sourceType :: SourceType
$sel:sourceType:ListedFlow' :: ListedFlow -> SourceType
sourceType} -> SourceType
sourceType) (\s :: ListedFlow
s@ListedFlow' {} SourceType
a -> ListedFlow
s {$sel:sourceType:ListedFlow' :: SourceType
sourceType = SourceType
a} :: ListedFlow)
listedFlow_availabilityZone :: Lens.Lens' ListedFlow Prelude.Text
listedFlow_availabilityZone :: (Text -> f Text) -> ListedFlow -> f ListedFlow
listedFlow_availabilityZone = (ListedFlow -> Text)
-> (ListedFlow -> Text -> ListedFlow)
-> Lens ListedFlow ListedFlow Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedFlow' {Text
availabilityZone :: Text
$sel:availabilityZone:ListedFlow' :: ListedFlow -> Text
availabilityZone} -> Text
availabilityZone) (\s :: ListedFlow
s@ListedFlow' {} Text
a -> ListedFlow
s {$sel:availabilityZone:ListedFlow' :: Text
availabilityZone = Text
a} :: ListedFlow)
listedFlow_flowArn :: Lens.Lens' ListedFlow Prelude.Text
listedFlow_flowArn :: (Text -> f Text) -> ListedFlow -> f ListedFlow
listedFlow_flowArn = (ListedFlow -> Text)
-> (ListedFlow -> Text -> ListedFlow)
-> Lens ListedFlow ListedFlow Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedFlow' {Text
flowArn :: Text
$sel:flowArn:ListedFlow' :: ListedFlow -> Text
flowArn} -> Text
flowArn) (\s :: ListedFlow
s@ListedFlow' {} Text
a -> ListedFlow
s {$sel:flowArn:ListedFlow' :: Text
flowArn = Text
a} :: ListedFlow)
listedFlow_name :: Lens.Lens' ListedFlow Prelude.Text
listedFlow_name :: (Text -> f Text) -> ListedFlow -> f ListedFlow
listedFlow_name = (ListedFlow -> Text)
-> (ListedFlow -> Text -> ListedFlow)
-> Lens ListedFlow ListedFlow Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedFlow' {Text
name :: Text
$sel:name:ListedFlow' :: ListedFlow -> Text
name} -> Text
name) (\s :: ListedFlow
s@ListedFlow' {} Text
a -> ListedFlow
s {$sel:name:ListedFlow' :: Text
name = Text
a} :: ListedFlow)
instance Core.FromJSON ListedFlow where
parseJSON :: Value -> Parser ListedFlow
parseJSON =
String
-> (Object -> Parser ListedFlow) -> Value -> Parser ListedFlow
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ListedFlow"
( \Object
x ->
Status -> Text -> SourceType -> Text -> Text -> Text -> ListedFlow
ListedFlow'
(Status
-> Text -> SourceType -> Text -> Text -> Text -> ListedFlow)
-> Parser Status
-> Parser
(Text -> SourceType -> Text -> Text -> Text -> ListedFlow)
forall (f :: * -> *) a b. Functor 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 (Text -> SourceType -> Text -> Text -> Text -> ListedFlow)
-> Parser Text
-> Parser (SourceType -> Text -> Text -> Text -> ListedFlow)
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
"description")
Parser (SourceType -> Text -> Text -> Text -> ListedFlow)
-> Parser SourceType -> Parser (Text -> Text -> Text -> ListedFlow)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser SourceType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"sourceType")
Parser (Text -> Text -> Text -> ListedFlow)
-> Parser Text -> Parser (Text -> Text -> ListedFlow)
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 -> Text -> ListedFlow)
-> Parser Text -> Parser (Text -> ListedFlow)
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 (Text -> ListedFlow) -> Parser Text -> Parser ListedFlow
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 ListedFlow
instance Prelude.NFData ListedFlow