{-# 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.EBS.StartSnapshot
(
StartSnapshot (..),
newStartSnapshot,
startSnapshot_clientToken,
startSnapshot_description,
startSnapshot_encrypted,
startSnapshot_kmsKeyArn,
startSnapshot_parentSnapshotId,
startSnapshot_tags,
startSnapshot_timeout,
startSnapshot_volumeSize,
StartSnapshotResponse (..),
newStartSnapshotResponse,
startSnapshotResponse_blockSize,
startSnapshotResponse_description,
startSnapshotResponse_kmsKeyArn,
startSnapshotResponse_ownerId,
startSnapshotResponse_parentSnapshotId,
startSnapshotResponse_snapshotId,
startSnapshotResponse_startTime,
startSnapshotResponse_status,
startSnapshotResponse_tags,
startSnapshotResponse_volumeSize,
startSnapshotResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EBS.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StartSnapshot = StartSnapshot'
{
StartSnapshot -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
StartSnapshot -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
StartSnapshot -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
StartSnapshot -> Maybe (Sensitive Text)
kmsKeyArn :: Prelude.Maybe (Data.Sensitive Prelude.Text),
StartSnapshot -> Maybe Text
parentSnapshotId :: Prelude.Maybe Prelude.Text,
StartSnapshot -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartSnapshot -> Maybe Natural
timeout :: Prelude.Maybe Prelude.Natural,
StartSnapshot -> Natural
volumeSize :: Prelude.Natural
}
deriving (StartSnapshot -> StartSnapshot -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartSnapshot -> StartSnapshot -> Bool
$c/= :: StartSnapshot -> StartSnapshot -> Bool
== :: StartSnapshot -> StartSnapshot -> Bool
$c== :: StartSnapshot -> StartSnapshot -> Bool
Prelude.Eq, Int -> StartSnapshot -> ShowS
[StartSnapshot] -> ShowS
StartSnapshot -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartSnapshot] -> ShowS
$cshowList :: [StartSnapshot] -> ShowS
show :: StartSnapshot -> String
$cshow :: StartSnapshot -> String
showsPrec :: Int -> StartSnapshot -> ShowS
$cshowsPrec :: Int -> StartSnapshot -> ShowS
Prelude.Show, forall x. Rep StartSnapshot x -> StartSnapshot
forall x. StartSnapshot -> Rep StartSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartSnapshot x -> StartSnapshot
$cfrom :: forall x. StartSnapshot -> Rep StartSnapshot x
Prelude.Generic)
newStartSnapshot ::
Prelude.Natural ->
StartSnapshot
newStartSnapshot :: Natural -> StartSnapshot
newStartSnapshot Natural
pVolumeSize_ =
StartSnapshot'
{ $sel:clientToken:StartSnapshot' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
$sel:description:StartSnapshot' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:encrypted:StartSnapshot' :: Maybe Bool
encrypted = forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyArn:StartSnapshot' :: Maybe (Sensitive Text)
kmsKeyArn = forall a. Maybe a
Prelude.Nothing,
$sel:parentSnapshotId:StartSnapshot' :: Maybe Text
parentSnapshotId = forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartSnapshot' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:timeout:StartSnapshot' :: Maybe Natural
timeout = forall a. Maybe a
Prelude.Nothing,
$sel:volumeSize:StartSnapshot' :: Natural
volumeSize = Natural
pVolumeSize_
}
startSnapshot_clientToken :: Lens.Lens' StartSnapshot (Prelude.Maybe Prelude.Text)
startSnapshot_clientToken :: Lens' StartSnapshot (Maybe Text)
startSnapshot_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshot' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:StartSnapshot' :: StartSnapshot -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: StartSnapshot
s@StartSnapshot' {} Maybe Text
a -> StartSnapshot
s {$sel:clientToken:StartSnapshot' :: Maybe Text
clientToken = Maybe Text
a} :: StartSnapshot)
startSnapshot_description :: Lens.Lens' StartSnapshot (Prelude.Maybe Prelude.Text)
startSnapshot_description :: Lens' StartSnapshot (Maybe Text)
startSnapshot_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshot' {Maybe Text
description :: Maybe Text
$sel:description:StartSnapshot' :: StartSnapshot -> Maybe Text
description} -> Maybe Text
description) (\s :: StartSnapshot
s@StartSnapshot' {} Maybe Text
a -> StartSnapshot
s {$sel:description:StartSnapshot' :: Maybe Text
description = Maybe Text
a} :: StartSnapshot)
startSnapshot_encrypted :: Lens.Lens' StartSnapshot (Prelude.Maybe Prelude.Bool)
startSnapshot_encrypted :: Lens' StartSnapshot (Maybe Bool)
startSnapshot_encrypted = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshot' {Maybe Bool
encrypted :: Maybe Bool
$sel:encrypted:StartSnapshot' :: StartSnapshot -> Maybe Bool
encrypted} -> Maybe Bool
encrypted) (\s :: StartSnapshot
s@StartSnapshot' {} Maybe Bool
a -> StartSnapshot
s {$sel:encrypted:StartSnapshot' :: Maybe Bool
encrypted = Maybe Bool
a} :: StartSnapshot)
startSnapshot_kmsKeyArn :: Lens.Lens' StartSnapshot (Prelude.Maybe Prelude.Text)
startSnapshot_kmsKeyArn :: Lens' StartSnapshot (Maybe Text)
startSnapshot_kmsKeyArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshot' {Maybe (Sensitive Text)
kmsKeyArn :: Maybe (Sensitive Text)
$sel:kmsKeyArn:StartSnapshot' :: StartSnapshot -> Maybe (Sensitive Text)
kmsKeyArn} -> Maybe (Sensitive Text)
kmsKeyArn) (\s :: StartSnapshot
s@StartSnapshot' {} Maybe (Sensitive Text)
a -> StartSnapshot
s {$sel:kmsKeyArn:StartSnapshot' :: Maybe (Sensitive Text)
kmsKeyArn = Maybe (Sensitive Text)
a} :: StartSnapshot) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
startSnapshot_parentSnapshotId :: Lens.Lens' StartSnapshot (Prelude.Maybe Prelude.Text)
startSnapshot_parentSnapshotId :: Lens' StartSnapshot (Maybe Text)
startSnapshot_parentSnapshotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshot' {Maybe Text
parentSnapshotId :: Maybe Text
$sel:parentSnapshotId:StartSnapshot' :: StartSnapshot -> Maybe Text
parentSnapshotId} -> Maybe Text
parentSnapshotId) (\s :: StartSnapshot
s@StartSnapshot' {} Maybe Text
a -> StartSnapshot
s {$sel:parentSnapshotId:StartSnapshot' :: Maybe Text
parentSnapshotId = Maybe Text
a} :: StartSnapshot)
startSnapshot_tags :: Lens.Lens' StartSnapshot (Prelude.Maybe [Tag])
startSnapshot_tags :: Lens' StartSnapshot (Maybe [Tag])
startSnapshot_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshot' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartSnapshot' :: StartSnapshot -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartSnapshot
s@StartSnapshot' {} Maybe [Tag]
a -> StartSnapshot
s {$sel:tags:StartSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartSnapshot) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
startSnapshot_timeout :: Lens.Lens' StartSnapshot (Prelude.Maybe Prelude.Natural)
startSnapshot_timeout :: Lens' StartSnapshot (Maybe Natural)
startSnapshot_timeout = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshot' {Maybe Natural
timeout :: Maybe Natural
$sel:timeout:StartSnapshot' :: StartSnapshot -> Maybe Natural
timeout} -> Maybe Natural
timeout) (\s :: StartSnapshot
s@StartSnapshot' {} Maybe Natural
a -> StartSnapshot
s {$sel:timeout:StartSnapshot' :: Maybe Natural
timeout = Maybe Natural
a} :: StartSnapshot)
startSnapshot_volumeSize :: Lens.Lens' StartSnapshot Prelude.Natural
startSnapshot_volumeSize :: Lens' StartSnapshot Natural
startSnapshot_volumeSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshot' {Natural
volumeSize :: Natural
$sel:volumeSize:StartSnapshot' :: StartSnapshot -> Natural
volumeSize} -> Natural
volumeSize) (\s :: StartSnapshot
s@StartSnapshot' {} Natural
a -> StartSnapshot
s {$sel:volumeSize:StartSnapshot' :: Natural
volumeSize = Natural
a} :: StartSnapshot)
instance Core.AWSRequest StartSnapshot where
type
AWSResponse StartSnapshot =
StartSnapshotResponse
request :: (Service -> Service) -> StartSnapshot -> Request StartSnapshot
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy StartSnapshot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartSnapshot)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Int
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Status
-> Maybe [Tag]
-> Maybe Natural
-> Int
-> StartSnapshotResponse
StartSnapshotResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"BlockSize")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe 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 -> Either String (Maybe a)
Data..?> Key
"KmsKeyArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"OwnerId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ParentSnapshotId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SnapshotId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"StartTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe 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 -> Either String (Maybe a)
Data..?> Key
"Tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"VolumeSize")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable StartSnapshot where
hashWithSalt :: Int -> StartSnapshot -> Int
hashWithSalt Int
_salt StartSnapshot' {Natural
Maybe Bool
Maybe Natural
Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
volumeSize :: Natural
timeout :: Maybe Natural
tags :: Maybe [Tag]
parentSnapshotId :: Maybe Text
kmsKeyArn :: Maybe (Sensitive Text)
encrypted :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
$sel:volumeSize:StartSnapshot' :: StartSnapshot -> Natural
$sel:timeout:StartSnapshot' :: StartSnapshot -> Maybe Natural
$sel:tags:StartSnapshot' :: StartSnapshot -> Maybe [Tag]
$sel:parentSnapshotId:StartSnapshot' :: StartSnapshot -> Maybe Text
$sel:kmsKeyArn:StartSnapshot' :: StartSnapshot -> Maybe (Sensitive Text)
$sel:encrypted:StartSnapshot' :: StartSnapshot -> Maybe Bool
$sel:description:StartSnapshot' :: StartSnapshot -> Maybe Text
$sel:clientToken:StartSnapshot' :: StartSnapshot -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
encrypted
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
kmsKeyArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
parentSnapshotId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
timeout
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
volumeSize
instance Prelude.NFData StartSnapshot where
rnf :: StartSnapshot -> ()
rnf StartSnapshot' {Natural
Maybe Bool
Maybe Natural
Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
volumeSize :: Natural
timeout :: Maybe Natural
tags :: Maybe [Tag]
parentSnapshotId :: Maybe Text
kmsKeyArn :: Maybe (Sensitive Text)
encrypted :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
$sel:volumeSize:StartSnapshot' :: StartSnapshot -> Natural
$sel:timeout:StartSnapshot' :: StartSnapshot -> Maybe Natural
$sel:tags:StartSnapshot' :: StartSnapshot -> Maybe [Tag]
$sel:parentSnapshotId:StartSnapshot' :: StartSnapshot -> Maybe Text
$sel:kmsKeyArn:StartSnapshot' :: StartSnapshot -> Maybe (Sensitive Text)
$sel:encrypted:StartSnapshot' :: StartSnapshot -> Maybe Bool
$sel:description:StartSnapshot' :: StartSnapshot -> Maybe Text
$sel:clientToken:StartSnapshot' :: StartSnapshot -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
encrypted
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
kmsKeyArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parentSnapshotId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeout
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
volumeSize
instance Data.ToHeaders StartSnapshot where
toHeaders :: StartSnapshot -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON StartSnapshot where
toJSON :: StartSnapshot -> Value
toJSON StartSnapshot' {Natural
Maybe Bool
Maybe Natural
Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
volumeSize :: Natural
timeout :: Maybe Natural
tags :: Maybe [Tag]
parentSnapshotId :: Maybe Text
kmsKeyArn :: Maybe (Sensitive Text)
encrypted :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
$sel:volumeSize:StartSnapshot' :: StartSnapshot -> Natural
$sel:timeout:StartSnapshot' :: StartSnapshot -> Maybe Natural
$sel:tags:StartSnapshot' :: StartSnapshot -> Maybe [Tag]
$sel:parentSnapshotId:StartSnapshot' :: StartSnapshot -> Maybe Text
$sel:kmsKeyArn:StartSnapshot' :: StartSnapshot -> Maybe (Sensitive Text)
$sel:encrypted:StartSnapshot' :: StartSnapshot -> Maybe Bool
$sel:description:StartSnapshot' :: StartSnapshot -> Maybe Text
$sel:clientToken:StartSnapshot' :: StartSnapshot -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ClientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
(Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"Encrypted" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
encrypted,
(Key
"KmsKeyArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
kmsKeyArn,
(Key
"ParentSnapshotId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
parentSnapshotId,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Key
"Timeout" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeout,
forall a. a -> Maybe a
Prelude.Just (Key
"VolumeSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
volumeSize)
]
)
instance Data.ToPath StartSnapshot where
toPath :: StartSnapshot -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/snapshots"
instance Data.ToQuery StartSnapshot where
toQuery :: StartSnapshot -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StartSnapshotResponse = StartSnapshotResponse'
{
StartSnapshotResponse -> Maybe Int
blockSize :: Prelude.Maybe Prelude.Int,
StartSnapshotResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
StartSnapshotResponse -> Maybe (Sensitive Text)
kmsKeyArn :: Prelude.Maybe (Data.Sensitive Prelude.Text),
StartSnapshotResponse -> Maybe Text
ownerId :: Prelude.Maybe Prelude.Text,
StartSnapshotResponse -> Maybe Text
parentSnapshotId :: Prelude.Maybe Prelude.Text,
StartSnapshotResponse -> Maybe Text
snapshotId :: Prelude.Maybe Prelude.Text,
StartSnapshotResponse -> Maybe POSIX
startTime :: Prelude.Maybe Data.POSIX,
StartSnapshotResponse -> Maybe Status
status :: Prelude.Maybe Status,
StartSnapshotResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartSnapshotResponse -> Maybe Natural
volumeSize :: Prelude.Maybe Prelude.Natural,
StartSnapshotResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartSnapshotResponse -> StartSnapshotResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartSnapshotResponse -> StartSnapshotResponse -> Bool
$c/= :: StartSnapshotResponse -> StartSnapshotResponse -> Bool
== :: StartSnapshotResponse -> StartSnapshotResponse -> Bool
$c== :: StartSnapshotResponse -> StartSnapshotResponse -> Bool
Prelude.Eq, Int -> StartSnapshotResponse -> ShowS
[StartSnapshotResponse] -> ShowS
StartSnapshotResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartSnapshotResponse] -> ShowS
$cshowList :: [StartSnapshotResponse] -> ShowS
show :: StartSnapshotResponse -> String
$cshow :: StartSnapshotResponse -> String
showsPrec :: Int -> StartSnapshotResponse -> ShowS
$cshowsPrec :: Int -> StartSnapshotResponse -> ShowS
Prelude.Show, forall x. Rep StartSnapshotResponse x -> StartSnapshotResponse
forall x. StartSnapshotResponse -> Rep StartSnapshotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartSnapshotResponse x -> StartSnapshotResponse
$cfrom :: forall x. StartSnapshotResponse -> Rep StartSnapshotResponse x
Prelude.Generic)
newStartSnapshotResponse ::
Prelude.Int ->
StartSnapshotResponse
newStartSnapshotResponse :: Int -> StartSnapshotResponse
newStartSnapshotResponse Int
pHttpStatus_ =
StartSnapshotResponse'
{ $sel:blockSize:StartSnapshotResponse' :: Maybe Int
blockSize = forall a. Maybe a
Prelude.Nothing,
$sel:description:StartSnapshotResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyArn:StartSnapshotResponse' :: Maybe (Sensitive Text)
kmsKeyArn = forall a. Maybe a
Prelude.Nothing,
$sel:ownerId:StartSnapshotResponse' :: Maybe Text
ownerId = forall a. Maybe a
Prelude.Nothing,
$sel:parentSnapshotId:StartSnapshotResponse' :: Maybe Text
parentSnapshotId = forall a. Maybe a
Prelude.Nothing,
$sel:snapshotId:StartSnapshotResponse' :: Maybe Text
snapshotId = forall a. Maybe a
Prelude.Nothing,
$sel:startTime:StartSnapshotResponse' :: Maybe POSIX
startTime = forall a. Maybe a
Prelude.Nothing,
$sel:status:StartSnapshotResponse' :: Maybe Status
status = forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartSnapshotResponse' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:volumeSize:StartSnapshotResponse' :: Maybe Natural
volumeSize = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartSnapshotResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startSnapshotResponse_blockSize :: Lens.Lens' StartSnapshotResponse (Prelude.Maybe Prelude.Int)
startSnapshotResponse_blockSize :: Lens' StartSnapshotResponse (Maybe Int)
startSnapshotResponse_blockSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshotResponse' {Maybe Int
blockSize :: Maybe Int
$sel:blockSize:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Int
blockSize} -> Maybe Int
blockSize) (\s :: StartSnapshotResponse
s@StartSnapshotResponse' {} Maybe Int
a -> StartSnapshotResponse
s {$sel:blockSize:StartSnapshotResponse' :: Maybe Int
blockSize = Maybe Int
a} :: StartSnapshotResponse)
startSnapshotResponse_description :: Lens.Lens' StartSnapshotResponse (Prelude.Maybe Prelude.Text)
startSnapshotResponse_description :: Lens' StartSnapshotResponse (Maybe Text)
startSnapshotResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshotResponse' {Maybe Text
description :: Maybe Text
$sel:description:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: StartSnapshotResponse
s@StartSnapshotResponse' {} Maybe Text
a -> StartSnapshotResponse
s {$sel:description:StartSnapshotResponse' :: Maybe Text
description = Maybe Text
a} :: StartSnapshotResponse)
startSnapshotResponse_kmsKeyArn :: Lens.Lens' StartSnapshotResponse (Prelude.Maybe Prelude.Text)
startSnapshotResponse_kmsKeyArn :: Lens' StartSnapshotResponse (Maybe Text)
startSnapshotResponse_kmsKeyArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshotResponse' {Maybe (Sensitive Text)
kmsKeyArn :: Maybe (Sensitive Text)
$sel:kmsKeyArn:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe (Sensitive Text)
kmsKeyArn} -> Maybe (Sensitive Text)
kmsKeyArn) (\s :: StartSnapshotResponse
s@StartSnapshotResponse' {} Maybe (Sensitive Text)
a -> StartSnapshotResponse
s {$sel:kmsKeyArn:StartSnapshotResponse' :: Maybe (Sensitive Text)
kmsKeyArn = Maybe (Sensitive Text)
a} :: StartSnapshotResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
startSnapshotResponse_ownerId :: Lens.Lens' StartSnapshotResponse (Prelude.Maybe Prelude.Text)
startSnapshotResponse_ownerId :: Lens' StartSnapshotResponse (Maybe Text)
startSnapshotResponse_ownerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshotResponse' {Maybe Text
ownerId :: Maybe Text
$sel:ownerId:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Text
ownerId} -> Maybe Text
ownerId) (\s :: StartSnapshotResponse
s@StartSnapshotResponse' {} Maybe Text
a -> StartSnapshotResponse
s {$sel:ownerId:StartSnapshotResponse' :: Maybe Text
ownerId = Maybe Text
a} :: StartSnapshotResponse)
startSnapshotResponse_parentSnapshotId :: Lens.Lens' StartSnapshotResponse (Prelude.Maybe Prelude.Text)
startSnapshotResponse_parentSnapshotId :: Lens' StartSnapshotResponse (Maybe Text)
startSnapshotResponse_parentSnapshotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshotResponse' {Maybe Text
parentSnapshotId :: Maybe Text
$sel:parentSnapshotId:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Text
parentSnapshotId} -> Maybe Text
parentSnapshotId) (\s :: StartSnapshotResponse
s@StartSnapshotResponse' {} Maybe Text
a -> StartSnapshotResponse
s {$sel:parentSnapshotId:StartSnapshotResponse' :: Maybe Text
parentSnapshotId = Maybe Text
a} :: StartSnapshotResponse)
startSnapshotResponse_snapshotId :: Lens.Lens' StartSnapshotResponse (Prelude.Maybe Prelude.Text)
startSnapshotResponse_snapshotId :: Lens' StartSnapshotResponse (Maybe Text)
startSnapshotResponse_snapshotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshotResponse' {Maybe Text
snapshotId :: Maybe Text
$sel:snapshotId:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Text
snapshotId} -> Maybe Text
snapshotId) (\s :: StartSnapshotResponse
s@StartSnapshotResponse' {} Maybe Text
a -> StartSnapshotResponse
s {$sel:snapshotId:StartSnapshotResponse' :: Maybe Text
snapshotId = Maybe Text
a} :: StartSnapshotResponse)
startSnapshotResponse_startTime :: Lens.Lens' StartSnapshotResponse (Prelude.Maybe Prelude.UTCTime)
startSnapshotResponse_startTime :: Lens' StartSnapshotResponse (Maybe UTCTime)
startSnapshotResponse_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshotResponse' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: StartSnapshotResponse
s@StartSnapshotResponse' {} Maybe POSIX
a -> StartSnapshotResponse
s {$sel:startTime:StartSnapshotResponse' :: Maybe POSIX
startTime = Maybe POSIX
a} :: StartSnapshotResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
startSnapshotResponse_status :: Lens.Lens' StartSnapshotResponse (Prelude.Maybe Status)
startSnapshotResponse_status :: Lens' StartSnapshotResponse (Maybe Status)
startSnapshotResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshotResponse' {Maybe Status
status :: Maybe Status
$sel:status:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Status
status} -> Maybe Status
status) (\s :: StartSnapshotResponse
s@StartSnapshotResponse' {} Maybe Status
a -> StartSnapshotResponse
s {$sel:status:StartSnapshotResponse' :: Maybe Status
status = Maybe Status
a} :: StartSnapshotResponse)
startSnapshotResponse_tags :: Lens.Lens' StartSnapshotResponse (Prelude.Maybe [Tag])
startSnapshotResponse_tags :: Lens' StartSnapshotResponse (Maybe [Tag])
startSnapshotResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshotResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartSnapshotResponse
s@StartSnapshotResponse' {} Maybe [Tag]
a -> StartSnapshotResponse
s {$sel:tags:StartSnapshotResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartSnapshotResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
startSnapshotResponse_volumeSize :: Lens.Lens' StartSnapshotResponse (Prelude.Maybe Prelude.Natural)
startSnapshotResponse_volumeSize :: Lens' StartSnapshotResponse (Maybe Natural)
startSnapshotResponse_volumeSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshotResponse' {Maybe Natural
volumeSize :: Maybe Natural
$sel:volumeSize:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Natural
volumeSize} -> Maybe Natural
volumeSize) (\s :: StartSnapshotResponse
s@StartSnapshotResponse' {} Maybe Natural
a -> StartSnapshotResponse
s {$sel:volumeSize:StartSnapshotResponse' :: Maybe Natural
volumeSize = Maybe Natural
a} :: StartSnapshotResponse)
startSnapshotResponse_httpStatus :: Lens.Lens' StartSnapshotResponse Prelude.Int
startSnapshotResponse_httpStatus :: Lens' StartSnapshotResponse Int
startSnapshotResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartSnapshotResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartSnapshotResponse' :: StartSnapshotResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartSnapshotResponse
s@StartSnapshotResponse' {} Int
a -> StartSnapshotResponse
s {$sel:httpStatus:StartSnapshotResponse' :: Int
httpStatus = Int
a} :: StartSnapshotResponse)
instance Prelude.NFData StartSnapshotResponse where
rnf :: StartSnapshotResponse -> ()
rnf StartSnapshotResponse' {Int
Maybe Int
Maybe Natural
Maybe [Tag]
Maybe Text
Maybe (Sensitive Text)
Maybe POSIX
Maybe Status
httpStatus :: Int
volumeSize :: Maybe Natural
tags :: Maybe [Tag]
status :: Maybe Status
startTime :: Maybe POSIX
snapshotId :: Maybe Text
parentSnapshotId :: Maybe Text
ownerId :: Maybe Text
kmsKeyArn :: Maybe (Sensitive Text)
description :: Maybe Text
blockSize :: Maybe Int
$sel:httpStatus:StartSnapshotResponse' :: StartSnapshotResponse -> Int
$sel:volumeSize:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Natural
$sel:tags:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe [Tag]
$sel:status:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Status
$sel:startTime:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe POSIX
$sel:snapshotId:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Text
$sel:parentSnapshotId:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Text
$sel:ownerId:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Text
$sel:kmsKeyArn:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe (Sensitive Text)
$sel:description:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Text
$sel:blockSize:StartSnapshotResponse' :: StartSnapshotResponse -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
blockSize
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
kmsKeyArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownerId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parentSnapshotId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snapshotId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
startTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Status
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
volumeSize
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus