{-# 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.DrS.Types.StagingArea where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DrS.Types.ExtensionStatus
import qualified Amazonka.Prelude as Prelude
data StagingArea = StagingArea'
{
StagingArea -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
StagingArea -> Maybe Text
stagingAccountID :: Prelude.Maybe Prelude.Text,
StagingArea -> Maybe Text
stagingSourceServerArn :: Prelude.Maybe Prelude.Text,
StagingArea -> Maybe ExtensionStatus
status :: Prelude.Maybe ExtensionStatus
}
deriving (StagingArea -> StagingArea -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StagingArea -> StagingArea -> Bool
$c/= :: StagingArea -> StagingArea -> Bool
== :: StagingArea -> StagingArea -> Bool
$c== :: StagingArea -> StagingArea -> Bool
Prelude.Eq, ReadPrec [StagingArea]
ReadPrec StagingArea
Int -> ReadS StagingArea
ReadS [StagingArea]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StagingArea]
$creadListPrec :: ReadPrec [StagingArea]
readPrec :: ReadPrec StagingArea
$creadPrec :: ReadPrec StagingArea
readList :: ReadS [StagingArea]
$creadList :: ReadS [StagingArea]
readsPrec :: Int -> ReadS StagingArea
$creadsPrec :: Int -> ReadS StagingArea
Prelude.Read, Int -> StagingArea -> ShowS
[StagingArea] -> ShowS
StagingArea -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StagingArea] -> ShowS
$cshowList :: [StagingArea] -> ShowS
show :: StagingArea -> String
$cshow :: StagingArea -> String
showsPrec :: Int -> StagingArea -> ShowS
$cshowsPrec :: Int -> StagingArea -> ShowS
Prelude.Show, forall x. Rep StagingArea x -> StagingArea
forall x. StagingArea -> Rep StagingArea x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StagingArea x -> StagingArea
$cfrom :: forall x. StagingArea -> Rep StagingArea x
Prelude.Generic)
newStagingArea ::
StagingArea
newStagingArea :: StagingArea
newStagingArea =
StagingArea'
{ $sel:errorMessage:StagingArea' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing,
$sel:stagingAccountID:StagingArea' :: Maybe Text
stagingAccountID = forall a. Maybe a
Prelude.Nothing,
$sel:stagingSourceServerArn:StagingArea' :: Maybe Text
stagingSourceServerArn = forall a. Maybe a
Prelude.Nothing,
$sel:status:StagingArea' :: Maybe ExtensionStatus
status = forall a. Maybe a
Prelude.Nothing
}
stagingArea_errorMessage :: Lens.Lens' StagingArea (Prelude.Maybe Prelude.Text)
stagingArea_errorMessage :: Lens' StagingArea (Maybe Text)
stagingArea_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StagingArea' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:StagingArea' :: StagingArea -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: StagingArea
s@StagingArea' {} Maybe Text
a -> StagingArea
s {$sel:errorMessage:StagingArea' :: Maybe Text
errorMessage = Maybe Text
a} :: StagingArea)
stagingArea_stagingAccountID :: Lens.Lens' StagingArea (Prelude.Maybe Prelude.Text)
stagingArea_stagingAccountID :: Lens' StagingArea (Maybe Text)
stagingArea_stagingAccountID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StagingArea' {Maybe Text
stagingAccountID :: Maybe Text
$sel:stagingAccountID:StagingArea' :: StagingArea -> Maybe Text
stagingAccountID} -> Maybe Text
stagingAccountID) (\s :: StagingArea
s@StagingArea' {} Maybe Text
a -> StagingArea
s {$sel:stagingAccountID:StagingArea' :: Maybe Text
stagingAccountID = Maybe Text
a} :: StagingArea)
stagingArea_stagingSourceServerArn :: Lens.Lens' StagingArea (Prelude.Maybe Prelude.Text)
stagingArea_stagingSourceServerArn :: Lens' StagingArea (Maybe Text)
stagingArea_stagingSourceServerArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StagingArea' {Maybe Text
stagingSourceServerArn :: Maybe Text
$sel:stagingSourceServerArn:StagingArea' :: StagingArea -> Maybe Text
stagingSourceServerArn} -> Maybe Text
stagingSourceServerArn) (\s :: StagingArea
s@StagingArea' {} Maybe Text
a -> StagingArea
s {$sel:stagingSourceServerArn:StagingArea' :: Maybe Text
stagingSourceServerArn = Maybe Text
a} :: StagingArea)
stagingArea_status :: Lens.Lens' StagingArea (Prelude.Maybe ExtensionStatus)
stagingArea_status :: Lens' StagingArea (Maybe ExtensionStatus)
stagingArea_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StagingArea' {Maybe ExtensionStatus
status :: Maybe ExtensionStatus
$sel:status:StagingArea' :: StagingArea -> Maybe ExtensionStatus
status} -> Maybe ExtensionStatus
status) (\s :: StagingArea
s@StagingArea' {} Maybe ExtensionStatus
a -> StagingArea
s {$sel:status:StagingArea' :: Maybe ExtensionStatus
status = Maybe ExtensionStatus
a} :: StagingArea)
instance Data.FromJSON StagingArea where
parseJSON :: Value -> Parser StagingArea
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"StagingArea"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe ExtensionStatus -> StagingArea
StagingArea'
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
"errorMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"stagingAccountID")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"stagingSourceServerArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"status")
)
instance Prelude.Hashable StagingArea where
hashWithSalt :: Int -> StagingArea -> Int
hashWithSalt Int
_salt StagingArea' {Maybe Text
Maybe ExtensionStatus
status :: Maybe ExtensionStatus
stagingSourceServerArn :: Maybe Text
stagingAccountID :: Maybe Text
errorMessage :: Maybe Text
$sel:status:StagingArea' :: StagingArea -> Maybe ExtensionStatus
$sel:stagingSourceServerArn:StagingArea' :: StagingArea -> Maybe Text
$sel:stagingAccountID:StagingArea' :: StagingArea -> Maybe Text
$sel:errorMessage:StagingArea' :: StagingArea -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stagingAccountID
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stagingSourceServerArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ExtensionStatus
status
instance Prelude.NFData StagingArea where
rnf :: StagingArea -> ()
rnf StagingArea' {Maybe Text
Maybe ExtensionStatus
status :: Maybe ExtensionStatus
stagingSourceServerArn :: Maybe Text
stagingAccountID :: Maybe Text
errorMessage :: Maybe Text
$sel:status:StagingArea' :: StagingArea -> Maybe ExtensionStatus
$sel:stagingSourceServerArn:StagingArea' :: StagingArea -> Maybe Text
$sel:stagingAccountID:StagingArea' :: StagingArea -> Maybe Text
$sel:errorMessage:StagingArea' :: StagingArea -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stagingAccountID
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stagingSourceServerArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExtensionStatus
status