{-# 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.StorageGateway.DescribeSnapshotSchedule
-- 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)
--
-- Describes the snapshot schedule for the specified gateway volume. The
-- snapshot schedule information includes intervals at which snapshots are
-- automatically initiated on the volume. This operation is only supported
-- in the cached volume and stored volume types.
module Amazonka.StorageGateway.DescribeSnapshotSchedule
  ( -- * Creating a Request
    DescribeSnapshotSchedule (..),
    newDescribeSnapshotSchedule,

    -- * Request Lenses
    describeSnapshotSchedule_volumeARN,

    -- * Destructuring the Response
    DescribeSnapshotScheduleResponse (..),
    newDescribeSnapshotScheduleResponse,

    -- * Response Lenses
    describeSnapshotScheduleResponse_startAt,
    describeSnapshotScheduleResponse_volumeARN,
    describeSnapshotScheduleResponse_recurrenceInHours,
    describeSnapshotScheduleResponse_timezone,
    describeSnapshotScheduleResponse_description,
    describeSnapshotScheduleResponse_tags,
    describeSnapshotScheduleResponse_httpStatus,
  )
where

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

-- | A JSON object containing the DescribeSnapshotScheduleInput$VolumeARN of
-- the volume.
--
-- /See:/ 'newDescribeSnapshotSchedule' smart constructor.
data DescribeSnapshotSchedule = DescribeSnapshotSchedule'
  { -- | The Amazon Resource Name (ARN) of the volume. Use the ListVolumes
    -- operation to return a list of gateway volumes.
    DescribeSnapshotSchedule -> Text
volumeARN :: Prelude.Text
  }
  deriving (DescribeSnapshotSchedule -> DescribeSnapshotSchedule -> Bool
(DescribeSnapshotSchedule -> DescribeSnapshotSchedule -> Bool)
-> (DescribeSnapshotSchedule -> DescribeSnapshotSchedule -> Bool)
-> Eq DescribeSnapshotSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSnapshotSchedule -> DescribeSnapshotSchedule -> Bool
$c/= :: DescribeSnapshotSchedule -> DescribeSnapshotSchedule -> Bool
== :: DescribeSnapshotSchedule -> DescribeSnapshotSchedule -> Bool
$c== :: DescribeSnapshotSchedule -> DescribeSnapshotSchedule -> Bool
Prelude.Eq, ReadPrec [DescribeSnapshotSchedule]
ReadPrec DescribeSnapshotSchedule
Int -> ReadS DescribeSnapshotSchedule
ReadS [DescribeSnapshotSchedule]
(Int -> ReadS DescribeSnapshotSchedule)
-> ReadS [DescribeSnapshotSchedule]
-> ReadPrec DescribeSnapshotSchedule
-> ReadPrec [DescribeSnapshotSchedule]
-> Read DescribeSnapshotSchedule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSnapshotSchedule]
$creadListPrec :: ReadPrec [DescribeSnapshotSchedule]
readPrec :: ReadPrec DescribeSnapshotSchedule
$creadPrec :: ReadPrec DescribeSnapshotSchedule
readList :: ReadS [DescribeSnapshotSchedule]
$creadList :: ReadS [DescribeSnapshotSchedule]
readsPrec :: Int -> ReadS DescribeSnapshotSchedule
$creadsPrec :: Int -> ReadS DescribeSnapshotSchedule
Prelude.Read, Int -> DescribeSnapshotSchedule -> ShowS
[DescribeSnapshotSchedule] -> ShowS
DescribeSnapshotSchedule -> String
(Int -> DescribeSnapshotSchedule -> ShowS)
-> (DescribeSnapshotSchedule -> String)
-> ([DescribeSnapshotSchedule] -> ShowS)
-> Show DescribeSnapshotSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSnapshotSchedule] -> ShowS
$cshowList :: [DescribeSnapshotSchedule] -> ShowS
show :: DescribeSnapshotSchedule -> String
$cshow :: DescribeSnapshotSchedule -> String
showsPrec :: Int -> DescribeSnapshotSchedule -> ShowS
$cshowsPrec :: Int -> DescribeSnapshotSchedule -> ShowS
Prelude.Show, (forall x.
 DescribeSnapshotSchedule -> Rep DescribeSnapshotSchedule x)
-> (forall x.
    Rep DescribeSnapshotSchedule x -> DescribeSnapshotSchedule)
-> Generic DescribeSnapshotSchedule
forall x.
Rep DescribeSnapshotSchedule x -> DescribeSnapshotSchedule
forall x.
DescribeSnapshotSchedule -> Rep DescribeSnapshotSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSnapshotSchedule x -> DescribeSnapshotSchedule
$cfrom :: forall x.
DescribeSnapshotSchedule -> Rep DescribeSnapshotSchedule x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSnapshotSchedule' 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:
--
-- 'volumeARN', 'describeSnapshotSchedule_volumeARN' - The Amazon Resource Name (ARN) of the volume. Use the ListVolumes
-- operation to return a list of gateway volumes.
newDescribeSnapshotSchedule ::
  -- | 'volumeARN'
  Prelude.Text ->
  DescribeSnapshotSchedule
newDescribeSnapshotSchedule :: Text -> DescribeSnapshotSchedule
newDescribeSnapshotSchedule Text
pVolumeARN_ =
  DescribeSnapshotSchedule' :: Text -> DescribeSnapshotSchedule
DescribeSnapshotSchedule' {$sel:volumeARN:DescribeSnapshotSchedule' :: Text
volumeARN = Text
pVolumeARN_}

-- | The Amazon Resource Name (ARN) of the volume. Use the ListVolumes
-- operation to return a list of gateway volumes.
describeSnapshotSchedule_volumeARN :: Lens.Lens' DescribeSnapshotSchedule Prelude.Text
describeSnapshotSchedule_volumeARN :: (Text -> f Text)
-> DescribeSnapshotSchedule -> f DescribeSnapshotSchedule
describeSnapshotSchedule_volumeARN = (DescribeSnapshotSchedule -> Text)
-> (DescribeSnapshotSchedule -> Text -> DescribeSnapshotSchedule)
-> Lens DescribeSnapshotSchedule DescribeSnapshotSchedule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotSchedule' {Text
volumeARN :: Text
$sel:volumeARN:DescribeSnapshotSchedule' :: DescribeSnapshotSchedule -> Text
volumeARN} -> Text
volumeARN) (\s :: DescribeSnapshotSchedule
s@DescribeSnapshotSchedule' {} Text
a -> DescribeSnapshotSchedule
s {$sel:volumeARN:DescribeSnapshotSchedule' :: Text
volumeARN = Text
a} :: DescribeSnapshotSchedule)

instance Core.AWSRequest DescribeSnapshotSchedule where
  type
    AWSResponse DescribeSnapshotSchedule =
      DescribeSnapshotScheduleResponse
  request :: DescribeSnapshotSchedule -> Request DescribeSnapshotSchedule
request = Service
-> DescribeSnapshotSchedule -> Request DescribeSnapshotSchedule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeSnapshotSchedule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSnapshotSchedule)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeSnapshotSchedule))
-> Logger
-> Service
-> Proxy DescribeSnapshotSchedule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSnapshotSchedule)))
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 Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Int
-> DescribeSnapshotScheduleResponse
DescribeSnapshotScheduleResponse'
            (Maybe Natural
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Tag]
 -> Int
 -> DescribeSnapshotScheduleResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSnapshotScheduleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StartAt")
            Either
  String
  (Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSnapshotScheduleResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSnapshotScheduleResponse)
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
"VolumeARN")
            Either
  String
  (Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSnapshotScheduleResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSnapshotScheduleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RecurrenceInHours")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSnapshotScheduleResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [Tag] -> Int -> DescribeSnapshotScheduleResponse)
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
"Timezone")
            Either
  String
  (Maybe Text
   -> Maybe [Tag] -> Int -> DescribeSnapshotScheduleResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [Tag] -> Int -> DescribeSnapshotScheduleResponse)
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
"Description")
            Either
  String (Maybe [Tag] -> Int -> DescribeSnapshotScheduleResponse)
-> Either String (Maybe [Tag])
-> Either String (Int -> DescribeSnapshotScheduleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe [Tag]))
-> Maybe [Tag] -> Either String (Maybe [Tag])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeSnapshotScheduleResponse)
-> Either String Int
-> Either String DescribeSnapshotScheduleResponse
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 DescribeSnapshotSchedule

instance Prelude.NFData DescribeSnapshotSchedule

instance Core.ToHeaders DescribeSnapshotSchedule where
  toHeaders :: DescribeSnapshotSchedule -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeSnapshotSchedule -> 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
"StorageGateway_20130630.DescribeSnapshotSchedule" ::
                          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 DescribeSnapshotSchedule where
  toJSON :: DescribeSnapshotSchedule -> Value
toJSON DescribeSnapshotSchedule' {Text
volumeARN :: Text
$sel:volumeARN:DescribeSnapshotSchedule' :: DescribeSnapshotSchedule -> 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
"VolumeARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
volumeARN)]
      )

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

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

-- | /See:/ 'newDescribeSnapshotScheduleResponse' smart constructor.
data DescribeSnapshotScheduleResponse = DescribeSnapshotScheduleResponse'
  { -- | The hour of the day at which the snapshot schedule begins represented as
    -- /hh/, where /hh/ is the hour (0 to 23). The hour of the day is in the
    -- time zone of the gateway.
    DescribeSnapshotScheduleResponse -> Maybe Natural
startAt :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name (ARN) of the volume that was specified in the
    -- request.
    DescribeSnapshotScheduleResponse -> Maybe Text
volumeARN :: Prelude.Maybe Prelude.Text,
    -- | The number of hours between snapshots.
    DescribeSnapshotScheduleResponse -> Maybe Natural
recurrenceInHours :: Prelude.Maybe Prelude.Natural,
    -- | A value that indicates the time zone of the gateway.
    DescribeSnapshotScheduleResponse -> Maybe Text
timezone :: Prelude.Maybe Prelude.Text,
    -- | The snapshot description.
    DescribeSnapshotScheduleResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A list of up to 50 tags assigned to the snapshot schedule, sorted
    -- alphabetically by key name. Each tag is a key-value pair. For a gateway
    -- with more than 10 tags assigned, you can view all tags using the
    -- @ListTagsForResource@ API operation.
    DescribeSnapshotScheduleResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The response's http status code.
    DescribeSnapshotScheduleResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeSnapshotScheduleResponse
-> DescribeSnapshotScheduleResponse -> Bool
(DescribeSnapshotScheduleResponse
 -> DescribeSnapshotScheduleResponse -> Bool)
-> (DescribeSnapshotScheduleResponse
    -> DescribeSnapshotScheduleResponse -> Bool)
-> Eq DescribeSnapshotScheduleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSnapshotScheduleResponse
-> DescribeSnapshotScheduleResponse -> Bool
$c/= :: DescribeSnapshotScheduleResponse
-> DescribeSnapshotScheduleResponse -> Bool
== :: DescribeSnapshotScheduleResponse
-> DescribeSnapshotScheduleResponse -> Bool
$c== :: DescribeSnapshotScheduleResponse
-> DescribeSnapshotScheduleResponse -> Bool
Prelude.Eq, ReadPrec [DescribeSnapshotScheduleResponse]
ReadPrec DescribeSnapshotScheduleResponse
Int -> ReadS DescribeSnapshotScheduleResponse
ReadS [DescribeSnapshotScheduleResponse]
(Int -> ReadS DescribeSnapshotScheduleResponse)
-> ReadS [DescribeSnapshotScheduleResponse]
-> ReadPrec DescribeSnapshotScheduleResponse
-> ReadPrec [DescribeSnapshotScheduleResponse]
-> Read DescribeSnapshotScheduleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSnapshotScheduleResponse]
$creadListPrec :: ReadPrec [DescribeSnapshotScheduleResponse]
readPrec :: ReadPrec DescribeSnapshotScheduleResponse
$creadPrec :: ReadPrec DescribeSnapshotScheduleResponse
readList :: ReadS [DescribeSnapshotScheduleResponse]
$creadList :: ReadS [DescribeSnapshotScheduleResponse]
readsPrec :: Int -> ReadS DescribeSnapshotScheduleResponse
$creadsPrec :: Int -> ReadS DescribeSnapshotScheduleResponse
Prelude.Read, Int -> DescribeSnapshotScheduleResponse -> ShowS
[DescribeSnapshotScheduleResponse] -> ShowS
DescribeSnapshotScheduleResponse -> String
(Int -> DescribeSnapshotScheduleResponse -> ShowS)
-> (DescribeSnapshotScheduleResponse -> String)
-> ([DescribeSnapshotScheduleResponse] -> ShowS)
-> Show DescribeSnapshotScheduleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSnapshotScheduleResponse] -> ShowS
$cshowList :: [DescribeSnapshotScheduleResponse] -> ShowS
show :: DescribeSnapshotScheduleResponse -> String
$cshow :: DescribeSnapshotScheduleResponse -> String
showsPrec :: Int -> DescribeSnapshotScheduleResponse -> ShowS
$cshowsPrec :: Int -> DescribeSnapshotScheduleResponse -> ShowS
Prelude.Show, (forall x.
 DescribeSnapshotScheduleResponse
 -> Rep DescribeSnapshotScheduleResponse x)
-> (forall x.
    Rep DescribeSnapshotScheduleResponse x
    -> DescribeSnapshotScheduleResponse)
-> Generic DescribeSnapshotScheduleResponse
forall x.
Rep DescribeSnapshotScheduleResponse x
-> DescribeSnapshotScheduleResponse
forall x.
DescribeSnapshotScheduleResponse
-> Rep DescribeSnapshotScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSnapshotScheduleResponse x
-> DescribeSnapshotScheduleResponse
$cfrom :: forall x.
DescribeSnapshotScheduleResponse
-> Rep DescribeSnapshotScheduleResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSnapshotScheduleResponse' 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:
--
-- 'startAt', 'describeSnapshotScheduleResponse_startAt' - The hour of the day at which the snapshot schedule begins represented as
-- /hh/, where /hh/ is the hour (0 to 23). The hour of the day is in the
-- time zone of the gateway.
--
-- 'volumeARN', 'describeSnapshotScheduleResponse_volumeARN' - The Amazon Resource Name (ARN) of the volume that was specified in the
-- request.
--
-- 'recurrenceInHours', 'describeSnapshotScheduleResponse_recurrenceInHours' - The number of hours between snapshots.
--
-- 'timezone', 'describeSnapshotScheduleResponse_timezone' - A value that indicates the time zone of the gateway.
--
-- 'description', 'describeSnapshotScheduleResponse_description' - The snapshot description.
--
-- 'tags', 'describeSnapshotScheduleResponse_tags' - A list of up to 50 tags assigned to the snapshot schedule, sorted
-- alphabetically by key name. Each tag is a key-value pair. For a gateway
-- with more than 10 tags assigned, you can view all tags using the
-- @ListTagsForResource@ API operation.
--
-- 'httpStatus', 'describeSnapshotScheduleResponse_httpStatus' - The response's http status code.
newDescribeSnapshotScheduleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeSnapshotScheduleResponse
newDescribeSnapshotScheduleResponse :: Int -> DescribeSnapshotScheduleResponse
newDescribeSnapshotScheduleResponse Int
pHttpStatus_ =
  DescribeSnapshotScheduleResponse' :: Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Int
-> DescribeSnapshotScheduleResponse
DescribeSnapshotScheduleResponse'
    { $sel:startAt:DescribeSnapshotScheduleResponse' :: Maybe Natural
startAt =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:volumeARN:DescribeSnapshotScheduleResponse' :: Maybe Text
volumeARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:recurrenceInHours:DescribeSnapshotScheduleResponse' :: Maybe Natural
recurrenceInHours = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:timezone:DescribeSnapshotScheduleResponse' :: Maybe Text
timezone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeSnapshotScheduleResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeSnapshotScheduleResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeSnapshotScheduleResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The hour of the day at which the snapshot schedule begins represented as
-- /hh/, where /hh/ is the hour (0 to 23). The hour of the day is in the
-- time zone of the gateway.
describeSnapshotScheduleResponse_startAt :: Lens.Lens' DescribeSnapshotScheduleResponse (Prelude.Maybe Prelude.Natural)
describeSnapshotScheduleResponse_startAt :: (Maybe Natural -> f (Maybe Natural))
-> DescribeSnapshotScheduleResponse
-> f DescribeSnapshotScheduleResponse
describeSnapshotScheduleResponse_startAt = (DescribeSnapshotScheduleResponse -> Maybe Natural)
-> (DescribeSnapshotScheduleResponse
    -> Maybe Natural -> DescribeSnapshotScheduleResponse)
-> Lens
     DescribeSnapshotScheduleResponse
     DescribeSnapshotScheduleResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotScheduleResponse' {Maybe Natural
startAt :: Maybe Natural
$sel:startAt:DescribeSnapshotScheduleResponse' :: DescribeSnapshotScheduleResponse -> Maybe Natural
startAt} -> Maybe Natural
startAt) (\s :: DescribeSnapshotScheduleResponse
s@DescribeSnapshotScheduleResponse' {} Maybe Natural
a -> DescribeSnapshotScheduleResponse
s {$sel:startAt:DescribeSnapshotScheduleResponse' :: Maybe Natural
startAt = Maybe Natural
a} :: DescribeSnapshotScheduleResponse)

-- | The Amazon Resource Name (ARN) of the volume that was specified in the
-- request.
describeSnapshotScheduleResponse_volumeARN :: Lens.Lens' DescribeSnapshotScheduleResponse (Prelude.Maybe Prelude.Text)
describeSnapshotScheduleResponse_volumeARN :: (Maybe Text -> f (Maybe Text))
-> DescribeSnapshotScheduleResponse
-> f DescribeSnapshotScheduleResponse
describeSnapshotScheduleResponse_volumeARN = (DescribeSnapshotScheduleResponse -> Maybe Text)
-> (DescribeSnapshotScheduleResponse
    -> Maybe Text -> DescribeSnapshotScheduleResponse)
-> Lens
     DescribeSnapshotScheduleResponse
     DescribeSnapshotScheduleResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotScheduleResponse' {Maybe Text
volumeARN :: Maybe Text
$sel:volumeARN:DescribeSnapshotScheduleResponse' :: DescribeSnapshotScheduleResponse -> Maybe Text
volumeARN} -> Maybe Text
volumeARN) (\s :: DescribeSnapshotScheduleResponse
s@DescribeSnapshotScheduleResponse' {} Maybe Text
a -> DescribeSnapshotScheduleResponse
s {$sel:volumeARN:DescribeSnapshotScheduleResponse' :: Maybe Text
volumeARN = Maybe Text
a} :: DescribeSnapshotScheduleResponse)

-- | The number of hours between snapshots.
describeSnapshotScheduleResponse_recurrenceInHours :: Lens.Lens' DescribeSnapshotScheduleResponse (Prelude.Maybe Prelude.Natural)
describeSnapshotScheduleResponse_recurrenceInHours :: (Maybe Natural -> f (Maybe Natural))
-> DescribeSnapshotScheduleResponse
-> f DescribeSnapshotScheduleResponse
describeSnapshotScheduleResponse_recurrenceInHours = (DescribeSnapshotScheduleResponse -> Maybe Natural)
-> (DescribeSnapshotScheduleResponse
    -> Maybe Natural -> DescribeSnapshotScheduleResponse)
-> Lens
     DescribeSnapshotScheduleResponse
     DescribeSnapshotScheduleResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotScheduleResponse' {Maybe Natural
recurrenceInHours :: Maybe Natural
$sel:recurrenceInHours:DescribeSnapshotScheduleResponse' :: DescribeSnapshotScheduleResponse -> Maybe Natural
recurrenceInHours} -> Maybe Natural
recurrenceInHours) (\s :: DescribeSnapshotScheduleResponse
s@DescribeSnapshotScheduleResponse' {} Maybe Natural
a -> DescribeSnapshotScheduleResponse
s {$sel:recurrenceInHours:DescribeSnapshotScheduleResponse' :: Maybe Natural
recurrenceInHours = Maybe Natural
a} :: DescribeSnapshotScheduleResponse)

-- | A value that indicates the time zone of the gateway.
describeSnapshotScheduleResponse_timezone :: Lens.Lens' DescribeSnapshotScheduleResponse (Prelude.Maybe Prelude.Text)
describeSnapshotScheduleResponse_timezone :: (Maybe Text -> f (Maybe Text))
-> DescribeSnapshotScheduleResponse
-> f DescribeSnapshotScheduleResponse
describeSnapshotScheduleResponse_timezone = (DescribeSnapshotScheduleResponse -> Maybe Text)
-> (DescribeSnapshotScheduleResponse
    -> Maybe Text -> DescribeSnapshotScheduleResponse)
-> Lens
     DescribeSnapshotScheduleResponse
     DescribeSnapshotScheduleResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotScheduleResponse' {Maybe Text
timezone :: Maybe Text
$sel:timezone:DescribeSnapshotScheduleResponse' :: DescribeSnapshotScheduleResponse -> Maybe Text
timezone} -> Maybe Text
timezone) (\s :: DescribeSnapshotScheduleResponse
s@DescribeSnapshotScheduleResponse' {} Maybe Text
a -> DescribeSnapshotScheduleResponse
s {$sel:timezone:DescribeSnapshotScheduleResponse' :: Maybe Text
timezone = Maybe Text
a} :: DescribeSnapshotScheduleResponse)

-- | The snapshot description.
describeSnapshotScheduleResponse_description :: Lens.Lens' DescribeSnapshotScheduleResponse (Prelude.Maybe Prelude.Text)
describeSnapshotScheduleResponse_description :: (Maybe Text -> f (Maybe Text))
-> DescribeSnapshotScheduleResponse
-> f DescribeSnapshotScheduleResponse
describeSnapshotScheduleResponse_description = (DescribeSnapshotScheduleResponse -> Maybe Text)
-> (DescribeSnapshotScheduleResponse
    -> Maybe Text -> DescribeSnapshotScheduleResponse)
-> Lens
     DescribeSnapshotScheduleResponse
     DescribeSnapshotScheduleResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotScheduleResponse' {Maybe Text
description :: Maybe Text
$sel:description:DescribeSnapshotScheduleResponse' :: DescribeSnapshotScheduleResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: DescribeSnapshotScheduleResponse
s@DescribeSnapshotScheduleResponse' {} Maybe Text
a -> DescribeSnapshotScheduleResponse
s {$sel:description:DescribeSnapshotScheduleResponse' :: Maybe Text
description = Maybe Text
a} :: DescribeSnapshotScheduleResponse)

-- | A list of up to 50 tags assigned to the snapshot schedule, sorted
-- alphabetically by key name. Each tag is a key-value pair. For a gateway
-- with more than 10 tags assigned, you can view all tags using the
-- @ListTagsForResource@ API operation.
describeSnapshotScheduleResponse_tags :: Lens.Lens' DescribeSnapshotScheduleResponse (Prelude.Maybe [Tag])
describeSnapshotScheduleResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> DescribeSnapshotScheduleResponse
-> f DescribeSnapshotScheduleResponse
describeSnapshotScheduleResponse_tags = (DescribeSnapshotScheduleResponse -> Maybe [Tag])
-> (DescribeSnapshotScheduleResponse
    -> Maybe [Tag] -> DescribeSnapshotScheduleResponse)
-> Lens
     DescribeSnapshotScheduleResponse
     DescribeSnapshotScheduleResponse
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotScheduleResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:DescribeSnapshotScheduleResponse' :: DescribeSnapshotScheduleResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: DescribeSnapshotScheduleResponse
s@DescribeSnapshotScheduleResponse' {} Maybe [Tag]
a -> DescribeSnapshotScheduleResponse
s {$sel:tags:DescribeSnapshotScheduleResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: DescribeSnapshotScheduleResponse) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> DescribeSnapshotScheduleResponse
 -> f DescribeSnapshotScheduleResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> DescribeSnapshotScheduleResponse
-> f DescribeSnapshotScheduleResponse
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

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

instance
  Prelude.NFData
    DescribeSnapshotScheduleResponse