{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Backup.StartCopyJob
(
StartCopyJob (..),
newStartCopyJob,
startCopyJob_idempotencyToken,
startCopyJob_lifecycle,
startCopyJob_recoveryPointArn,
startCopyJob_sourceBackupVaultName,
startCopyJob_destinationBackupVaultArn,
startCopyJob_iamRoleArn,
StartCopyJobResponse (..),
newStartCopyJobResponse,
startCopyJobResponse_copyJobId,
startCopyJobResponse_creationDate,
startCopyJobResponse_httpStatus,
)
where
import Amazonka.Backup.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StartCopyJob = StartCopyJob'
{
StartCopyJob -> Maybe Text
idempotencyToken :: Prelude.Maybe Prelude.Text,
StartCopyJob -> Maybe Lifecycle
lifecycle :: Prelude.Maybe Lifecycle,
StartCopyJob -> Text
recoveryPointArn :: Prelude.Text,
StartCopyJob -> Text
sourceBackupVaultName :: Prelude.Text,
StartCopyJob -> Text
destinationBackupVaultArn :: Prelude.Text,
StartCopyJob -> Text
iamRoleArn :: Prelude.Text
}
deriving (StartCopyJob -> StartCopyJob -> Bool
(StartCopyJob -> StartCopyJob -> Bool)
-> (StartCopyJob -> StartCopyJob -> Bool) -> Eq StartCopyJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartCopyJob -> StartCopyJob -> Bool
$c/= :: StartCopyJob -> StartCopyJob -> Bool
== :: StartCopyJob -> StartCopyJob -> Bool
$c== :: StartCopyJob -> StartCopyJob -> Bool
Prelude.Eq, ReadPrec [StartCopyJob]
ReadPrec StartCopyJob
Int -> ReadS StartCopyJob
ReadS [StartCopyJob]
(Int -> ReadS StartCopyJob)
-> ReadS [StartCopyJob]
-> ReadPrec StartCopyJob
-> ReadPrec [StartCopyJob]
-> Read StartCopyJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartCopyJob]
$creadListPrec :: ReadPrec [StartCopyJob]
readPrec :: ReadPrec StartCopyJob
$creadPrec :: ReadPrec StartCopyJob
readList :: ReadS [StartCopyJob]
$creadList :: ReadS [StartCopyJob]
readsPrec :: Int -> ReadS StartCopyJob
$creadsPrec :: Int -> ReadS StartCopyJob
Prelude.Read, Int -> StartCopyJob -> ShowS
[StartCopyJob] -> ShowS
StartCopyJob -> String
(Int -> StartCopyJob -> ShowS)
-> (StartCopyJob -> String)
-> ([StartCopyJob] -> ShowS)
-> Show StartCopyJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartCopyJob] -> ShowS
$cshowList :: [StartCopyJob] -> ShowS
show :: StartCopyJob -> String
$cshow :: StartCopyJob -> String
showsPrec :: Int -> StartCopyJob -> ShowS
$cshowsPrec :: Int -> StartCopyJob -> ShowS
Prelude.Show, (forall x. StartCopyJob -> Rep StartCopyJob x)
-> (forall x. Rep StartCopyJob x -> StartCopyJob)
-> Generic StartCopyJob
forall x. Rep StartCopyJob x -> StartCopyJob
forall x. StartCopyJob -> Rep StartCopyJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartCopyJob x -> StartCopyJob
$cfrom :: forall x. StartCopyJob -> Rep StartCopyJob x
Prelude.Generic)
newStartCopyJob ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
StartCopyJob
newStartCopyJob :: Text -> Text -> Text -> Text -> StartCopyJob
newStartCopyJob
Text
pRecoveryPointArn_
Text
pSourceBackupVaultName_
Text
pDestinationBackupVaultArn_
Text
pIamRoleArn_ =
StartCopyJob' :: Maybe Text
-> Maybe Lifecycle -> Text -> Text -> Text -> Text -> StartCopyJob
StartCopyJob'
{ $sel:idempotencyToken:StartCopyJob' :: Maybe Text
idempotencyToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lifecycle:StartCopyJob' :: Maybe Lifecycle
lifecycle = Maybe Lifecycle
forall a. Maybe a
Prelude.Nothing,
$sel:recoveryPointArn:StartCopyJob' :: Text
recoveryPointArn = Text
pRecoveryPointArn_,
$sel:sourceBackupVaultName:StartCopyJob' :: Text
sourceBackupVaultName = Text
pSourceBackupVaultName_,
$sel:destinationBackupVaultArn:StartCopyJob' :: Text
destinationBackupVaultArn =
Text
pDestinationBackupVaultArn_,
$sel:iamRoleArn:StartCopyJob' :: Text
iamRoleArn = Text
pIamRoleArn_
}
startCopyJob_idempotencyToken :: Lens.Lens' StartCopyJob (Prelude.Maybe Prelude.Text)
startCopyJob_idempotencyToken :: (Maybe Text -> f (Maybe Text)) -> StartCopyJob -> f StartCopyJob
startCopyJob_idempotencyToken = (StartCopyJob -> Maybe Text)
-> (StartCopyJob -> Maybe Text -> StartCopyJob)
-> Lens StartCopyJob StartCopyJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartCopyJob' {Maybe Text
idempotencyToken :: Maybe Text
$sel:idempotencyToken:StartCopyJob' :: StartCopyJob -> Maybe Text
idempotencyToken} -> Maybe Text
idempotencyToken) (\s :: StartCopyJob
s@StartCopyJob' {} Maybe Text
a -> StartCopyJob
s {$sel:idempotencyToken:StartCopyJob' :: Maybe Text
idempotencyToken = Maybe Text
a} :: StartCopyJob)
startCopyJob_lifecycle :: Lens.Lens' StartCopyJob (Prelude.Maybe Lifecycle)
startCopyJob_lifecycle :: (Maybe Lifecycle -> f (Maybe Lifecycle))
-> StartCopyJob -> f StartCopyJob
startCopyJob_lifecycle = (StartCopyJob -> Maybe Lifecycle)
-> (StartCopyJob -> Maybe Lifecycle -> StartCopyJob)
-> Lens
StartCopyJob StartCopyJob (Maybe Lifecycle) (Maybe Lifecycle)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartCopyJob' {Maybe Lifecycle
lifecycle :: Maybe Lifecycle
$sel:lifecycle:StartCopyJob' :: StartCopyJob -> Maybe Lifecycle
lifecycle} -> Maybe Lifecycle
lifecycle) (\s :: StartCopyJob
s@StartCopyJob' {} Maybe Lifecycle
a -> StartCopyJob
s {$sel:lifecycle:StartCopyJob' :: Maybe Lifecycle
lifecycle = Maybe Lifecycle
a} :: StartCopyJob)
startCopyJob_recoveryPointArn :: Lens.Lens' StartCopyJob Prelude.Text
startCopyJob_recoveryPointArn :: (Text -> f Text) -> StartCopyJob -> f StartCopyJob
startCopyJob_recoveryPointArn = (StartCopyJob -> Text)
-> (StartCopyJob -> Text -> StartCopyJob)
-> Lens StartCopyJob StartCopyJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartCopyJob' {Text
recoveryPointArn :: Text
$sel:recoveryPointArn:StartCopyJob' :: StartCopyJob -> Text
recoveryPointArn} -> Text
recoveryPointArn) (\s :: StartCopyJob
s@StartCopyJob' {} Text
a -> StartCopyJob
s {$sel:recoveryPointArn:StartCopyJob' :: Text
recoveryPointArn = Text
a} :: StartCopyJob)
startCopyJob_sourceBackupVaultName :: Lens.Lens' StartCopyJob Prelude.Text
startCopyJob_sourceBackupVaultName :: (Text -> f Text) -> StartCopyJob -> f StartCopyJob
startCopyJob_sourceBackupVaultName = (StartCopyJob -> Text)
-> (StartCopyJob -> Text -> StartCopyJob)
-> Lens StartCopyJob StartCopyJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartCopyJob' {Text
sourceBackupVaultName :: Text
$sel:sourceBackupVaultName:StartCopyJob' :: StartCopyJob -> Text
sourceBackupVaultName} -> Text
sourceBackupVaultName) (\s :: StartCopyJob
s@StartCopyJob' {} Text
a -> StartCopyJob
s {$sel:sourceBackupVaultName:StartCopyJob' :: Text
sourceBackupVaultName = Text
a} :: StartCopyJob)
startCopyJob_destinationBackupVaultArn :: Lens.Lens' StartCopyJob Prelude.Text
startCopyJob_destinationBackupVaultArn :: (Text -> f Text) -> StartCopyJob -> f StartCopyJob
startCopyJob_destinationBackupVaultArn = (StartCopyJob -> Text)
-> (StartCopyJob -> Text -> StartCopyJob)
-> Lens StartCopyJob StartCopyJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartCopyJob' {Text
destinationBackupVaultArn :: Text
$sel:destinationBackupVaultArn:StartCopyJob' :: StartCopyJob -> Text
destinationBackupVaultArn} -> Text
destinationBackupVaultArn) (\s :: StartCopyJob
s@StartCopyJob' {} Text
a -> StartCopyJob
s {$sel:destinationBackupVaultArn:StartCopyJob' :: Text
destinationBackupVaultArn = Text
a} :: StartCopyJob)
startCopyJob_iamRoleArn :: Lens.Lens' StartCopyJob Prelude.Text
startCopyJob_iamRoleArn :: (Text -> f Text) -> StartCopyJob -> f StartCopyJob
startCopyJob_iamRoleArn = (StartCopyJob -> Text)
-> (StartCopyJob -> Text -> StartCopyJob)
-> Lens StartCopyJob StartCopyJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartCopyJob' {Text
iamRoleArn :: Text
$sel:iamRoleArn:StartCopyJob' :: StartCopyJob -> Text
iamRoleArn} -> Text
iamRoleArn) (\s :: StartCopyJob
s@StartCopyJob' {} Text
a -> StartCopyJob
s {$sel:iamRoleArn:StartCopyJob' :: Text
iamRoleArn = Text
a} :: StartCopyJob)
instance Core.AWSRequest StartCopyJob where
type AWSResponse StartCopyJob = StartCopyJobResponse
request :: StartCopyJob -> Request StartCopyJob
request = Service -> StartCopyJob -> Request StartCopyJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartCopyJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartCopyJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartCopyJob))
-> Logger
-> Service
-> Proxy StartCopyJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartCopyJob)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Maybe POSIX -> Int -> StartCopyJobResponse
StartCopyJobResponse'
(Maybe Text -> Maybe POSIX -> Int -> StartCopyJobResponse)
-> Either String (Maybe Text)
-> Either String (Maybe POSIX -> Int -> StartCopyJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CopyJobId")
Either String (Maybe POSIX -> Int -> StartCopyJobResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> StartCopyJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationDate")
Either String (Int -> StartCopyJobResponse)
-> Either String Int -> Either String StartCopyJobResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable StartCopyJob
instance Prelude.NFData StartCopyJob
instance Core.ToHeaders StartCopyJob where
toHeaders :: StartCopyJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> StartCopyJob -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON StartCopyJob where
toJSON :: StartCopyJob -> Value
toJSON StartCopyJob' {Maybe Text
Maybe Lifecycle
Text
iamRoleArn :: Text
destinationBackupVaultArn :: Text
sourceBackupVaultName :: Text
recoveryPointArn :: Text
lifecycle :: Maybe Lifecycle
idempotencyToken :: Maybe Text
$sel:iamRoleArn:StartCopyJob' :: StartCopyJob -> Text
$sel:destinationBackupVaultArn:StartCopyJob' :: StartCopyJob -> Text
$sel:sourceBackupVaultName:StartCopyJob' :: StartCopyJob -> Text
$sel:recoveryPointArn:StartCopyJob' :: StartCopyJob -> Text
$sel:lifecycle:StartCopyJob' :: StartCopyJob -> Maybe Lifecycle
$sel:idempotencyToken:StartCopyJob' :: StartCopyJob -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"IdempotencyToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
idempotencyToken,
(Text
"Lifecycle" Text -> Lifecycle -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Lifecycle -> Pair) -> Maybe Lifecycle -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Lifecycle
lifecycle,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"RecoveryPointArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
recoveryPointArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"SourceBackupVaultName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sourceBackupVaultName
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"DestinationBackupVaultArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
destinationBackupVaultArn
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IamRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
iamRoleArn)
]
)
instance Core.ToPath StartCopyJob where
toPath :: StartCopyJob -> ByteString
toPath = ByteString -> StartCopyJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/copy-jobs"
instance Core.ToQuery StartCopyJob where
toQuery :: StartCopyJob -> QueryString
toQuery = QueryString -> StartCopyJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartCopyJobResponse = StartCopyJobResponse'
{
StartCopyJobResponse -> Maybe Text
copyJobId :: Prelude.Maybe Prelude.Text,
StartCopyJobResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
StartCopyJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartCopyJobResponse -> StartCopyJobResponse -> Bool
(StartCopyJobResponse -> StartCopyJobResponse -> Bool)
-> (StartCopyJobResponse -> StartCopyJobResponse -> Bool)
-> Eq StartCopyJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartCopyJobResponse -> StartCopyJobResponse -> Bool
$c/= :: StartCopyJobResponse -> StartCopyJobResponse -> Bool
== :: StartCopyJobResponse -> StartCopyJobResponse -> Bool
$c== :: StartCopyJobResponse -> StartCopyJobResponse -> Bool
Prelude.Eq, ReadPrec [StartCopyJobResponse]
ReadPrec StartCopyJobResponse
Int -> ReadS StartCopyJobResponse
ReadS [StartCopyJobResponse]
(Int -> ReadS StartCopyJobResponse)
-> ReadS [StartCopyJobResponse]
-> ReadPrec StartCopyJobResponse
-> ReadPrec [StartCopyJobResponse]
-> Read StartCopyJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartCopyJobResponse]
$creadListPrec :: ReadPrec [StartCopyJobResponse]
readPrec :: ReadPrec StartCopyJobResponse
$creadPrec :: ReadPrec StartCopyJobResponse
readList :: ReadS [StartCopyJobResponse]
$creadList :: ReadS [StartCopyJobResponse]
readsPrec :: Int -> ReadS StartCopyJobResponse
$creadsPrec :: Int -> ReadS StartCopyJobResponse
Prelude.Read, Int -> StartCopyJobResponse -> ShowS
[StartCopyJobResponse] -> ShowS
StartCopyJobResponse -> String
(Int -> StartCopyJobResponse -> ShowS)
-> (StartCopyJobResponse -> String)
-> ([StartCopyJobResponse] -> ShowS)
-> Show StartCopyJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartCopyJobResponse] -> ShowS
$cshowList :: [StartCopyJobResponse] -> ShowS
show :: StartCopyJobResponse -> String
$cshow :: StartCopyJobResponse -> String
showsPrec :: Int -> StartCopyJobResponse -> ShowS
$cshowsPrec :: Int -> StartCopyJobResponse -> ShowS
Prelude.Show, (forall x. StartCopyJobResponse -> Rep StartCopyJobResponse x)
-> (forall x. Rep StartCopyJobResponse x -> StartCopyJobResponse)
-> Generic StartCopyJobResponse
forall x. Rep StartCopyJobResponse x -> StartCopyJobResponse
forall x. StartCopyJobResponse -> Rep StartCopyJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartCopyJobResponse x -> StartCopyJobResponse
$cfrom :: forall x. StartCopyJobResponse -> Rep StartCopyJobResponse x
Prelude.Generic)
newStartCopyJobResponse ::
Prelude.Int ->
StartCopyJobResponse
newStartCopyJobResponse :: Int -> StartCopyJobResponse
newStartCopyJobResponse Int
pHttpStatus_ =
StartCopyJobResponse' :: Maybe Text -> Maybe POSIX -> Int -> StartCopyJobResponse
StartCopyJobResponse'
{ $sel:copyJobId:StartCopyJobResponse' :: Maybe Text
copyJobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:StartCopyJobResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartCopyJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startCopyJobResponse_copyJobId :: Lens.Lens' StartCopyJobResponse (Prelude.Maybe Prelude.Text)
startCopyJobResponse_copyJobId :: (Maybe Text -> f (Maybe Text))
-> StartCopyJobResponse -> f StartCopyJobResponse
startCopyJobResponse_copyJobId = (StartCopyJobResponse -> Maybe Text)
-> (StartCopyJobResponse -> Maybe Text -> StartCopyJobResponse)
-> Lens
StartCopyJobResponse StartCopyJobResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartCopyJobResponse' {Maybe Text
copyJobId :: Maybe Text
$sel:copyJobId:StartCopyJobResponse' :: StartCopyJobResponse -> Maybe Text
copyJobId} -> Maybe Text
copyJobId) (\s :: StartCopyJobResponse
s@StartCopyJobResponse' {} Maybe Text
a -> StartCopyJobResponse
s {$sel:copyJobId:StartCopyJobResponse' :: Maybe Text
copyJobId = Maybe Text
a} :: StartCopyJobResponse)
startCopyJobResponse_creationDate :: Lens.Lens' StartCopyJobResponse (Prelude.Maybe Prelude.UTCTime)
startCopyJobResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StartCopyJobResponse -> f StartCopyJobResponse
startCopyJobResponse_creationDate = (StartCopyJobResponse -> Maybe POSIX)
-> (StartCopyJobResponse -> Maybe POSIX -> StartCopyJobResponse)
-> Lens
StartCopyJobResponse
StartCopyJobResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartCopyJobResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:StartCopyJobResponse' :: StartCopyJobResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: StartCopyJobResponse
s@StartCopyJobResponse' {} Maybe POSIX
a -> StartCopyJobResponse
s {$sel:creationDate:StartCopyJobResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: StartCopyJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> StartCopyJobResponse -> f StartCopyJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StartCopyJobResponse
-> f StartCopyJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
startCopyJobResponse_httpStatus :: Lens.Lens' StartCopyJobResponse Prelude.Int
startCopyJobResponse_httpStatus :: (Int -> f Int) -> StartCopyJobResponse -> f StartCopyJobResponse
startCopyJobResponse_httpStatus = (StartCopyJobResponse -> Int)
-> (StartCopyJobResponse -> Int -> StartCopyJobResponse)
-> Lens StartCopyJobResponse StartCopyJobResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartCopyJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartCopyJobResponse' :: StartCopyJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartCopyJobResponse
s@StartCopyJobResponse' {} Int
a -> StartCopyJobResponse
s {$sel:httpStatus:StartCopyJobResponse' :: Int
httpStatus = Int
a} :: StartCopyJobResponse)
instance Prelude.NFData StartCopyJobResponse