{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConnect.Types.Maintenance
import Amazonka.MediaConnect.Types.SourceType
import Amazonka.MediaConnect.Types.Status
import qualified Amazonka.Prelude as Prelude
data ListedFlow = ListedFlow'
{ ListedFlow -> Maybe Maintenance
maintenance :: Prelude.Maybe Maintenance,
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
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]
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
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. 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'
{ $sel:maintenance:ListedFlow' :: Maybe Maintenance
maintenance = forall a. Maybe a
Prelude.Nothing,
$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_maintenance :: Lens.Lens' ListedFlow (Prelude.Maybe Maintenance)
listedFlow_maintenance :: Lens' ListedFlow (Maybe Maintenance)
listedFlow_maintenance = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedFlow' {Maybe Maintenance
maintenance :: Maybe Maintenance
$sel:maintenance:ListedFlow' :: ListedFlow -> Maybe Maintenance
maintenance} -> Maybe Maintenance
maintenance) (\s :: ListedFlow
s@ListedFlow' {} Maybe Maintenance
a -> ListedFlow
s {$sel:maintenance:ListedFlow' :: Maybe Maintenance
maintenance = Maybe Maintenance
a} :: ListedFlow)
listedFlow_status :: Lens.Lens' ListedFlow Status
listedFlow_status :: Lens' ListedFlow Status
listedFlow_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 :: Lens' ListedFlow Text
listedFlow_description = 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 :: Lens' ListedFlow SourceType
listedFlow_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 :: Lens' ListedFlow Text
listedFlow_availabilityZone = 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 :: Lens' ListedFlow Text
listedFlow_flowArn = 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 :: Lens' ListedFlow Text
listedFlow_name = 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 Data.FromJSON ListedFlow where
parseJSON :: Value -> Parser ListedFlow
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ListedFlow"
( \Object
x ->
Maybe Maintenance
-> Status
-> Text
-> SourceType
-> Text
-> Text
-> Text
-> ListedFlow
ListedFlow'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"maintenance")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"sourceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"availabilityZone")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"flowArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
)
instance Prelude.Hashable ListedFlow where
hashWithSalt :: Int -> ListedFlow -> Int
hashWithSalt Int
_salt ListedFlow' {Maybe Maintenance
Text
SourceType
Status
name :: Text
flowArn :: Text
availabilityZone :: Text
sourceType :: SourceType
description :: Text
status :: Status
maintenance :: Maybe Maintenance
$sel:name:ListedFlow' :: ListedFlow -> Text
$sel:flowArn:ListedFlow' :: ListedFlow -> Text
$sel:availabilityZone:ListedFlow' :: ListedFlow -> Text
$sel:sourceType:ListedFlow' :: ListedFlow -> SourceType
$sel:description:ListedFlow' :: ListedFlow -> Text
$sel:status:ListedFlow' :: ListedFlow -> Status
$sel:maintenance:ListedFlow' :: ListedFlow -> Maybe Maintenance
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Maintenance
maintenance
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Status
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` SourceType
sourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
availabilityZone
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
flowArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData ListedFlow where
rnf :: ListedFlow -> ()
rnf ListedFlow' {Maybe Maintenance
Text
SourceType
Status
name :: Text
flowArn :: Text
availabilityZone :: Text
sourceType :: SourceType
description :: Text
status :: Status
maintenance :: Maybe Maintenance
$sel:name:ListedFlow' :: ListedFlow -> Text
$sel:flowArn:ListedFlow' :: ListedFlow -> Text
$sel:availabilityZone:ListedFlow' :: ListedFlow -> Text
$sel:sourceType:ListedFlow' :: ListedFlow -> SourceType
$sel:description:ListedFlow' :: ListedFlow -> Text
$sel:status:ListedFlow' :: ListedFlow -> Status
$sel:maintenance:ListedFlow' :: ListedFlow -> Maybe Maintenance
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Maintenance
maintenance
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Status
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf SourceType
sourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
availabilityZone
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
flowArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name