{-# 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.InstanceSnapshot where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.Disk
import Amazonka.Lightsail.Types.InstanceSnapshotState
import Amazonka.Lightsail.Types.ResourceLocation
import Amazonka.Lightsail.Types.ResourceType
import Amazonka.Lightsail.Types.Tag
import qualified Amazonka.Prelude as Prelude
data InstanceSnapshot = InstanceSnapshot'
{
InstanceSnapshot -> Maybe Text
fromBlueprintId :: Prelude.Maybe Prelude.Text,
InstanceSnapshot -> Maybe Bool
isFromAutoSnapshot :: Prelude.Maybe Prelude.Bool,
InstanceSnapshot -> Maybe InstanceSnapshotState
state :: Prelude.Maybe InstanceSnapshotState,
InstanceSnapshot -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
InstanceSnapshot -> Maybe [Disk]
fromAttachedDisks :: Prelude.Maybe [Disk],
InstanceSnapshot -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
InstanceSnapshot -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
InstanceSnapshot -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
InstanceSnapshot -> Maybe Text
progress :: Prelude.Maybe Prelude.Text,
InstanceSnapshot -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
InstanceSnapshot -> Maybe Text
fromBundleId :: Prelude.Maybe Prelude.Text,
InstanceSnapshot -> Maybe Int
sizeInGb :: Prelude.Maybe Prelude.Int,
InstanceSnapshot -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text,
InstanceSnapshot -> Maybe Text
fromInstanceArn :: Prelude.Maybe Prelude.Text,
InstanceSnapshot -> Maybe Text
fromInstanceName :: Prelude.Maybe Prelude.Text,
InstanceSnapshot -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
deriving (InstanceSnapshot -> InstanceSnapshot -> Bool
(InstanceSnapshot -> InstanceSnapshot -> Bool)
-> (InstanceSnapshot -> InstanceSnapshot -> Bool)
-> Eq InstanceSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceSnapshot -> InstanceSnapshot -> Bool
$c/= :: InstanceSnapshot -> InstanceSnapshot -> Bool
== :: InstanceSnapshot -> InstanceSnapshot -> Bool
$c== :: InstanceSnapshot -> InstanceSnapshot -> Bool
Prelude.Eq, ReadPrec [InstanceSnapshot]
ReadPrec InstanceSnapshot
Int -> ReadS InstanceSnapshot
ReadS [InstanceSnapshot]
(Int -> ReadS InstanceSnapshot)
-> ReadS [InstanceSnapshot]
-> ReadPrec InstanceSnapshot
-> ReadPrec [InstanceSnapshot]
-> Read InstanceSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceSnapshot]
$creadListPrec :: ReadPrec [InstanceSnapshot]
readPrec :: ReadPrec InstanceSnapshot
$creadPrec :: ReadPrec InstanceSnapshot
readList :: ReadS [InstanceSnapshot]
$creadList :: ReadS [InstanceSnapshot]
readsPrec :: Int -> ReadS InstanceSnapshot
$creadsPrec :: Int -> ReadS InstanceSnapshot
Prelude.Read, Int -> InstanceSnapshot -> ShowS
[InstanceSnapshot] -> ShowS
InstanceSnapshot -> String
(Int -> InstanceSnapshot -> ShowS)
-> (InstanceSnapshot -> String)
-> ([InstanceSnapshot] -> ShowS)
-> Show InstanceSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceSnapshot] -> ShowS
$cshowList :: [InstanceSnapshot] -> ShowS
show :: InstanceSnapshot -> String
$cshow :: InstanceSnapshot -> String
showsPrec :: Int -> InstanceSnapshot -> ShowS
$cshowsPrec :: Int -> InstanceSnapshot -> ShowS
Prelude.Show, (forall x. InstanceSnapshot -> Rep InstanceSnapshot x)
-> (forall x. Rep InstanceSnapshot x -> InstanceSnapshot)
-> Generic InstanceSnapshot
forall x. Rep InstanceSnapshot x -> InstanceSnapshot
forall x. InstanceSnapshot -> Rep InstanceSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstanceSnapshot x -> InstanceSnapshot
$cfrom :: forall x. InstanceSnapshot -> Rep InstanceSnapshot x
Prelude.Generic)
newInstanceSnapshot ::
InstanceSnapshot
newInstanceSnapshot :: InstanceSnapshot
newInstanceSnapshot =
InstanceSnapshot' :: Maybe Text
-> Maybe Bool
-> Maybe InstanceSnapshotState
-> Maybe ResourceType
-> Maybe [Disk]
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot
InstanceSnapshot'
{ $sel:fromBlueprintId:InstanceSnapshot' :: Maybe Text
fromBlueprintId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isFromAutoSnapshot:InstanceSnapshot' :: Maybe Bool
isFromAutoSnapshot = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:state:InstanceSnapshot' :: Maybe InstanceSnapshotState
state = Maybe InstanceSnapshotState
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:InstanceSnapshot' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
$sel:fromAttachedDisks:InstanceSnapshot' :: Maybe [Disk]
fromAttachedDisks = Maybe [Disk]
forall a. Maybe a
Prelude.Nothing,
$sel:arn:InstanceSnapshot' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:InstanceSnapshot' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:location:InstanceSnapshot' :: Maybe ResourceLocation
location = Maybe ResourceLocation
forall a. Maybe a
Prelude.Nothing,
$sel:progress:InstanceSnapshot' :: Maybe Text
progress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:InstanceSnapshot' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fromBundleId:InstanceSnapshot' :: Maybe Text
fromBundleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sizeInGb:InstanceSnapshot' :: Maybe Int
sizeInGb = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:supportCode:InstanceSnapshot' :: Maybe Text
supportCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fromInstanceArn:InstanceSnapshot' :: Maybe Text
fromInstanceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fromInstanceName:InstanceSnapshot' :: Maybe Text
fromInstanceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:InstanceSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
}
instanceSnapshot_fromBlueprintId :: Lens.Lens' InstanceSnapshot (Prelude.Maybe Prelude.Text)
instanceSnapshot_fromBlueprintId :: (Maybe Text -> f (Maybe Text))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_fromBlueprintId = (InstanceSnapshot -> Maybe Text)
-> (InstanceSnapshot -> Maybe Text -> InstanceSnapshot)
-> Lens InstanceSnapshot InstanceSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe Text
fromBlueprintId :: Maybe Text
$sel:fromBlueprintId:InstanceSnapshot' :: InstanceSnapshot -> Maybe Text
fromBlueprintId} -> Maybe Text
fromBlueprintId) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe Text
a -> InstanceSnapshot
s {$sel:fromBlueprintId:InstanceSnapshot' :: Maybe Text
fromBlueprintId = Maybe Text
a} :: InstanceSnapshot)
instanceSnapshot_isFromAutoSnapshot :: Lens.Lens' InstanceSnapshot (Prelude.Maybe Prelude.Bool)
instanceSnapshot_isFromAutoSnapshot :: (Maybe Bool -> f (Maybe Bool))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_isFromAutoSnapshot = (InstanceSnapshot -> Maybe Bool)
-> (InstanceSnapshot -> Maybe Bool -> InstanceSnapshot)
-> Lens InstanceSnapshot InstanceSnapshot (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe Bool
isFromAutoSnapshot :: Maybe Bool
$sel:isFromAutoSnapshot:InstanceSnapshot' :: InstanceSnapshot -> Maybe Bool
isFromAutoSnapshot} -> Maybe Bool
isFromAutoSnapshot) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe Bool
a -> InstanceSnapshot
s {$sel:isFromAutoSnapshot:InstanceSnapshot' :: Maybe Bool
isFromAutoSnapshot = Maybe Bool
a} :: InstanceSnapshot)
instanceSnapshot_state :: Lens.Lens' InstanceSnapshot (Prelude.Maybe InstanceSnapshotState)
instanceSnapshot_state :: (Maybe InstanceSnapshotState -> f (Maybe InstanceSnapshotState))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_state = (InstanceSnapshot -> Maybe InstanceSnapshotState)
-> (InstanceSnapshot
-> Maybe InstanceSnapshotState -> InstanceSnapshot)
-> Lens
InstanceSnapshot
InstanceSnapshot
(Maybe InstanceSnapshotState)
(Maybe InstanceSnapshotState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe InstanceSnapshotState
state :: Maybe InstanceSnapshotState
$sel:state:InstanceSnapshot' :: InstanceSnapshot -> Maybe InstanceSnapshotState
state} -> Maybe InstanceSnapshotState
state) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe InstanceSnapshotState
a -> InstanceSnapshot
s {$sel:state:InstanceSnapshot' :: Maybe InstanceSnapshotState
state = Maybe InstanceSnapshotState
a} :: InstanceSnapshot)
instanceSnapshot_resourceType :: Lens.Lens' InstanceSnapshot (Prelude.Maybe ResourceType)
instanceSnapshot_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_resourceType = (InstanceSnapshot -> Maybe ResourceType)
-> (InstanceSnapshot -> Maybe ResourceType -> InstanceSnapshot)
-> Lens
InstanceSnapshot
InstanceSnapshot
(Maybe ResourceType)
(Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:InstanceSnapshot' :: InstanceSnapshot -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe ResourceType
a -> InstanceSnapshot
s {$sel:resourceType:InstanceSnapshot' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: InstanceSnapshot)
instanceSnapshot_fromAttachedDisks :: Lens.Lens' InstanceSnapshot (Prelude.Maybe [Disk])
instanceSnapshot_fromAttachedDisks :: (Maybe [Disk] -> f (Maybe [Disk]))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_fromAttachedDisks = (InstanceSnapshot -> Maybe [Disk])
-> (InstanceSnapshot -> Maybe [Disk] -> InstanceSnapshot)
-> Lens
InstanceSnapshot InstanceSnapshot (Maybe [Disk]) (Maybe [Disk])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe [Disk]
fromAttachedDisks :: Maybe [Disk]
$sel:fromAttachedDisks:InstanceSnapshot' :: InstanceSnapshot -> Maybe [Disk]
fromAttachedDisks} -> Maybe [Disk]
fromAttachedDisks) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe [Disk]
a -> InstanceSnapshot
s {$sel:fromAttachedDisks:InstanceSnapshot' :: Maybe [Disk]
fromAttachedDisks = Maybe [Disk]
a} :: InstanceSnapshot) ((Maybe [Disk] -> f (Maybe [Disk]))
-> InstanceSnapshot -> f InstanceSnapshot)
-> ((Maybe [Disk] -> f (Maybe [Disk]))
-> Maybe [Disk] -> f (Maybe [Disk]))
-> (Maybe [Disk] -> f (Maybe [Disk]))
-> InstanceSnapshot
-> f InstanceSnapshot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Disk] [Disk] [Disk] [Disk]
-> Iso (Maybe [Disk]) (Maybe [Disk]) (Maybe [Disk]) (Maybe [Disk])
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 [Disk] [Disk] [Disk] [Disk]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instanceSnapshot_arn :: Lens.Lens' InstanceSnapshot (Prelude.Maybe Prelude.Text)
instanceSnapshot_arn :: (Maybe Text -> f (Maybe Text))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_arn = (InstanceSnapshot -> Maybe Text)
-> (InstanceSnapshot -> Maybe Text -> InstanceSnapshot)
-> Lens InstanceSnapshot InstanceSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe Text
arn :: Maybe Text
$sel:arn:InstanceSnapshot' :: InstanceSnapshot -> Maybe Text
arn} -> Maybe Text
arn) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe Text
a -> InstanceSnapshot
s {$sel:arn:InstanceSnapshot' :: Maybe Text
arn = Maybe Text
a} :: InstanceSnapshot)
instanceSnapshot_createdAt :: Lens.Lens' InstanceSnapshot (Prelude.Maybe Prelude.UTCTime)
instanceSnapshot_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_createdAt = (InstanceSnapshot -> Maybe POSIX)
-> (InstanceSnapshot -> Maybe POSIX -> InstanceSnapshot)
-> Lens
InstanceSnapshot InstanceSnapshot (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:InstanceSnapshot' :: InstanceSnapshot -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe POSIX
a -> InstanceSnapshot
s {$sel:createdAt:InstanceSnapshot' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: InstanceSnapshot) ((Maybe POSIX -> f (Maybe POSIX))
-> InstanceSnapshot -> f InstanceSnapshot)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceSnapshot
-> f InstanceSnapshot
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
instanceSnapshot_location :: Lens.Lens' InstanceSnapshot (Prelude.Maybe ResourceLocation)
instanceSnapshot_location :: (Maybe ResourceLocation -> f (Maybe ResourceLocation))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_location = (InstanceSnapshot -> Maybe ResourceLocation)
-> (InstanceSnapshot -> Maybe ResourceLocation -> InstanceSnapshot)
-> Lens
InstanceSnapshot
InstanceSnapshot
(Maybe ResourceLocation)
(Maybe ResourceLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:InstanceSnapshot' :: InstanceSnapshot -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe ResourceLocation
a -> InstanceSnapshot
s {$sel:location:InstanceSnapshot' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: InstanceSnapshot)
instanceSnapshot_progress :: Lens.Lens' InstanceSnapshot (Prelude.Maybe Prelude.Text)
instanceSnapshot_progress :: (Maybe Text -> f (Maybe Text))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_progress = (InstanceSnapshot -> Maybe Text)
-> (InstanceSnapshot -> Maybe Text -> InstanceSnapshot)
-> Lens InstanceSnapshot InstanceSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe Text
progress :: Maybe Text
$sel:progress:InstanceSnapshot' :: InstanceSnapshot -> Maybe Text
progress} -> Maybe Text
progress) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe Text
a -> InstanceSnapshot
s {$sel:progress:InstanceSnapshot' :: Maybe Text
progress = Maybe Text
a} :: InstanceSnapshot)
instanceSnapshot_name :: Lens.Lens' InstanceSnapshot (Prelude.Maybe Prelude.Text)
instanceSnapshot_name :: (Maybe Text -> f (Maybe Text))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_name = (InstanceSnapshot -> Maybe Text)
-> (InstanceSnapshot -> Maybe Text -> InstanceSnapshot)
-> Lens InstanceSnapshot InstanceSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe Text
name :: Maybe Text
$sel:name:InstanceSnapshot' :: InstanceSnapshot -> Maybe Text
name} -> Maybe Text
name) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe Text
a -> InstanceSnapshot
s {$sel:name:InstanceSnapshot' :: Maybe Text
name = Maybe Text
a} :: InstanceSnapshot)
instanceSnapshot_fromBundleId :: Lens.Lens' InstanceSnapshot (Prelude.Maybe Prelude.Text)
instanceSnapshot_fromBundleId :: (Maybe Text -> f (Maybe Text))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_fromBundleId = (InstanceSnapshot -> Maybe Text)
-> (InstanceSnapshot -> Maybe Text -> InstanceSnapshot)
-> Lens InstanceSnapshot InstanceSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe Text
fromBundleId :: Maybe Text
$sel:fromBundleId:InstanceSnapshot' :: InstanceSnapshot -> Maybe Text
fromBundleId} -> Maybe Text
fromBundleId) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe Text
a -> InstanceSnapshot
s {$sel:fromBundleId:InstanceSnapshot' :: Maybe Text
fromBundleId = Maybe Text
a} :: InstanceSnapshot)
instanceSnapshot_sizeInGb :: Lens.Lens' InstanceSnapshot (Prelude.Maybe Prelude.Int)
instanceSnapshot_sizeInGb :: (Maybe Int -> f (Maybe Int))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_sizeInGb = (InstanceSnapshot -> Maybe Int)
-> (InstanceSnapshot -> Maybe Int -> InstanceSnapshot)
-> Lens InstanceSnapshot InstanceSnapshot (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe Int
sizeInGb :: Maybe Int
$sel:sizeInGb:InstanceSnapshot' :: InstanceSnapshot -> Maybe Int
sizeInGb} -> Maybe Int
sizeInGb) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe Int
a -> InstanceSnapshot
s {$sel:sizeInGb:InstanceSnapshot' :: Maybe Int
sizeInGb = Maybe Int
a} :: InstanceSnapshot)
instanceSnapshot_supportCode :: Lens.Lens' InstanceSnapshot (Prelude.Maybe Prelude.Text)
instanceSnapshot_supportCode :: (Maybe Text -> f (Maybe Text))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_supportCode = (InstanceSnapshot -> Maybe Text)
-> (InstanceSnapshot -> Maybe Text -> InstanceSnapshot)
-> Lens InstanceSnapshot InstanceSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe Text
supportCode :: Maybe Text
$sel:supportCode:InstanceSnapshot' :: InstanceSnapshot -> Maybe Text
supportCode} -> Maybe Text
supportCode) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe Text
a -> InstanceSnapshot
s {$sel:supportCode:InstanceSnapshot' :: Maybe Text
supportCode = Maybe Text
a} :: InstanceSnapshot)
instanceSnapshot_fromInstanceArn :: Lens.Lens' InstanceSnapshot (Prelude.Maybe Prelude.Text)
instanceSnapshot_fromInstanceArn :: (Maybe Text -> f (Maybe Text))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_fromInstanceArn = (InstanceSnapshot -> Maybe Text)
-> (InstanceSnapshot -> Maybe Text -> InstanceSnapshot)
-> Lens InstanceSnapshot InstanceSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe Text
fromInstanceArn :: Maybe Text
$sel:fromInstanceArn:InstanceSnapshot' :: InstanceSnapshot -> Maybe Text
fromInstanceArn} -> Maybe Text
fromInstanceArn) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe Text
a -> InstanceSnapshot
s {$sel:fromInstanceArn:InstanceSnapshot' :: Maybe Text
fromInstanceArn = Maybe Text
a} :: InstanceSnapshot)
instanceSnapshot_fromInstanceName :: Lens.Lens' InstanceSnapshot (Prelude.Maybe Prelude.Text)
instanceSnapshot_fromInstanceName :: (Maybe Text -> f (Maybe Text))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_fromInstanceName = (InstanceSnapshot -> Maybe Text)
-> (InstanceSnapshot -> Maybe Text -> InstanceSnapshot)
-> Lens InstanceSnapshot InstanceSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe Text
fromInstanceName :: Maybe Text
$sel:fromInstanceName:InstanceSnapshot' :: InstanceSnapshot -> Maybe Text
fromInstanceName} -> Maybe Text
fromInstanceName) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe Text
a -> InstanceSnapshot
s {$sel:fromInstanceName:InstanceSnapshot' :: Maybe Text
fromInstanceName = Maybe Text
a} :: InstanceSnapshot)
instanceSnapshot_tags :: Lens.Lens' InstanceSnapshot (Prelude.Maybe [Tag])
instanceSnapshot_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> InstanceSnapshot -> f InstanceSnapshot
instanceSnapshot_tags = (InstanceSnapshot -> Maybe [Tag])
-> (InstanceSnapshot -> Maybe [Tag] -> InstanceSnapshot)
-> Lens
InstanceSnapshot InstanceSnapshot (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceSnapshot' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:InstanceSnapshot' :: InstanceSnapshot -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: InstanceSnapshot
s@InstanceSnapshot' {} Maybe [Tag]
a -> InstanceSnapshot
s {$sel:tags:InstanceSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: InstanceSnapshot) ((Maybe [Tag] -> f (Maybe [Tag]))
-> InstanceSnapshot -> f InstanceSnapshot)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> InstanceSnapshot
-> f InstanceSnapshot
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 InstanceSnapshot where
parseJSON :: Value -> Parser InstanceSnapshot
parseJSON =
String
-> (Object -> Parser InstanceSnapshot)
-> Value
-> Parser InstanceSnapshot
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InstanceSnapshot"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe InstanceSnapshotState
-> Maybe ResourceType
-> Maybe [Disk]
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot
InstanceSnapshot'
(Maybe Text
-> Maybe Bool
-> Maybe InstanceSnapshotState
-> Maybe ResourceType
-> Maybe [Disk]
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe InstanceSnapshotState
-> Maybe ResourceType
-> Maybe [Disk]
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
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
"fromBlueprintId")
Parser
(Maybe Bool
-> Maybe InstanceSnapshotState
-> Maybe ResourceType
-> Maybe [Disk]
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe Bool)
-> Parser
(Maybe InstanceSnapshotState
-> Maybe ResourceType
-> Maybe [Disk]
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
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 InstanceSnapshotState
-> Maybe ResourceType
-> Maybe [Disk]
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe InstanceSnapshotState)
-> Parser
(Maybe ResourceType
-> Maybe [Disk]
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstanceSnapshotState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
Parser
(Maybe ResourceType
-> Maybe [Disk]
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe ResourceType)
-> Parser
(Maybe [Disk]
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
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 [Disk]
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe [Disk])
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Disk]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"fromAttachedDisks"
Parser (Maybe (Maybe [Disk]))
-> Maybe [Disk] -> Parser (Maybe [Disk])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Disk]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
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 Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe POSIX)
-> Parser
(Maybe ResourceLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
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 Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe ResourceLocation)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
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 Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
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 Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
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 Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
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
"fromBundleId")
Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> InstanceSnapshot)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe [Tag] -> InstanceSnapshot)
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 [Tag] -> InstanceSnapshot)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe [Tag] -> InstanceSnapshot)
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 [Tag] -> InstanceSnapshot)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Tag] -> InstanceSnapshot)
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 [Tag] -> InstanceSnapshot)
-> Parser (Maybe Text) -> Parser (Maybe [Tag] -> InstanceSnapshot)
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 [Tag] -> InstanceSnapshot)
-> Parser (Maybe [Tag]) -> Parser InstanceSnapshot
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 InstanceSnapshot
instance Prelude.NFData InstanceSnapshot