{-# 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.GroundStation.Types.DataflowDetail where
import qualified Amazonka.Core as Core
import Amazonka.GroundStation.Types.Destination
import Amazonka.GroundStation.Types.Source
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DataflowDetail = DataflowDetail'
{ DataflowDetail -> Maybe Destination
destination :: Prelude.Maybe Destination,
DataflowDetail -> Maybe Source
source :: Prelude.Maybe Source,
DataflowDetail -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text
}
deriving (DataflowDetail -> DataflowDetail -> Bool
(DataflowDetail -> DataflowDetail -> Bool)
-> (DataflowDetail -> DataflowDetail -> Bool) -> Eq DataflowDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataflowDetail -> DataflowDetail -> Bool
$c/= :: DataflowDetail -> DataflowDetail -> Bool
== :: DataflowDetail -> DataflowDetail -> Bool
$c== :: DataflowDetail -> DataflowDetail -> Bool
Prelude.Eq, ReadPrec [DataflowDetail]
ReadPrec DataflowDetail
Int -> ReadS DataflowDetail
ReadS [DataflowDetail]
(Int -> ReadS DataflowDetail)
-> ReadS [DataflowDetail]
-> ReadPrec DataflowDetail
-> ReadPrec [DataflowDetail]
-> Read DataflowDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataflowDetail]
$creadListPrec :: ReadPrec [DataflowDetail]
readPrec :: ReadPrec DataflowDetail
$creadPrec :: ReadPrec DataflowDetail
readList :: ReadS [DataflowDetail]
$creadList :: ReadS [DataflowDetail]
readsPrec :: Int -> ReadS DataflowDetail
$creadsPrec :: Int -> ReadS DataflowDetail
Prelude.Read, Int -> DataflowDetail -> ShowS
[DataflowDetail] -> ShowS
DataflowDetail -> String
(Int -> DataflowDetail -> ShowS)
-> (DataflowDetail -> String)
-> ([DataflowDetail] -> ShowS)
-> Show DataflowDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataflowDetail] -> ShowS
$cshowList :: [DataflowDetail] -> ShowS
show :: DataflowDetail -> String
$cshow :: DataflowDetail -> String
showsPrec :: Int -> DataflowDetail -> ShowS
$cshowsPrec :: Int -> DataflowDetail -> ShowS
Prelude.Show, (forall x. DataflowDetail -> Rep DataflowDetail x)
-> (forall x. Rep DataflowDetail x -> DataflowDetail)
-> Generic DataflowDetail
forall x. Rep DataflowDetail x -> DataflowDetail
forall x. DataflowDetail -> Rep DataflowDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataflowDetail x -> DataflowDetail
$cfrom :: forall x. DataflowDetail -> Rep DataflowDetail x
Prelude.Generic)
newDataflowDetail ::
DataflowDetail
newDataflowDetail :: DataflowDetail
newDataflowDetail =
DataflowDetail' :: Maybe Destination -> Maybe Source -> Maybe Text -> DataflowDetail
DataflowDetail'
{ $sel:destination:DataflowDetail' :: Maybe Destination
destination = Maybe Destination
forall a. Maybe a
Prelude.Nothing,
$sel:source:DataflowDetail' :: Maybe Source
source = Maybe Source
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:DataflowDetail' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dataflowDetail_destination :: Lens.Lens' DataflowDetail (Prelude.Maybe Destination)
dataflowDetail_destination :: (Maybe Destination -> f (Maybe Destination))
-> DataflowDetail -> f DataflowDetail
dataflowDetail_destination = (DataflowDetail -> Maybe Destination)
-> (DataflowDetail -> Maybe Destination -> DataflowDetail)
-> Lens
DataflowDetail
DataflowDetail
(Maybe Destination)
(Maybe Destination)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataflowDetail' {Maybe Destination
destination :: Maybe Destination
$sel:destination:DataflowDetail' :: DataflowDetail -> Maybe Destination
destination} -> Maybe Destination
destination) (\s :: DataflowDetail
s@DataflowDetail' {} Maybe Destination
a -> DataflowDetail
s {$sel:destination:DataflowDetail' :: Maybe Destination
destination = Maybe Destination
a} :: DataflowDetail)
dataflowDetail_source :: Lens.Lens' DataflowDetail (Prelude.Maybe Source)
dataflowDetail_source :: (Maybe Source -> f (Maybe Source))
-> DataflowDetail -> f DataflowDetail
dataflowDetail_source = (DataflowDetail -> Maybe Source)
-> (DataflowDetail -> Maybe Source -> DataflowDetail)
-> Lens DataflowDetail DataflowDetail (Maybe Source) (Maybe Source)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataflowDetail' {Maybe Source
source :: Maybe Source
$sel:source:DataflowDetail' :: DataflowDetail -> Maybe Source
source} -> Maybe Source
source) (\s :: DataflowDetail
s@DataflowDetail' {} Maybe Source
a -> DataflowDetail
s {$sel:source:DataflowDetail' :: Maybe Source
source = Maybe Source
a} :: DataflowDetail)
dataflowDetail_errorMessage :: Lens.Lens' DataflowDetail (Prelude.Maybe Prelude.Text)
dataflowDetail_errorMessage :: (Maybe Text -> f (Maybe Text))
-> DataflowDetail -> f DataflowDetail
dataflowDetail_errorMessage = (DataflowDetail -> Maybe Text)
-> (DataflowDetail -> Maybe Text -> DataflowDetail)
-> Lens DataflowDetail DataflowDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataflowDetail' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:DataflowDetail' :: DataflowDetail -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: DataflowDetail
s@DataflowDetail' {} Maybe Text
a -> DataflowDetail
s {$sel:errorMessage:DataflowDetail' :: Maybe Text
errorMessage = Maybe Text
a} :: DataflowDetail)
instance Core.FromJSON DataflowDetail where
parseJSON :: Value -> Parser DataflowDetail
parseJSON =
String
-> (Object -> Parser DataflowDetail)
-> Value
-> Parser DataflowDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DataflowDetail"
( \Object
x ->
Maybe Destination -> Maybe Source -> Maybe Text -> DataflowDetail
DataflowDetail'
(Maybe Destination -> Maybe Source -> Maybe Text -> DataflowDetail)
-> Parser (Maybe Destination)
-> Parser (Maybe Source -> Maybe Text -> DataflowDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Destination)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"destination")
Parser (Maybe Source -> Maybe Text -> DataflowDetail)
-> Parser (Maybe Source) -> Parser (Maybe Text -> DataflowDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Source)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"source")
Parser (Maybe Text -> DataflowDetail)
-> Parser (Maybe Text) -> Parser DataflowDetail
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
"errorMessage")
)
instance Prelude.Hashable DataflowDetail
instance Prelude.NFData DataflowDetail