{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.Lightsail.GetAutoSnapshots
-- 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)
--
-- Returns the available automatic snapshots for an instance or disk. For
-- more information, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots Amazon Lightsail Developer Guide>.
module Amazonka.Lightsail.GetAutoSnapshots
  ( -- * Creating a Request
    GetAutoSnapshots (..),
    newGetAutoSnapshots,

    -- * Request Lenses
    getAutoSnapshots_resourceName,

    -- * Destructuring the Response
    GetAutoSnapshotsResponse (..),
    newGetAutoSnapshotsResponse,

    -- * Response Lenses
    getAutoSnapshotsResponse_resourceType,
    getAutoSnapshotsResponse_resourceName,
    getAutoSnapshotsResponse_autoSnapshots,
    getAutoSnapshotsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetAutoSnapshots' smart constructor.
data GetAutoSnapshots = GetAutoSnapshots'
  { -- | The name of the source instance or disk from which to get automatic
    -- snapshot information.
    GetAutoSnapshots -> Text
resourceName :: Prelude.Text
  }
  deriving (GetAutoSnapshots -> GetAutoSnapshots -> Bool
(GetAutoSnapshots -> GetAutoSnapshots -> Bool)
-> (GetAutoSnapshots -> GetAutoSnapshots -> Bool)
-> Eq GetAutoSnapshots
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAutoSnapshots -> GetAutoSnapshots -> Bool
$c/= :: GetAutoSnapshots -> GetAutoSnapshots -> Bool
== :: GetAutoSnapshots -> GetAutoSnapshots -> Bool
$c== :: GetAutoSnapshots -> GetAutoSnapshots -> Bool
Prelude.Eq, ReadPrec [GetAutoSnapshots]
ReadPrec GetAutoSnapshots
Int -> ReadS GetAutoSnapshots
ReadS [GetAutoSnapshots]
(Int -> ReadS GetAutoSnapshots)
-> ReadS [GetAutoSnapshots]
-> ReadPrec GetAutoSnapshots
-> ReadPrec [GetAutoSnapshots]
-> Read GetAutoSnapshots
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAutoSnapshots]
$creadListPrec :: ReadPrec [GetAutoSnapshots]
readPrec :: ReadPrec GetAutoSnapshots
$creadPrec :: ReadPrec GetAutoSnapshots
readList :: ReadS [GetAutoSnapshots]
$creadList :: ReadS [GetAutoSnapshots]
readsPrec :: Int -> ReadS GetAutoSnapshots
$creadsPrec :: Int -> ReadS GetAutoSnapshots
Prelude.Read, Int -> GetAutoSnapshots -> ShowS
[GetAutoSnapshots] -> ShowS
GetAutoSnapshots -> String
(Int -> GetAutoSnapshots -> ShowS)
-> (GetAutoSnapshots -> String)
-> ([GetAutoSnapshots] -> ShowS)
-> Show GetAutoSnapshots
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAutoSnapshots] -> ShowS
$cshowList :: [GetAutoSnapshots] -> ShowS
show :: GetAutoSnapshots -> String
$cshow :: GetAutoSnapshots -> String
showsPrec :: Int -> GetAutoSnapshots -> ShowS
$cshowsPrec :: Int -> GetAutoSnapshots -> ShowS
Prelude.Show, (forall x. GetAutoSnapshots -> Rep GetAutoSnapshots x)
-> (forall x. Rep GetAutoSnapshots x -> GetAutoSnapshots)
-> Generic GetAutoSnapshots
forall x. Rep GetAutoSnapshots x -> GetAutoSnapshots
forall x. GetAutoSnapshots -> Rep GetAutoSnapshots x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetAutoSnapshots x -> GetAutoSnapshots
$cfrom :: forall x. GetAutoSnapshots -> Rep GetAutoSnapshots x
Prelude.Generic)

-- |
-- Create a value of 'GetAutoSnapshots' 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:
--
-- 'resourceName', 'getAutoSnapshots_resourceName' - The name of the source instance or disk from which to get automatic
-- snapshot information.
newGetAutoSnapshots ::
  -- | 'resourceName'
  Prelude.Text ->
  GetAutoSnapshots
newGetAutoSnapshots :: Text -> GetAutoSnapshots
newGetAutoSnapshots Text
pResourceName_ =
  GetAutoSnapshots' :: Text -> GetAutoSnapshots
GetAutoSnapshots' {$sel:resourceName:GetAutoSnapshots' :: Text
resourceName = Text
pResourceName_}

-- | The name of the source instance or disk from which to get automatic
-- snapshot information.
getAutoSnapshots_resourceName :: Lens.Lens' GetAutoSnapshots Prelude.Text
getAutoSnapshots_resourceName :: (Text -> f Text) -> GetAutoSnapshots -> f GetAutoSnapshots
getAutoSnapshots_resourceName = (GetAutoSnapshots -> Text)
-> (GetAutoSnapshots -> Text -> GetAutoSnapshots)
-> Lens GetAutoSnapshots GetAutoSnapshots Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAutoSnapshots' {Text
resourceName :: Text
$sel:resourceName:GetAutoSnapshots' :: GetAutoSnapshots -> Text
resourceName} -> Text
resourceName) (\s :: GetAutoSnapshots
s@GetAutoSnapshots' {} Text
a -> GetAutoSnapshots
s {$sel:resourceName:GetAutoSnapshots' :: Text
resourceName = Text
a} :: GetAutoSnapshots)

instance Core.AWSRequest GetAutoSnapshots where
  type
    AWSResponse GetAutoSnapshots =
      GetAutoSnapshotsResponse
  request :: GetAutoSnapshots -> Request GetAutoSnapshots
request = Service -> GetAutoSnapshots -> Request GetAutoSnapshots
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetAutoSnapshots
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetAutoSnapshots)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetAutoSnapshots))
-> Logger
-> Service
-> Proxy GetAutoSnapshots
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetAutoSnapshots)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe ResourceType
-> Maybe Text
-> Maybe [AutoSnapshotDetails]
-> Int
-> GetAutoSnapshotsResponse
GetAutoSnapshotsResponse'
            (Maybe ResourceType
 -> Maybe Text
 -> Maybe [AutoSnapshotDetails]
 -> Int
 -> GetAutoSnapshotsResponse)
-> Either String (Maybe ResourceType)
-> Either
     String
     (Maybe Text
      -> Maybe [AutoSnapshotDetails] -> Int -> GetAutoSnapshotsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ResourceType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"resourceType")
            Either
  String
  (Maybe Text
   -> Maybe [AutoSnapshotDetails] -> Int -> GetAutoSnapshotsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [AutoSnapshotDetails] -> Int -> GetAutoSnapshotsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"resourceName")
            Either
  String
  (Maybe [AutoSnapshotDetails] -> Int -> GetAutoSnapshotsResponse)
-> Either String (Maybe [AutoSnapshotDetails])
-> Either String (Int -> GetAutoSnapshotsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe (Maybe [AutoSnapshotDetails]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"autoSnapshots" Either String (Maybe (Maybe [AutoSnapshotDetails]))
-> Maybe [AutoSnapshotDetails]
-> Either String (Maybe [AutoSnapshotDetails])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AutoSnapshotDetails]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetAutoSnapshotsResponse)
-> Either String Int -> Either String GetAutoSnapshotsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetAutoSnapshots

instance Prelude.NFData GetAutoSnapshots

instance Core.ToHeaders GetAutoSnapshots where
  toHeaders :: GetAutoSnapshots -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetAutoSnapshots -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Lightsail_20161128.GetAutoSnapshots" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON GetAutoSnapshots where
  toJSON :: GetAutoSnapshots -> Value
toJSON GetAutoSnapshots' {Text
resourceName :: Text
$sel:resourceName:GetAutoSnapshots' :: GetAutoSnapshots -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"resourceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceName)]
      )

instance Core.ToPath GetAutoSnapshots where
  toPath :: GetAutoSnapshots -> ByteString
toPath = ByteString -> GetAutoSnapshots -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery GetAutoSnapshots where
  toQuery :: GetAutoSnapshots -> QueryString
toQuery = QueryString -> GetAutoSnapshots -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetAutoSnapshotsResponse' smart constructor.
data GetAutoSnapshotsResponse = GetAutoSnapshotsResponse'
  { -- | The resource type (e.g., @Instance@ or @Disk@).
    GetAutoSnapshotsResponse -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | The name of the source instance or disk for the automatic snapshots.
    GetAutoSnapshotsResponse -> Maybe Text
resourceName :: Prelude.Maybe Prelude.Text,
    -- | An array of objects that describe the automatic snapshots that are
    -- available for the specified source instance or disk.
    GetAutoSnapshotsResponse -> Maybe [AutoSnapshotDetails]
autoSnapshots :: Prelude.Maybe [AutoSnapshotDetails],
    -- | The response's http status code.
    GetAutoSnapshotsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetAutoSnapshotsResponse -> GetAutoSnapshotsResponse -> Bool
(GetAutoSnapshotsResponse -> GetAutoSnapshotsResponse -> Bool)
-> (GetAutoSnapshotsResponse -> GetAutoSnapshotsResponse -> Bool)
-> Eq GetAutoSnapshotsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAutoSnapshotsResponse -> GetAutoSnapshotsResponse -> Bool
$c/= :: GetAutoSnapshotsResponse -> GetAutoSnapshotsResponse -> Bool
== :: GetAutoSnapshotsResponse -> GetAutoSnapshotsResponse -> Bool
$c== :: GetAutoSnapshotsResponse -> GetAutoSnapshotsResponse -> Bool
Prelude.Eq, ReadPrec [GetAutoSnapshotsResponse]
ReadPrec GetAutoSnapshotsResponse
Int -> ReadS GetAutoSnapshotsResponse
ReadS [GetAutoSnapshotsResponse]
(Int -> ReadS GetAutoSnapshotsResponse)
-> ReadS [GetAutoSnapshotsResponse]
-> ReadPrec GetAutoSnapshotsResponse
-> ReadPrec [GetAutoSnapshotsResponse]
-> Read GetAutoSnapshotsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAutoSnapshotsResponse]
$creadListPrec :: ReadPrec [GetAutoSnapshotsResponse]
readPrec :: ReadPrec GetAutoSnapshotsResponse
$creadPrec :: ReadPrec GetAutoSnapshotsResponse
readList :: ReadS [GetAutoSnapshotsResponse]
$creadList :: ReadS [GetAutoSnapshotsResponse]
readsPrec :: Int -> ReadS GetAutoSnapshotsResponse
$creadsPrec :: Int -> ReadS GetAutoSnapshotsResponse
Prelude.Read, Int -> GetAutoSnapshotsResponse -> ShowS
[GetAutoSnapshotsResponse] -> ShowS
GetAutoSnapshotsResponse -> String
(Int -> GetAutoSnapshotsResponse -> ShowS)
-> (GetAutoSnapshotsResponse -> String)
-> ([GetAutoSnapshotsResponse] -> ShowS)
-> Show GetAutoSnapshotsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAutoSnapshotsResponse] -> ShowS
$cshowList :: [GetAutoSnapshotsResponse] -> ShowS
show :: GetAutoSnapshotsResponse -> String
$cshow :: GetAutoSnapshotsResponse -> String
showsPrec :: Int -> GetAutoSnapshotsResponse -> ShowS
$cshowsPrec :: Int -> GetAutoSnapshotsResponse -> ShowS
Prelude.Show, (forall x.
 GetAutoSnapshotsResponse -> Rep GetAutoSnapshotsResponse x)
-> (forall x.
    Rep GetAutoSnapshotsResponse x -> GetAutoSnapshotsResponse)
-> Generic GetAutoSnapshotsResponse
forall x.
Rep GetAutoSnapshotsResponse x -> GetAutoSnapshotsResponse
forall x.
GetAutoSnapshotsResponse -> Rep GetAutoSnapshotsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAutoSnapshotsResponse x -> GetAutoSnapshotsResponse
$cfrom :: forall x.
GetAutoSnapshotsResponse -> Rep GetAutoSnapshotsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetAutoSnapshotsResponse' 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:
--
-- 'resourceType', 'getAutoSnapshotsResponse_resourceType' - The resource type (e.g., @Instance@ or @Disk@).
--
-- 'resourceName', 'getAutoSnapshotsResponse_resourceName' - The name of the source instance or disk for the automatic snapshots.
--
-- 'autoSnapshots', 'getAutoSnapshotsResponse_autoSnapshots' - An array of objects that describe the automatic snapshots that are
-- available for the specified source instance or disk.
--
-- 'httpStatus', 'getAutoSnapshotsResponse_httpStatus' - The response's http status code.
newGetAutoSnapshotsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetAutoSnapshotsResponse
newGetAutoSnapshotsResponse :: Int -> GetAutoSnapshotsResponse
newGetAutoSnapshotsResponse Int
pHttpStatus_ =
  GetAutoSnapshotsResponse' :: Maybe ResourceType
-> Maybe Text
-> Maybe [AutoSnapshotDetails]
-> Int
-> GetAutoSnapshotsResponse
GetAutoSnapshotsResponse'
    { $sel:resourceType:GetAutoSnapshotsResponse' :: Maybe ResourceType
resourceType =
        Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceName:GetAutoSnapshotsResponse' :: Maybe Text
resourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoSnapshots:GetAutoSnapshotsResponse' :: Maybe [AutoSnapshotDetails]
autoSnapshots = Maybe [AutoSnapshotDetails]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetAutoSnapshotsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The resource type (e.g., @Instance@ or @Disk@).
getAutoSnapshotsResponse_resourceType :: Lens.Lens' GetAutoSnapshotsResponse (Prelude.Maybe ResourceType)
getAutoSnapshotsResponse_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> GetAutoSnapshotsResponse -> f GetAutoSnapshotsResponse
getAutoSnapshotsResponse_resourceType = (GetAutoSnapshotsResponse -> Maybe ResourceType)
-> (GetAutoSnapshotsResponse
    -> Maybe ResourceType -> GetAutoSnapshotsResponse)
-> Lens
     GetAutoSnapshotsResponse
     GetAutoSnapshotsResponse
     (Maybe ResourceType)
     (Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAutoSnapshotsResponse' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:GetAutoSnapshotsResponse' :: GetAutoSnapshotsResponse -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: GetAutoSnapshotsResponse
s@GetAutoSnapshotsResponse' {} Maybe ResourceType
a -> GetAutoSnapshotsResponse
s {$sel:resourceType:GetAutoSnapshotsResponse' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: GetAutoSnapshotsResponse)

-- | The name of the source instance or disk for the automatic snapshots.
getAutoSnapshotsResponse_resourceName :: Lens.Lens' GetAutoSnapshotsResponse (Prelude.Maybe Prelude.Text)
getAutoSnapshotsResponse_resourceName :: (Maybe Text -> f (Maybe Text))
-> GetAutoSnapshotsResponse -> f GetAutoSnapshotsResponse
getAutoSnapshotsResponse_resourceName = (GetAutoSnapshotsResponse -> Maybe Text)
-> (GetAutoSnapshotsResponse
    -> Maybe Text -> GetAutoSnapshotsResponse)
-> Lens
     GetAutoSnapshotsResponse
     GetAutoSnapshotsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAutoSnapshotsResponse' {Maybe Text
resourceName :: Maybe Text
$sel:resourceName:GetAutoSnapshotsResponse' :: GetAutoSnapshotsResponse -> Maybe Text
resourceName} -> Maybe Text
resourceName) (\s :: GetAutoSnapshotsResponse
s@GetAutoSnapshotsResponse' {} Maybe Text
a -> GetAutoSnapshotsResponse
s {$sel:resourceName:GetAutoSnapshotsResponse' :: Maybe Text
resourceName = Maybe Text
a} :: GetAutoSnapshotsResponse)

-- | An array of objects that describe the automatic snapshots that are
-- available for the specified source instance or disk.
getAutoSnapshotsResponse_autoSnapshots :: Lens.Lens' GetAutoSnapshotsResponse (Prelude.Maybe [AutoSnapshotDetails])
getAutoSnapshotsResponse_autoSnapshots :: (Maybe [AutoSnapshotDetails] -> f (Maybe [AutoSnapshotDetails]))
-> GetAutoSnapshotsResponse -> f GetAutoSnapshotsResponse
getAutoSnapshotsResponse_autoSnapshots = (GetAutoSnapshotsResponse -> Maybe [AutoSnapshotDetails])
-> (GetAutoSnapshotsResponse
    -> Maybe [AutoSnapshotDetails] -> GetAutoSnapshotsResponse)
-> Lens
     GetAutoSnapshotsResponse
     GetAutoSnapshotsResponse
     (Maybe [AutoSnapshotDetails])
     (Maybe [AutoSnapshotDetails])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAutoSnapshotsResponse' {Maybe [AutoSnapshotDetails]
autoSnapshots :: Maybe [AutoSnapshotDetails]
$sel:autoSnapshots:GetAutoSnapshotsResponse' :: GetAutoSnapshotsResponse -> Maybe [AutoSnapshotDetails]
autoSnapshots} -> Maybe [AutoSnapshotDetails]
autoSnapshots) (\s :: GetAutoSnapshotsResponse
s@GetAutoSnapshotsResponse' {} Maybe [AutoSnapshotDetails]
a -> GetAutoSnapshotsResponse
s {$sel:autoSnapshots:GetAutoSnapshotsResponse' :: Maybe [AutoSnapshotDetails]
autoSnapshots = Maybe [AutoSnapshotDetails]
a} :: GetAutoSnapshotsResponse) ((Maybe [AutoSnapshotDetails] -> f (Maybe [AutoSnapshotDetails]))
 -> GetAutoSnapshotsResponse -> f GetAutoSnapshotsResponse)
-> ((Maybe [AutoSnapshotDetails]
     -> f (Maybe [AutoSnapshotDetails]))
    -> Maybe [AutoSnapshotDetails] -> f (Maybe [AutoSnapshotDetails]))
-> (Maybe [AutoSnapshotDetails] -> f (Maybe [AutoSnapshotDetails]))
-> GetAutoSnapshotsResponse
-> f GetAutoSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AutoSnapshotDetails]
  [AutoSnapshotDetails]
  [AutoSnapshotDetails]
  [AutoSnapshotDetails]
-> Iso
     (Maybe [AutoSnapshotDetails])
     (Maybe [AutoSnapshotDetails])
     (Maybe [AutoSnapshotDetails])
     (Maybe [AutoSnapshotDetails])
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
  [AutoSnapshotDetails]
  [AutoSnapshotDetails]
  [AutoSnapshotDetails]
  [AutoSnapshotDetails]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
getAutoSnapshotsResponse_httpStatus :: Lens.Lens' GetAutoSnapshotsResponse Prelude.Int
getAutoSnapshotsResponse_httpStatus :: (Int -> f Int)
-> GetAutoSnapshotsResponse -> f GetAutoSnapshotsResponse
getAutoSnapshotsResponse_httpStatus = (GetAutoSnapshotsResponse -> Int)
-> (GetAutoSnapshotsResponse -> Int -> GetAutoSnapshotsResponse)
-> Lens GetAutoSnapshotsResponse GetAutoSnapshotsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAutoSnapshotsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetAutoSnapshotsResponse' :: GetAutoSnapshotsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetAutoSnapshotsResponse
s@GetAutoSnapshotsResponse' {} Int
a -> GetAutoSnapshotsResponse
s {$sel:httpStatus:GetAutoSnapshotsResponse' :: Int
httpStatus = Int
a} :: GetAutoSnapshotsResponse)

instance Prelude.NFData GetAutoSnapshotsResponse