{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Lightsail.Types.InstanceSnapshot
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Describes an instance snapshot.
--
-- /See:/ 'newInstanceSnapshot' smart constructor.
data InstanceSnapshot = InstanceSnapshot'
  { -- | The blueprint ID from which you created the snapshot (e.g.,
    -- @os_debian_8_3@). A blueprint is a virtual private server (or
    -- /instance/) image used to create instances quickly.
    InstanceSnapshot -> Maybe Text
fromBlueprintId :: Prelude.Maybe Prelude.Text,
    -- | A Boolean value indicating whether the snapshot was created from an
    -- automatic snapshot.
    InstanceSnapshot -> Maybe Bool
isFromAutoSnapshot :: Prelude.Maybe Prelude.Bool,
    -- | The state the snapshot is in.
    InstanceSnapshot -> Maybe InstanceSnapshotState
state :: Prelude.Maybe InstanceSnapshotState,
    -- | The type of resource (usually @InstanceSnapshot@).
    InstanceSnapshot -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | An array of disk objects containing information about all block storage
    -- disks.
    InstanceSnapshot -> Maybe [Disk]
fromAttachedDisks :: Prelude.Maybe [Disk],
    -- | The Amazon Resource Name (ARN) of the snapshot (e.g.,
    -- @arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot\/d23b5706-3322-4d83-81e5-12345EXAMPLE@).
    InstanceSnapshot -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the snapshot was created (e.g., @1479907467.024@).
    InstanceSnapshot -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The region name and Availability Zone where you created the snapshot.
    InstanceSnapshot -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
    -- | The progress of the snapshot.
    --
    -- This is populated only for disk snapshots, and is @null@ for instance
    -- snapshots.
    InstanceSnapshot -> Maybe Text
progress :: Prelude.Maybe Prelude.Text,
    -- | The name of the snapshot.
    InstanceSnapshot -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The bundle ID from which you created the snapshot (e.g., @micro_1_0@).
    InstanceSnapshot -> Maybe Text
fromBundleId :: Prelude.Maybe Prelude.Text,
    -- | The size in GB of the SSD.
    InstanceSnapshot -> Maybe Int
sizeInGb :: Prelude.Maybe Prelude.Int,
    -- | The support code. Include this code in your email to support when you
    -- have questions about an instance or another resource in Lightsail. This
    -- code enables our support team to look up your Lightsail information more
    -- easily.
    InstanceSnapshot -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the instance from which the snapshot
    -- was created (e.g.,
    -- @arn:aws:lightsail:us-east-2:123456789101:Instance\/64b8404c-ccb1-430b-8daf-12345EXAMPLE@).
    InstanceSnapshot -> Maybe Text
fromInstanceArn :: Prelude.Maybe Prelude.Text,
    -- | The instance from which the snapshot was created.
    InstanceSnapshot -> Maybe Text
fromInstanceName :: Prelude.Maybe Prelude.Text,
    -- | The tag keys and optional values for the resource. For more information
    -- about tags in Lightsail, see the
    -- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
    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)

-- |
-- Create a value of 'InstanceSnapshot' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'fromBlueprintId', 'instanceSnapshot_fromBlueprintId' - The blueprint ID from which you created the snapshot (e.g.,
-- @os_debian_8_3@). A blueprint is a virtual private server (or
-- /instance/) image used to create instances quickly.
--
-- 'isFromAutoSnapshot', 'instanceSnapshot_isFromAutoSnapshot' - A Boolean value indicating whether the snapshot was created from an
-- automatic snapshot.
--
-- 'state', 'instanceSnapshot_state' - The state the snapshot is in.
--
-- 'resourceType', 'instanceSnapshot_resourceType' - The type of resource (usually @InstanceSnapshot@).
--
-- 'fromAttachedDisks', 'instanceSnapshot_fromAttachedDisks' - An array of disk objects containing information about all block storage
-- disks.
--
-- 'arn', 'instanceSnapshot_arn' - The Amazon Resource Name (ARN) of the snapshot (e.g.,
-- @arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot\/d23b5706-3322-4d83-81e5-12345EXAMPLE@).
--
-- 'createdAt', 'instanceSnapshot_createdAt' - The timestamp when the snapshot was created (e.g., @1479907467.024@).
--
-- 'location', 'instanceSnapshot_location' - The region name and Availability Zone where you created the snapshot.
--
-- 'progress', 'instanceSnapshot_progress' - The progress of the snapshot.
--
-- This is populated only for disk snapshots, and is @null@ for instance
-- snapshots.
--
-- 'name', 'instanceSnapshot_name' - The name of the snapshot.
--
-- 'fromBundleId', 'instanceSnapshot_fromBundleId' - The bundle ID from which you created the snapshot (e.g., @micro_1_0@).
--
-- 'sizeInGb', 'instanceSnapshot_sizeInGb' - The size in GB of the SSD.
--
-- 'supportCode', 'instanceSnapshot_supportCode' - The support code. Include this code in your email to support when you
-- have questions about an instance or another resource in Lightsail. This
-- code enables our support team to look up your Lightsail information more
-- easily.
--
-- 'fromInstanceArn', 'instanceSnapshot_fromInstanceArn' - The Amazon Resource Name (ARN) of the instance from which the snapshot
-- was created (e.g.,
-- @arn:aws:lightsail:us-east-2:123456789101:Instance\/64b8404c-ccb1-430b-8daf-12345EXAMPLE@).
--
-- 'fromInstanceName', 'instanceSnapshot_fromInstanceName' - The instance from which the snapshot was created.
--
-- 'tags', 'instanceSnapshot_tags' - The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
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
    }

-- | The blueprint ID from which you created the snapshot (e.g.,
-- @os_debian_8_3@). A blueprint is a virtual private server (or
-- /instance/) image used to create instances quickly.
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)

-- | A Boolean value indicating whether the snapshot was created from an
-- automatic snapshot.
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)

-- | The state the snapshot is in.
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)

-- | The type of resource (usually @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)

-- | An array of disk objects containing information about all block storage
-- disks.
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

-- | The Amazon Resource Name (ARN) of the snapshot (e.g.,
-- @arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot\/d23b5706-3322-4d83-81e5-12345EXAMPLE@).
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)

-- | The timestamp when the snapshot was created (e.g., @1479907467.024@).
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

-- | The region name and Availability Zone where you created the snapshot.
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)

-- | The progress of the snapshot.
--
-- This is populated only for disk snapshots, and is @null@ for instance
-- snapshots.
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)

-- | The name of the snapshot.
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)

-- | The bundle ID from which you created the snapshot (e.g., @micro_1_0@).
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)

-- | The size in GB of the SSD.
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)

-- | The support code. Include this code in your email to support when you
-- have questions about an instance or another resource in Lightsail. This
-- code enables our support team to look up your Lightsail information more
-- easily.
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)

-- | The Amazon Resource Name (ARN) of the instance from which the snapshot
-- was created (e.g.,
-- @arn:aws:lightsail:us-east-2:123456789101:Instance\/64b8404c-ccb1-430b-8daf-12345EXAMPLE@).
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)

-- | The instance from which the snapshot was created.
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)

-- | The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
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