{-# 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.Lightsail.Types.DiskSnapshot where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.DiskSnapshotState
import Amazonka.Lightsail.Types.ResourceLocation
import Amazonka.Lightsail.Types.ResourceType
import Amazonka.Lightsail.Types.Tag
import qualified Amazonka.Prelude as Prelude
data DiskSnapshot = DiskSnapshot'
{
DiskSnapshot -> Maybe Text
fromDiskName :: Prelude.Maybe Prelude.Text,
DiskSnapshot -> Maybe Bool
isFromAutoSnapshot :: Prelude.Maybe Prelude.Bool,
DiskSnapshot -> Maybe DiskSnapshotState
state :: Prelude.Maybe DiskSnapshotState,
DiskSnapshot -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
DiskSnapshot -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
DiskSnapshot -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
DiskSnapshot -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
DiskSnapshot -> Maybe Text
progress :: Prelude.Maybe Prelude.Text,
DiskSnapshot -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DiskSnapshot -> Maybe Int
sizeInGb :: Prelude.Maybe Prelude.Int,
DiskSnapshot -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text,
DiskSnapshot -> Maybe Text
fromInstanceArn :: Prelude.Maybe Prelude.Text,
DiskSnapshot -> Maybe Text
fromInstanceName :: Prelude.Maybe Prelude.Text,
DiskSnapshot -> Maybe Text
fromDiskArn :: Prelude.Maybe Prelude.Text,
DiskSnapshot -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
deriving (DiskSnapshot -> DiskSnapshot -> Bool
(DiskSnapshot -> DiskSnapshot -> Bool)
-> (DiskSnapshot -> DiskSnapshot -> Bool) -> Eq DiskSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DiskSnapshot -> DiskSnapshot -> Bool
$c/= :: DiskSnapshot -> DiskSnapshot -> Bool
== :: DiskSnapshot -> DiskSnapshot -> Bool
$c== :: DiskSnapshot -> DiskSnapshot -> Bool
Prelude.Eq, ReadPrec [DiskSnapshot]
ReadPrec DiskSnapshot
Int -> ReadS DiskSnapshot
ReadS [DiskSnapshot]
(Int -> ReadS DiskSnapshot)
-> ReadS [DiskSnapshot]
-> ReadPrec DiskSnapshot
-> ReadPrec [DiskSnapshot]
-> Read DiskSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DiskSnapshot]
$creadListPrec :: ReadPrec [DiskSnapshot]
readPrec :: ReadPrec DiskSnapshot
$creadPrec :: ReadPrec DiskSnapshot
readList :: ReadS [DiskSnapshot]
$creadList :: ReadS [DiskSnapshot]
readsPrec :: Int -> ReadS DiskSnapshot
$creadsPrec :: Int -> ReadS DiskSnapshot
Prelude.Read, Int -> DiskSnapshot -> ShowS
[DiskSnapshot] -> ShowS
DiskSnapshot -> String
(Int -> DiskSnapshot -> ShowS)
-> (DiskSnapshot -> String)
-> ([DiskSnapshot] -> ShowS)
-> Show DiskSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DiskSnapshot] -> ShowS
$cshowList :: [DiskSnapshot] -> ShowS
show :: DiskSnapshot -> String
$cshow :: DiskSnapshot -> String
showsPrec :: Int -> DiskSnapshot -> ShowS
$cshowsPrec :: Int -> DiskSnapshot -> ShowS
Prelude.Show, (forall x. DiskSnapshot -> Rep DiskSnapshot x)
-> (forall x. Rep DiskSnapshot x -> DiskSnapshot)
-> Generic DiskSnapshot
forall x. Rep DiskSnapshot x -> DiskSnapshot
forall x. DiskSnapshot -> Rep DiskSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DiskSnapshot x -> DiskSnapshot
$cfrom :: forall x. DiskSnapshot -> Rep DiskSnapshot x
Prelude.Generic)
newDiskSnapshot ::
DiskSnapshot
newDiskSnapshot :: DiskSnapshot
newDiskSnapshot =
DiskSnapshot' :: Maybe Text
-> Maybe Bool
-> Maybe DiskSnapshotState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot
DiskSnapshot'
{ $sel:fromDiskName:DiskSnapshot' :: Maybe Text
fromDiskName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isFromAutoSnapshot:DiskSnapshot' :: Maybe Bool
isFromAutoSnapshot = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:state:DiskSnapshot' :: Maybe DiskSnapshotState
state = Maybe DiskSnapshotState
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:DiskSnapshot' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
$sel:arn:DiskSnapshot' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:DiskSnapshot' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:location:DiskSnapshot' :: Maybe ResourceLocation
location = Maybe ResourceLocation
forall a. Maybe a
Prelude.Nothing,
$sel:progress:DiskSnapshot' :: Maybe Text
progress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:DiskSnapshot' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sizeInGb:DiskSnapshot' :: Maybe Int
sizeInGb = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:supportCode:DiskSnapshot' :: Maybe Text
supportCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fromInstanceArn:DiskSnapshot' :: Maybe Text
fromInstanceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fromInstanceName:DiskSnapshot' :: Maybe Text
fromInstanceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fromDiskArn:DiskSnapshot' :: Maybe Text
fromDiskArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:DiskSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
}
diskSnapshot_fromDiskName :: Lens.Lens' DiskSnapshot (Prelude.Maybe Prelude.Text)
diskSnapshot_fromDiskName :: (Maybe Text -> f (Maybe Text)) -> DiskSnapshot -> f DiskSnapshot
diskSnapshot_fromDiskName = (DiskSnapshot -> Maybe Text)
-> (DiskSnapshot -> Maybe Text -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe Text
fromDiskName :: Maybe Text
$sel:fromDiskName:DiskSnapshot' :: DiskSnapshot -> Maybe Text
fromDiskName} -> Maybe Text
fromDiskName) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe Text
a -> DiskSnapshot
s {$sel:fromDiskName:DiskSnapshot' :: Maybe Text
fromDiskName = Maybe Text
a} :: DiskSnapshot)
diskSnapshot_isFromAutoSnapshot :: Lens.Lens' DiskSnapshot (Prelude.Maybe Prelude.Bool)
diskSnapshot_isFromAutoSnapshot :: (Maybe Bool -> f (Maybe Bool)) -> DiskSnapshot -> f DiskSnapshot
diskSnapshot_isFromAutoSnapshot = (DiskSnapshot -> Maybe Bool)
-> (DiskSnapshot -> Maybe Bool -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe Bool
isFromAutoSnapshot :: Maybe Bool
$sel:isFromAutoSnapshot:DiskSnapshot' :: DiskSnapshot -> Maybe Bool
isFromAutoSnapshot} -> Maybe Bool
isFromAutoSnapshot) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe Bool
a -> DiskSnapshot
s {$sel:isFromAutoSnapshot:DiskSnapshot' :: Maybe Bool
isFromAutoSnapshot = Maybe Bool
a} :: DiskSnapshot)
diskSnapshot_state :: Lens.Lens' DiskSnapshot (Prelude.Maybe DiskSnapshotState)
diskSnapshot_state :: (Maybe DiskSnapshotState -> f (Maybe DiskSnapshotState))
-> DiskSnapshot -> f DiskSnapshot
diskSnapshot_state = (DiskSnapshot -> Maybe DiskSnapshotState)
-> (DiskSnapshot -> Maybe DiskSnapshotState -> DiskSnapshot)
-> Lens
DiskSnapshot
DiskSnapshot
(Maybe DiskSnapshotState)
(Maybe DiskSnapshotState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe DiskSnapshotState
state :: Maybe DiskSnapshotState
$sel:state:DiskSnapshot' :: DiskSnapshot -> Maybe DiskSnapshotState
state} -> Maybe DiskSnapshotState
state) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe DiskSnapshotState
a -> DiskSnapshot
s {$sel:state:DiskSnapshot' :: Maybe DiskSnapshotState
state = Maybe DiskSnapshotState
a} :: DiskSnapshot)
diskSnapshot_resourceType :: Lens.Lens' DiskSnapshot (Prelude.Maybe ResourceType)
diskSnapshot_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> DiskSnapshot -> f DiskSnapshot
diskSnapshot_resourceType = (DiskSnapshot -> Maybe ResourceType)
-> (DiskSnapshot -> Maybe ResourceType -> DiskSnapshot)
-> Lens
DiskSnapshot DiskSnapshot (Maybe ResourceType) (Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:DiskSnapshot' :: DiskSnapshot -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe ResourceType
a -> DiskSnapshot
s {$sel:resourceType:DiskSnapshot' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: DiskSnapshot)
diskSnapshot_arn :: Lens.Lens' DiskSnapshot (Prelude.Maybe Prelude.Text)
diskSnapshot_arn :: (Maybe Text -> f (Maybe Text)) -> DiskSnapshot -> f DiskSnapshot
diskSnapshot_arn = (DiskSnapshot -> Maybe Text)
-> (DiskSnapshot -> Maybe Text -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe Text
arn :: Maybe Text
$sel:arn:DiskSnapshot' :: DiskSnapshot -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe Text
a -> DiskSnapshot
s {$sel:arn:DiskSnapshot' :: Maybe Text
arn = Maybe Text
a} :: DiskSnapshot)
diskSnapshot_createdAt :: Lens.Lens' DiskSnapshot (Prelude.Maybe Prelude.UTCTime)
diskSnapshot_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DiskSnapshot -> f DiskSnapshot
diskSnapshot_createdAt = (DiskSnapshot -> Maybe POSIX)
-> (DiskSnapshot -> Maybe POSIX -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:DiskSnapshot' :: DiskSnapshot -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe POSIX
a -> DiskSnapshot
s {$sel:createdAt:DiskSnapshot' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: DiskSnapshot) ((Maybe POSIX -> f (Maybe POSIX))
-> DiskSnapshot -> f DiskSnapshot)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DiskSnapshot
-> f DiskSnapshot
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
diskSnapshot_location :: Lens.Lens' DiskSnapshot (Prelude.Maybe ResourceLocation)
diskSnapshot_location :: (Maybe ResourceLocation -> f (Maybe ResourceLocation))
-> DiskSnapshot -> f DiskSnapshot
diskSnapshot_location = (DiskSnapshot -> Maybe ResourceLocation)
-> (DiskSnapshot -> Maybe ResourceLocation -> DiskSnapshot)
-> Lens
DiskSnapshot
DiskSnapshot
(Maybe ResourceLocation)
(Maybe ResourceLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:DiskSnapshot' :: DiskSnapshot -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe ResourceLocation
a -> DiskSnapshot
s {$sel:location:DiskSnapshot' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: DiskSnapshot)
diskSnapshot_progress :: Lens.Lens' DiskSnapshot (Prelude.Maybe Prelude.Text)
diskSnapshot_progress :: (Maybe Text -> f (Maybe Text)) -> DiskSnapshot -> f DiskSnapshot
diskSnapshot_progress = (DiskSnapshot -> Maybe Text)
-> (DiskSnapshot -> Maybe Text -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe Text
progress :: Maybe Text
$sel:progress:DiskSnapshot' :: DiskSnapshot -> Maybe Text
progress} -> Maybe Text
progress) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe Text
a -> DiskSnapshot
s {$sel:progress:DiskSnapshot' :: Maybe Text
progress = Maybe Text
a} :: DiskSnapshot)
diskSnapshot_name :: Lens.Lens' DiskSnapshot (Prelude.Maybe Prelude.Text)
diskSnapshot_name :: (Maybe Text -> f (Maybe Text)) -> DiskSnapshot -> f DiskSnapshot
diskSnapshot_name = (DiskSnapshot -> Maybe Text)
-> (DiskSnapshot -> Maybe Text -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe Text
name :: Maybe Text
$sel:name:DiskSnapshot' :: DiskSnapshot -> Maybe Text
name} -> Maybe Text
name) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe Text
a -> DiskSnapshot
s {$sel:name:DiskSnapshot' :: Maybe Text
name = Maybe Text
a} :: DiskSnapshot)
diskSnapshot_sizeInGb :: Lens.Lens' DiskSnapshot (Prelude.Maybe Prelude.Int)
diskSnapshot_sizeInGb :: (Maybe Int -> f (Maybe Int)) -> DiskSnapshot -> f DiskSnapshot
diskSnapshot_sizeInGb = (DiskSnapshot -> Maybe Int)
-> (DiskSnapshot -> Maybe Int -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe Int
sizeInGb :: Maybe Int
$sel:sizeInGb:DiskSnapshot' :: DiskSnapshot -> Maybe Int
sizeInGb} -> Maybe Int
sizeInGb) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe Int
a -> DiskSnapshot
s {$sel:sizeInGb:DiskSnapshot' :: Maybe Int
sizeInGb = Maybe Int
a} :: DiskSnapshot)
diskSnapshot_supportCode :: Lens.Lens' DiskSnapshot (Prelude.Maybe Prelude.Text)
diskSnapshot_supportCode :: (Maybe Text -> f (Maybe Text)) -> DiskSnapshot -> f DiskSnapshot
diskSnapshot_supportCode = (DiskSnapshot -> Maybe Text)
-> (DiskSnapshot -> Maybe Text -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe Text
supportCode :: Maybe Text
$sel:supportCode:DiskSnapshot' :: DiskSnapshot -> Maybe Text
supportCode} -> Maybe Text
supportCode) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe Text
a -> DiskSnapshot
s {$sel:supportCode:DiskSnapshot' :: Maybe Text
supportCode = Maybe Text
a} :: DiskSnapshot)
diskSnapshot_fromInstanceArn :: Lens.Lens' DiskSnapshot (Prelude.Maybe Prelude.Text)
diskSnapshot_fromInstanceArn :: (Maybe Text -> f (Maybe Text)) -> DiskSnapshot -> f DiskSnapshot
diskSnapshot_fromInstanceArn = (DiskSnapshot -> Maybe Text)
-> (DiskSnapshot -> Maybe Text -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe Text
fromInstanceArn :: Maybe Text
$sel:fromInstanceArn:DiskSnapshot' :: DiskSnapshot -> Maybe Text
fromInstanceArn} -> Maybe Text
fromInstanceArn) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe Text
a -> DiskSnapshot
s {$sel:fromInstanceArn:DiskSnapshot' :: Maybe Text
fromInstanceArn = Maybe Text
a} :: DiskSnapshot)
diskSnapshot_fromInstanceName :: Lens.Lens' DiskSnapshot (Prelude.Maybe Prelude.Text)
diskSnapshot_fromInstanceName :: (Maybe Text -> f (Maybe Text)) -> DiskSnapshot -> f DiskSnapshot
diskSnapshot_fromInstanceName = (DiskSnapshot -> Maybe Text)
-> (DiskSnapshot -> Maybe Text -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe Text
fromInstanceName :: Maybe Text
$sel:fromInstanceName:DiskSnapshot' :: DiskSnapshot -> Maybe Text
fromInstanceName} -> Maybe Text
fromInstanceName) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe Text
a -> DiskSnapshot
s {$sel:fromInstanceName:DiskSnapshot' :: Maybe Text
fromInstanceName = Maybe Text
a} :: DiskSnapshot)
diskSnapshot_fromDiskArn :: Lens.Lens' DiskSnapshot (Prelude.Maybe Prelude.Text)
diskSnapshot_fromDiskArn :: (Maybe Text -> f (Maybe Text)) -> DiskSnapshot -> f DiskSnapshot
diskSnapshot_fromDiskArn = (DiskSnapshot -> Maybe Text)
-> (DiskSnapshot -> Maybe Text -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe Text
fromDiskArn :: Maybe Text
$sel:fromDiskArn:DiskSnapshot' :: DiskSnapshot -> Maybe Text
fromDiskArn} -> Maybe Text
fromDiskArn) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe Text
a -> DiskSnapshot
s {$sel:fromDiskArn:DiskSnapshot' :: Maybe Text
fromDiskArn = Maybe Text
a} :: DiskSnapshot)
diskSnapshot_tags :: Lens.Lens' DiskSnapshot (Prelude.Maybe [Tag])
diskSnapshot_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> DiskSnapshot -> f DiskSnapshot
diskSnapshot_tags = (DiskSnapshot -> Maybe [Tag])
-> (DiskSnapshot -> Maybe [Tag] -> DiskSnapshot)
-> Lens DiskSnapshot DiskSnapshot (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskSnapshot' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:DiskSnapshot' :: DiskSnapshot -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: DiskSnapshot
s@DiskSnapshot' {} Maybe [Tag]
a -> DiskSnapshot
s {$sel:tags:DiskSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: DiskSnapshot) ((Maybe [Tag] -> f (Maybe [Tag]))
-> DiskSnapshot -> f DiskSnapshot)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> DiskSnapshot
-> f DiskSnapshot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON DiskSnapshot where
parseJSON :: Value -> Parser DiskSnapshot
parseJSON =
String
-> (Object -> Parser DiskSnapshot) -> Value -> Parser DiskSnapshot
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DiskSnapshot"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe DiskSnapshotState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot
DiskSnapshot'
(Maybe Text
-> Maybe Bool
-> Maybe DiskSnapshotState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe DiskSnapshotState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
forall (f :: * -> *) a b. Functor 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
"fromDiskName")
Parser
(Maybe Bool
-> Maybe DiskSnapshotState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
-> Parser (Maybe Bool)
-> Parser
(Maybe DiskSnapshotState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"isFromAutoSnapshot")
Parser
(Maybe DiskSnapshotState
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
-> Parser (Maybe DiskSnapshotState)
-> Parser
(Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DiskSnapshotState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
Parser
(Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
-> Parser (Maybe ResourceType)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceType")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
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
"arn")
Parser
(Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
-> Parser (Maybe POSIX)
-> Parser
(Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
Parser
(Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
-> Parser (Maybe ResourceLocation)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"location")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
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
"progress")
Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
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
"name")
Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sizeInGb")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> DiskSnapshot)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe [Tag] -> DiskSnapshot)
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
"supportCode")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe [Tag] -> DiskSnapshot)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe [Tag] -> DiskSnapshot)
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
"fromInstanceArn")
Parser (Maybe Text -> Maybe Text -> Maybe [Tag] -> DiskSnapshot)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Tag] -> DiskSnapshot)
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
"fromInstanceName")
Parser (Maybe Text -> Maybe [Tag] -> DiskSnapshot)
-> Parser (Maybe Text) -> Parser (Maybe [Tag] -> DiskSnapshot)
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
"fromDiskArn")
Parser (Maybe [Tag] -> DiskSnapshot)
-> Parser (Maybe [Tag]) -> Parser DiskSnapshot
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable DiskSnapshot
instance Prelude.NFData DiskSnapshot