{-# 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.CreateBackupPlan
(
CreateBackupPlan (..),
newCreateBackupPlan,
createBackupPlan_backupPlanTags,
createBackupPlan_creatorRequestId,
createBackupPlan_backupPlan,
CreateBackupPlanResponse (..),
newCreateBackupPlanResponse,
createBackupPlanResponse_versionId,
createBackupPlanResponse_advancedBackupSettings,
createBackupPlanResponse_backupPlanId,
createBackupPlanResponse_backupPlanArn,
createBackupPlanResponse_creationDate,
createBackupPlanResponse_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 CreateBackupPlan = CreateBackupPlan'
{
CreateBackupPlan -> Maybe (Sensitive (HashMap Text Text))
backupPlanTags :: Prelude.Maybe (Core.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
CreateBackupPlan -> Maybe Text
creatorRequestId :: Prelude.Maybe Prelude.Text,
CreateBackupPlan -> BackupPlanInput
backupPlan :: BackupPlanInput
}
deriving (CreateBackupPlan -> CreateBackupPlan -> Bool
(CreateBackupPlan -> CreateBackupPlan -> Bool)
-> (CreateBackupPlan -> CreateBackupPlan -> Bool)
-> Eq CreateBackupPlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBackupPlan -> CreateBackupPlan -> Bool
$c/= :: CreateBackupPlan -> CreateBackupPlan -> Bool
== :: CreateBackupPlan -> CreateBackupPlan -> Bool
$c== :: CreateBackupPlan -> CreateBackupPlan -> Bool
Prelude.Eq, Int -> CreateBackupPlan -> ShowS
[CreateBackupPlan] -> ShowS
CreateBackupPlan -> String
(Int -> CreateBackupPlan -> ShowS)
-> (CreateBackupPlan -> String)
-> ([CreateBackupPlan] -> ShowS)
-> Show CreateBackupPlan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBackupPlan] -> ShowS
$cshowList :: [CreateBackupPlan] -> ShowS
show :: CreateBackupPlan -> String
$cshow :: CreateBackupPlan -> String
showsPrec :: Int -> CreateBackupPlan -> ShowS
$cshowsPrec :: Int -> CreateBackupPlan -> ShowS
Prelude.Show, (forall x. CreateBackupPlan -> Rep CreateBackupPlan x)
-> (forall x. Rep CreateBackupPlan x -> CreateBackupPlan)
-> Generic CreateBackupPlan
forall x. Rep CreateBackupPlan x -> CreateBackupPlan
forall x. CreateBackupPlan -> Rep CreateBackupPlan x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateBackupPlan x -> CreateBackupPlan
$cfrom :: forall x. CreateBackupPlan -> Rep CreateBackupPlan x
Prelude.Generic)
newCreateBackupPlan ::
BackupPlanInput ->
CreateBackupPlan
newCreateBackupPlan :: BackupPlanInput -> CreateBackupPlan
newCreateBackupPlan BackupPlanInput
pBackupPlan_ =
CreateBackupPlan' :: Maybe (Sensitive (HashMap Text Text))
-> Maybe Text -> BackupPlanInput -> CreateBackupPlan
CreateBackupPlan'
{ $sel:backupPlanTags:CreateBackupPlan' :: Maybe (Sensitive (HashMap Text Text))
backupPlanTags = Maybe (Sensitive (HashMap Text Text))
forall a. Maybe a
Prelude.Nothing,
$sel:creatorRequestId:CreateBackupPlan' :: Maybe Text
creatorRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:backupPlan:CreateBackupPlan' :: BackupPlanInput
backupPlan = BackupPlanInput
pBackupPlan_
}
createBackupPlan_backupPlanTags :: Lens.Lens' CreateBackupPlan (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createBackupPlan_backupPlanTags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateBackupPlan -> f CreateBackupPlan
createBackupPlan_backupPlanTags = (CreateBackupPlan -> Maybe (Sensitive (HashMap Text Text)))
-> (CreateBackupPlan
-> Maybe (Sensitive (HashMap Text Text)) -> CreateBackupPlan)
-> Lens
CreateBackupPlan
CreateBackupPlan
(Maybe (Sensitive (HashMap Text Text)))
(Maybe (Sensitive (HashMap Text Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackupPlan' {Maybe (Sensitive (HashMap Text Text))
backupPlanTags :: Maybe (Sensitive (HashMap Text Text))
$sel:backupPlanTags:CreateBackupPlan' :: CreateBackupPlan -> Maybe (Sensitive (HashMap Text Text))
backupPlanTags} -> Maybe (Sensitive (HashMap Text Text))
backupPlanTags) (\s :: CreateBackupPlan
s@CreateBackupPlan' {} Maybe (Sensitive (HashMap Text Text))
a -> CreateBackupPlan
s {$sel:backupPlanTags:CreateBackupPlan' :: Maybe (Sensitive (HashMap Text Text))
backupPlanTags = Maybe (Sensitive (HashMap Text Text))
a} :: CreateBackupPlan) ((Maybe (Sensitive (HashMap Text Text))
-> f (Maybe (Sensitive (HashMap Text Text))))
-> CreateBackupPlan -> f CreateBackupPlan)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (Sensitive (HashMap Text Text))
-> f (Maybe (Sensitive (HashMap Text Text))))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateBackupPlan
-> f CreateBackupPlan
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (Sensitive (HashMap Text Text)))
(Maybe (Sensitive (HashMap Text Text)))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
-> (Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text)))
-> AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
createBackupPlan_creatorRequestId :: Lens.Lens' CreateBackupPlan (Prelude.Maybe Prelude.Text)
createBackupPlan_creatorRequestId :: (Maybe Text -> f (Maybe Text))
-> CreateBackupPlan -> f CreateBackupPlan
createBackupPlan_creatorRequestId = (CreateBackupPlan -> Maybe Text)
-> (CreateBackupPlan -> Maybe Text -> CreateBackupPlan)
-> Lens CreateBackupPlan CreateBackupPlan (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackupPlan' {Maybe Text
creatorRequestId :: Maybe Text
$sel:creatorRequestId:CreateBackupPlan' :: CreateBackupPlan -> Maybe Text
creatorRequestId} -> Maybe Text
creatorRequestId) (\s :: CreateBackupPlan
s@CreateBackupPlan' {} Maybe Text
a -> CreateBackupPlan
s {$sel:creatorRequestId:CreateBackupPlan' :: Maybe Text
creatorRequestId = Maybe Text
a} :: CreateBackupPlan)
createBackupPlan_backupPlan :: Lens.Lens' CreateBackupPlan BackupPlanInput
createBackupPlan_backupPlan :: (BackupPlanInput -> f BackupPlanInput)
-> CreateBackupPlan -> f CreateBackupPlan
createBackupPlan_backupPlan = (CreateBackupPlan -> BackupPlanInput)
-> (CreateBackupPlan -> BackupPlanInput -> CreateBackupPlan)
-> Lens
CreateBackupPlan CreateBackupPlan BackupPlanInput BackupPlanInput
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackupPlan' {BackupPlanInput
backupPlan :: BackupPlanInput
$sel:backupPlan:CreateBackupPlan' :: CreateBackupPlan -> BackupPlanInput
backupPlan} -> BackupPlanInput
backupPlan) (\s :: CreateBackupPlan
s@CreateBackupPlan' {} BackupPlanInput
a -> CreateBackupPlan
s {$sel:backupPlan:CreateBackupPlan' :: BackupPlanInput
backupPlan = BackupPlanInput
a} :: CreateBackupPlan)
instance Core.AWSRequest CreateBackupPlan where
type
AWSResponse CreateBackupPlan =
CreateBackupPlanResponse
request :: CreateBackupPlan -> Request CreateBackupPlan
request = Service -> CreateBackupPlan -> Request CreateBackupPlan
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateBackupPlan
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateBackupPlan)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateBackupPlan))
-> Logger
-> Service
-> Proxy CreateBackupPlan
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateBackupPlan)))
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 [AdvancedBackupSetting]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> CreateBackupPlanResponse
CreateBackupPlanResponse'
(Maybe Text
-> Maybe [AdvancedBackupSetting]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> CreateBackupPlanResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [AdvancedBackupSetting]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> CreateBackupPlanResponse)
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
"VersionId")
Either
String
(Maybe [AdvancedBackupSetting]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> CreateBackupPlanResponse)
-> Either String (Maybe [AdvancedBackupSetting])
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe POSIX -> Int -> CreateBackupPlanResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [AdvancedBackupSetting]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AdvancedBackupSettings"
Either String (Maybe (Maybe [AdvancedBackupSetting]))
-> Maybe [AdvancedBackupSetting]
-> Either String (Maybe [AdvancedBackupSetting])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AdvancedBackupSetting]
forall a. Monoid a => a
Prelude.mempty
)
Either
String
(Maybe Text
-> Maybe Text -> Maybe POSIX -> Int -> CreateBackupPlanResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe POSIX -> Int -> CreateBackupPlanResponse)
forall (f :: * -> *) a b. Applicative f => 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
"BackupPlanId")
Either
String
(Maybe Text -> Maybe POSIX -> Int -> CreateBackupPlanResponse)
-> Either String (Maybe Text)
-> Either String (Maybe POSIX -> Int -> CreateBackupPlanResponse)
forall (f :: * -> *) a b. Applicative f => 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
"BackupPlanArn")
Either String (Maybe POSIX -> Int -> CreateBackupPlanResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> CreateBackupPlanResponse)
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 -> CreateBackupPlanResponse)
-> Either String Int -> Either String CreateBackupPlanResponse
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 CreateBackupPlan
instance Prelude.NFData CreateBackupPlan
instance Core.ToHeaders CreateBackupPlan where
toHeaders :: CreateBackupPlan -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateBackupPlan -> 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 CreateBackupPlan where
toJSON :: CreateBackupPlan -> Value
toJSON CreateBackupPlan' {Maybe Text
Maybe (Sensitive (HashMap Text Text))
BackupPlanInput
backupPlan :: BackupPlanInput
creatorRequestId :: Maybe Text
backupPlanTags :: Maybe (Sensitive (HashMap Text Text))
$sel:backupPlan:CreateBackupPlan' :: CreateBackupPlan -> BackupPlanInput
$sel:creatorRequestId:CreateBackupPlan' :: CreateBackupPlan -> Maybe Text
$sel:backupPlanTags:CreateBackupPlan' :: CreateBackupPlan -> Maybe (Sensitive (HashMap Text Text))
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"BackupPlanTags" Text -> Sensitive (HashMap Text Text) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive (HashMap Text Text) -> Pair)
-> Maybe (Sensitive (HashMap Text Text)) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive (HashMap Text Text))
backupPlanTags,
(Text
"CreatorRequestId" 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
creatorRequestId,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"BackupPlan" Text -> BackupPlanInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= BackupPlanInput
backupPlan)
]
)
instance Core.ToPath CreateBackupPlan where
toPath :: CreateBackupPlan -> ByteString
toPath = ByteString -> CreateBackupPlan -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/backup/plans/"
instance Core.ToQuery CreateBackupPlan where
toQuery :: CreateBackupPlan -> QueryString
toQuery = QueryString -> CreateBackupPlan -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateBackupPlanResponse = CreateBackupPlanResponse'
{
CreateBackupPlanResponse -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text,
CreateBackupPlanResponse -> Maybe [AdvancedBackupSetting]
advancedBackupSettings :: Prelude.Maybe [AdvancedBackupSetting],
CreateBackupPlanResponse -> Maybe Text
backupPlanId :: Prelude.Maybe Prelude.Text,
CreateBackupPlanResponse -> Maybe Text
backupPlanArn :: Prelude.Maybe Prelude.Text,
CreateBackupPlanResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
CreateBackupPlanResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateBackupPlanResponse -> CreateBackupPlanResponse -> Bool
(CreateBackupPlanResponse -> CreateBackupPlanResponse -> Bool)
-> (CreateBackupPlanResponse -> CreateBackupPlanResponse -> Bool)
-> Eq CreateBackupPlanResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBackupPlanResponse -> CreateBackupPlanResponse -> Bool
$c/= :: CreateBackupPlanResponse -> CreateBackupPlanResponse -> Bool
== :: CreateBackupPlanResponse -> CreateBackupPlanResponse -> Bool
$c== :: CreateBackupPlanResponse -> CreateBackupPlanResponse -> Bool
Prelude.Eq, ReadPrec [CreateBackupPlanResponse]
ReadPrec CreateBackupPlanResponse
Int -> ReadS CreateBackupPlanResponse
ReadS [CreateBackupPlanResponse]
(Int -> ReadS CreateBackupPlanResponse)
-> ReadS [CreateBackupPlanResponse]
-> ReadPrec CreateBackupPlanResponse
-> ReadPrec [CreateBackupPlanResponse]
-> Read CreateBackupPlanResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBackupPlanResponse]
$creadListPrec :: ReadPrec [CreateBackupPlanResponse]
readPrec :: ReadPrec CreateBackupPlanResponse
$creadPrec :: ReadPrec CreateBackupPlanResponse
readList :: ReadS [CreateBackupPlanResponse]
$creadList :: ReadS [CreateBackupPlanResponse]
readsPrec :: Int -> ReadS CreateBackupPlanResponse
$creadsPrec :: Int -> ReadS CreateBackupPlanResponse
Prelude.Read, Int -> CreateBackupPlanResponse -> ShowS
[CreateBackupPlanResponse] -> ShowS
CreateBackupPlanResponse -> String
(Int -> CreateBackupPlanResponse -> ShowS)
-> (CreateBackupPlanResponse -> String)
-> ([CreateBackupPlanResponse] -> ShowS)
-> Show CreateBackupPlanResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBackupPlanResponse] -> ShowS
$cshowList :: [CreateBackupPlanResponse] -> ShowS
show :: CreateBackupPlanResponse -> String
$cshow :: CreateBackupPlanResponse -> String
showsPrec :: Int -> CreateBackupPlanResponse -> ShowS
$cshowsPrec :: Int -> CreateBackupPlanResponse -> ShowS
Prelude.Show, (forall x.
CreateBackupPlanResponse -> Rep CreateBackupPlanResponse x)
-> (forall x.
Rep CreateBackupPlanResponse x -> CreateBackupPlanResponse)
-> Generic CreateBackupPlanResponse
forall x.
Rep CreateBackupPlanResponse x -> CreateBackupPlanResponse
forall x.
CreateBackupPlanResponse -> Rep CreateBackupPlanResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateBackupPlanResponse x -> CreateBackupPlanResponse
$cfrom :: forall x.
CreateBackupPlanResponse -> Rep CreateBackupPlanResponse x
Prelude.Generic)
newCreateBackupPlanResponse ::
Prelude.Int ->
CreateBackupPlanResponse
newCreateBackupPlanResponse :: Int -> CreateBackupPlanResponse
newCreateBackupPlanResponse Int
pHttpStatus_ =
CreateBackupPlanResponse' :: Maybe Text
-> Maybe [AdvancedBackupSetting]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Int
-> CreateBackupPlanResponse
CreateBackupPlanResponse'
{ $sel:versionId:CreateBackupPlanResponse' :: Maybe Text
versionId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:advancedBackupSettings:CreateBackupPlanResponse' :: Maybe [AdvancedBackupSetting]
advancedBackupSettings = Maybe [AdvancedBackupSetting]
forall a. Maybe a
Prelude.Nothing,
$sel:backupPlanId:CreateBackupPlanResponse' :: Maybe Text
backupPlanId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:backupPlanArn:CreateBackupPlanResponse' :: Maybe Text
backupPlanArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:CreateBackupPlanResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateBackupPlanResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createBackupPlanResponse_versionId :: Lens.Lens' CreateBackupPlanResponse (Prelude.Maybe Prelude.Text)
createBackupPlanResponse_versionId :: (Maybe Text -> f (Maybe Text))
-> CreateBackupPlanResponse -> f CreateBackupPlanResponse
createBackupPlanResponse_versionId = (CreateBackupPlanResponse -> Maybe Text)
-> (CreateBackupPlanResponse
-> Maybe Text -> CreateBackupPlanResponse)
-> Lens
CreateBackupPlanResponse
CreateBackupPlanResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackupPlanResponse' {Maybe Text
versionId :: Maybe Text
$sel:versionId:CreateBackupPlanResponse' :: CreateBackupPlanResponse -> Maybe Text
versionId} -> Maybe Text
versionId) (\s :: CreateBackupPlanResponse
s@CreateBackupPlanResponse' {} Maybe Text
a -> CreateBackupPlanResponse
s {$sel:versionId:CreateBackupPlanResponse' :: Maybe Text
versionId = Maybe Text
a} :: CreateBackupPlanResponse)
createBackupPlanResponse_advancedBackupSettings :: Lens.Lens' CreateBackupPlanResponse (Prelude.Maybe [AdvancedBackupSetting])
createBackupPlanResponse_advancedBackupSettings :: (Maybe [AdvancedBackupSetting]
-> f (Maybe [AdvancedBackupSetting]))
-> CreateBackupPlanResponse -> f CreateBackupPlanResponse
createBackupPlanResponse_advancedBackupSettings = (CreateBackupPlanResponse -> Maybe [AdvancedBackupSetting])
-> (CreateBackupPlanResponse
-> Maybe [AdvancedBackupSetting] -> CreateBackupPlanResponse)
-> Lens
CreateBackupPlanResponse
CreateBackupPlanResponse
(Maybe [AdvancedBackupSetting])
(Maybe [AdvancedBackupSetting])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackupPlanResponse' {Maybe [AdvancedBackupSetting]
advancedBackupSettings :: Maybe [AdvancedBackupSetting]
$sel:advancedBackupSettings:CreateBackupPlanResponse' :: CreateBackupPlanResponse -> Maybe [AdvancedBackupSetting]
advancedBackupSettings} -> Maybe [AdvancedBackupSetting]
advancedBackupSettings) (\s :: CreateBackupPlanResponse
s@CreateBackupPlanResponse' {} Maybe [AdvancedBackupSetting]
a -> CreateBackupPlanResponse
s {$sel:advancedBackupSettings:CreateBackupPlanResponse' :: Maybe [AdvancedBackupSetting]
advancedBackupSettings = Maybe [AdvancedBackupSetting]
a} :: CreateBackupPlanResponse) ((Maybe [AdvancedBackupSetting]
-> f (Maybe [AdvancedBackupSetting]))
-> CreateBackupPlanResponse -> f CreateBackupPlanResponse)
-> ((Maybe [AdvancedBackupSetting]
-> f (Maybe [AdvancedBackupSetting]))
-> Maybe [AdvancedBackupSetting]
-> f (Maybe [AdvancedBackupSetting]))
-> (Maybe [AdvancedBackupSetting]
-> f (Maybe [AdvancedBackupSetting]))
-> CreateBackupPlanResponse
-> f CreateBackupPlanResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AdvancedBackupSetting]
[AdvancedBackupSetting]
[AdvancedBackupSetting]
[AdvancedBackupSetting]
-> Iso
(Maybe [AdvancedBackupSetting])
(Maybe [AdvancedBackupSetting])
(Maybe [AdvancedBackupSetting])
(Maybe [AdvancedBackupSetting])
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
[AdvancedBackupSetting]
[AdvancedBackupSetting]
[AdvancedBackupSetting]
[AdvancedBackupSetting]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createBackupPlanResponse_backupPlanId :: Lens.Lens' CreateBackupPlanResponse (Prelude.Maybe Prelude.Text)
createBackupPlanResponse_backupPlanId :: (Maybe Text -> f (Maybe Text))
-> CreateBackupPlanResponse -> f CreateBackupPlanResponse
createBackupPlanResponse_backupPlanId = (CreateBackupPlanResponse -> Maybe Text)
-> (CreateBackupPlanResponse
-> Maybe Text -> CreateBackupPlanResponse)
-> Lens
CreateBackupPlanResponse
CreateBackupPlanResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackupPlanResponse' {Maybe Text
backupPlanId :: Maybe Text
$sel:backupPlanId:CreateBackupPlanResponse' :: CreateBackupPlanResponse -> Maybe Text
backupPlanId} -> Maybe Text
backupPlanId) (\s :: CreateBackupPlanResponse
s@CreateBackupPlanResponse' {} Maybe Text
a -> CreateBackupPlanResponse
s {$sel:backupPlanId:CreateBackupPlanResponse' :: Maybe Text
backupPlanId = Maybe Text
a} :: CreateBackupPlanResponse)
createBackupPlanResponse_backupPlanArn :: Lens.Lens' CreateBackupPlanResponse (Prelude.Maybe Prelude.Text)
createBackupPlanResponse_backupPlanArn :: (Maybe Text -> f (Maybe Text))
-> CreateBackupPlanResponse -> f CreateBackupPlanResponse
createBackupPlanResponse_backupPlanArn = (CreateBackupPlanResponse -> Maybe Text)
-> (CreateBackupPlanResponse
-> Maybe Text -> CreateBackupPlanResponse)
-> Lens
CreateBackupPlanResponse
CreateBackupPlanResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackupPlanResponse' {Maybe Text
backupPlanArn :: Maybe Text
$sel:backupPlanArn:CreateBackupPlanResponse' :: CreateBackupPlanResponse -> Maybe Text
backupPlanArn} -> Maybe Text
backupPlanArn) (\s :: CreateBackupPlanResponse
s@CreateBackupPlanResponse' {} Maybe Text
a -> CreateBackupPlanResponse
s {$sel:backupPlanArn:CreateBackupPlanResponse' :: Maybe Text
backupPlanArn = Maybe Text
a} :: CreateBackupPlanResponse)
createBackupPlanResponse_creationDate :: Lens.Lens' CreateBackupPlanResponse (Prelude.Maybe Prelude.UTCTime)
createBackupPlanResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateBackupPlanResponse -> f CreateBackupPlanResponse
createBackupPlanResponse_creationDate = (CreateBackupPlanResponse -> Maybe POSIX)
-> (CreateBackupPlanResponse
-> Maybe POSIX -> CreateBackupPlanResponse)
-> Lens
CreateBackupPlanResponse
CreateBackupPlanResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackupPlanResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:CreateBackupPlanResponse' :: CreateBackupPlanResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: CreateBackupPlanResponse
s@CreateBackupPlanResponse' {} Maybe POSIX
a -> CreateBackupPlanResponse
s {$sel:creationDate:CreateBackupPlanResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: CreateBackupPlanResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateBackupPlanResponse -> f CreateBackupPlanResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateBackupPlanResponse
-> f CreateBackupPlanResponse
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
createBackupPlanResponse_httpStatus :: Lens.Lens' CreateBackupPlanResponse Prelude.Int
createBackupPlanResponse_httpStatus :: (Int -> f Int)
-> CreateBackupPlanResponse -> f CreateBackupPlanResponse
createBackupPlanResponse_httpStatus = (CreateBackupPlanResponse -> Int)
-> (CreateBackupPlanResponse -> Int -> CreateBackupPlanResponse)
-> Lens CreateBackupPlanResponse CreateBackupPlanResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBackupPlanResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateBackupPlanResponse' :: CreateBackupPlanResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateBackupPlanResponse
s@CreateBackupPlanResponse' {} Int
a -> CreateBackupPlanResponse
s {$sel:httpStatus:CreateBackupPlanResponse' :: Int
httpStatus = Int
a} :: CreateBackupPlanResponse)
instance Prelude.NFData CreateBackupPlanResponse