{-# 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.UpdateMaintenanceStartTime
-- 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)
--
-- Updates a gateway\'s weekly maintenance start time information,
-- including day and time of the week. The maintenance time is the time in
-- your gateway\'s time zone.
module Amazonka.StorageGateway.UpdateMaintenanceStartTime
  ( -- * Creating a Request
    UpdateMaintenanceStartTime (..),
    newUpdateMaintenanceStartTime,

    -- * Request Lenses
    updateMaintenanceStartTime_dayOfMonth,
    updateMaintenanceStartTime_dayOfWeek,
    updateMaintenanceStartTime_gatewayARN,
    updateMaintenanceStartTime_hourOfDay,
    updateMaintenanceStartTime_minuteOfHour,

    -- * Destructuring the Response
    UpdateMaintenanceStartTimeResponse (..),
    newUpdateMaintenanceStartTimeResponse,

    -- * Response Lenses
    updateMaintenanceStartTimeResponse_gatewayARN,
    updateMaintenanceStartTimeResponse_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 following fields:
--
-- -   UpdateMaintenanceStartTimeInput$DayOfMonth
--
-- -   UpdateMaintenanceStartTimeInput$DayOfWeek
--
-- -   UpdateMaintenanceStartTimeInput$HourOfDay
--
-- -   UpdateMaintenanceStartTimeInput$MinuteOfHour
--
-- /See:/ 'newUpdateMaintenanceStartTime' smart constructor.
data UpdateMaintenanceStartTime = UpdateMaintenanceStartTime'
  { -- | The day of the month component of the maintenance start time represented
    -- as an ordinal number from 1 to 28, where 1 represents the first day of
    -- the month and 28 represents the last day of the month.
    UpdateMaintenanceStartTime -> Maybe Natural
dayOfMonth :: Prelude.Maybe Prelude.Natural,
    -- | The day of the week component of the maintenance start time week
    -- represented as an ordinal number from 0 to 6, where 0 represents Sunday
    -- and 6 Saturday.
    UpdateMaintenanceStartTime -> Maybe Natural
dayOfWeek :: Prelude.Maybe Prelude.Natural,
    UpdateMaintenanceStartTime -> Text
gatewayARN :: Prelude.Text,
    -- | The hour component of the maintenance start time represented as /hh/,
    -- where /hh/ is the hour (00 to 23). The hour of the day is in the time
    -- zone of the gateway.
    UpdateMaintenanceStartTime -> Natural
hourOfDay :: Prelude.Natural,
    -- | The minute component of the maintenance start time represented as /mm/,
    -- where /mm/ is the minute (00 to 59). The minute of the hour is in the
    -- time zone of the gateway.
    UpdateMaintenanceStartTime -> Natural
minuteOfHour :: Prelude.Natural
  }
  deriving (UpdateMaintenanceStartTime -> UpdateMaintenanceStartTime -> Bool
(UpdateMaintenanceStartTime -> UpdateMaintenanceStartTime -> Bool)
-> (UpdateMaintenanceStartTime
    -> UpdateMaintenanceStartTime -> Bool)
-> Eq UpdateMaintenanceStartTime
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMaintenanceStartTime -> UpdateMaintenanceStartTime -> Bool
$c/= :: UpdateMaintenanceStartTime -> UpdateMaintenanceStartTime -> Bool
== :: UpdateMaintenanceStartTime -> UpdateMaintenanceStartTime -> Bool
$c== :: UpdateMaintenanceStartTime -> UpdateMaintenanceStartTime -> Bool
Prelude.Eq, ReadPrec [UpdateMaintenanceStartTime]
ReadPrec UpdateMaintenanceStartTime
Int -> ReadS UpdateMaintenanceStartTime
ReadS [UpdateMaintenanceStartTime]
(Int -> ReadS UpdateMaintenanceStartTime)
-> ReadS [UpdateMaintenanceStartTime]
-> ReadPrec UpdateMaintenanceStartTime
-> ReadPrec [UpdateMaintenanceStartTime]
-> Read UpdateMaintenanceStartTime
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateMaintenanceStartTime]
$creadListPrec :: ReadPrec [UpdateMaintenanceStartTime]
readPrec :: ReadPrec UpdateMaintenanceStartTime
$creadPrec :: ReadPrec UpdateMaintenanceStartTime
readList :: ReadS [UpdateMaintenanceStartTime]
$creadList :: ReadS [UpdateMaintenanceStartTime]
readsPrec :: Int -> ReadS UpdateMaintenanceStartTime
$creadsPrec :: Int -> ReadS UpdateMaintenanceStartTime
Prelude.Read, Int -> UpdateMaintenanceStartTime -> ShowS
[UpdateMaintenanceStartTime] -> ShowS
UpdateMaintenanceStartTime -> String
(Int -> UpdateMaintenanceStartTime -> ShowS)
-> (UpdateMaintenanceStartTime -> String)
-> ([UpdateMaintenanceStartTime] -> ShowS)
-> Show UpdateMaintenanceStartTime
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMaintenanceStartTime] -> ShowS
$cshowList :: [UpdateMaintenanceStartTime] -> ShowS
show :: UpdateMaintenanceStartTime -> String
$cshow :: UpdateMaintenanceStartTime -> String
showsPrec :: Int -> UpdateMaintenanceStartTime -> ShowS
$cshowsPrec :: Int -> UpdateMaintenanceStartTime -> ShowS
Prelude.Show, (forall x.
 UpdateMaintenanceStartTime -> Rep UpdateMaintenanceStartTime x)
-> (forall x.
    Rep UpdateMaintenanceStartTime x -> UpdateMaintenanceStartTime)
-> Generic UpdateMaintenanceStartTime
forall x.
Rep UpdateMaintenanceStartTime x -> UpdateMaintenanceStartTime
forall x.
UpdateMaintenanceStartTime -> Rep UpdateMaintenanceStartTime x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateMaintenanceStartTime x -> UpdateMaintenanceStartTime
$cfrom :: forall x.
UpdateMaintenanceStartTime -> Rep UpdateMaintenanceStartTime x
Prelude.Generic)

-- |
-- Create a value of 'UpdateMaintenanceStartTime' 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:
--
-- 'dayOfMonth', 'updateMaintenanceStartTime_dayOfMonth' - The day of the month component of the maintenance start time represented
-- as an ordinal number from 1 to 28, where 1 represents the first day of
-- the month and 28 represents the last day of the month.
--
-- 'dayOfWeek', 'updateMaintenanceStartTime_dayOfWeek' - The day of the week component of the maintenance start time week
-- represented as an ordinal number from 0 to 6, where 0 represents Sunday
-- and 6 Saturday.
--
-- 'gatewayARN', 'updateMaintenanceStartTime_gatewayARN' - Undocumented member.
--
-- 'hourOfDay', 'updateMaintenanceStartTime_hourOfDay' - The hour component of the maintenance start time represented as /hh/,
-- where /hh/ is the hour (00 to 23). The hour of the day is in the time
-- zone of the gateway.
--
-- 'minuteOfHour', 'updateMaintenanceStartTime_minuteOfHour' - The minute component of the maintenance start time represented as /mm/,
-- where /mm/ is the minute (00 to 59). The minute of the hour is in the
-- time zone of the gateway.
newUpdateMaintenanceStartTime ::
  -- | 'gatewayARN'
  Prelude.Text ->
  -- | 'hourOfDay'
  Prelude.Natural ->
  -- | 'minuteOfHour'
  Prelude.Natural ->
  UpdateMaintenanceStartTime
newUpdateMaintenanceStartTime :: Text -> Natural -> Natural -> UpdateMaintenanceStartTime
newUpdateMaintenanceStartTime
  Text
pGatewayARN_
  Natural
pHourOfDay_
  Natural
pMinuteOfHour_ =
    UpdateMaintenanceStartTime' :: Maybe Natural
-> Maybe Natural
-> Text
-> Natural
-> Natural
-> UpdateMaintenanceStartTime
UpdateMaintenanceStartTime'
      { $sel:dayOfMonth:UpdateMaintenanceStartTime' :: Maybe Natural
dayOfMonth =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:dayOfWeek:UpdateMaintenanceStartTime' :: Maybe Natural
dayOfWeek = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:gatewayARN:UpdateMaintenanceStartTime' :: Text
gatewayARN = Text
pGatewayARN_,
        $sel:hourOfDay:UpdateMaintenanceStartTime' :: Natural
hourOfDay = Natural
pHourOfDay_,
        $sel:minuteOfHour:UpdateMaintenanceStartTime' :: Natural
minuteOfHour = Natural
pMinuteOfHour_
      }

-- | The day of the month component of the maintenance start time represented
-- as an ordinal number from 1 to 28, where 1 represents the first day of
-- the month and 28 represents the last day of the month.
updateMaintenanceStartTime_dayOfMonth :: Lens.Lens' UpdateMaintenanceStartTime (Prelude.Maybe Prelude.Natural)
updateMaintenanceStartTime_dayOfMonth :: (Maybe Natural -> f (Maybe Natural))
-> UpdateMaintenanceStartTime -> f UpdateMaintenanceStartTime
updateMaintenanceStartTime_dayOfMonth = (UpdateMaintenanceStartTime -> Maybe Natural)
-> (UpdateMaintenanceStartTime
    -> Maybe Natural -> UpdateMaintenanceStartTime)
-> Lens
     UpdateMaintenanceStartTime
     UpdateMaintenanceStartTime
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceStartTime' {Maybe Natural
dayOfMonth :: Maybe Natural
$sel:dayOfMonth:UpdateMaintenanceStartTime' :: UpdateMaintenanceStartTime -> Maybe Natural
dayOfMonth} -> Maybe Natural
dayOfMonth) (\s :: UpdateMaintenanceStartTime
s@UpdateMaintenanceStartTime' {} Maybe Natural
a -> UpdateMaintenanceStartTime
s {$sel:dayOfMonth:UpdateMaintenanceStartTime' :: Maybe Natural
dayOfMonth = Maybe Natural
a} :: UpdateMaintenanceStartTime)

-- | The day of the week component of the maintenance start time week
-- represented as an ordinal number from 0 to 6, where 0 represents Sunday
-- and 6 Saturday.
updateMaintenanceStartTime_dayOfWeek :: Lens.Lens' UpdateMaintenanceStartTime (Prelude.Maybe Prelude.Natural)
updateMaintenanceStartTime_dayOfWeek :: (Maybe Natural -> f (Maybe Natural))
-> UpdateMaintenanceStartTime -> f UpdateMaintenanceStartTime
updateMaintenanceStartTime_dayOfWeek = (UpdateMaintenanceStartTime -> Maybe Natural)
-> (UpdateMaintenanceStartTime
    -> Maybe Natural -> UpdateMaintenanceStartTime)
-> Lens
     UpdateMaintenanceStartTime
     UpdateMaintenanceStartTime
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceStartTime' {Maybe Natural
dayOfWeek :: Maybe Natural
$sel:dayOfWeek:UpdateMaintenanceStartTime' :: UpdateMaintenanceStartTime -> Maybe Natural
dayOfWeek} -> Maybe Natural
dayOfWeek) (\s :: UpdateMaintenanceStartTime
s@UpdateMaintenanceStartTime' {} Maybe Natural
a -> UpdateMaintenanceStartTime
s {$sel:dayOfWeek:UpdateMaintenanceStartTime' :: Maybe Natural
dayOfWeek = Maybe Natural
a} :: UpdateMaintenanceStartTime)

-- | Undocumented member.
updateMaintenanceStartTime_gatewayARN :: Lens.Lens' UpdateMaintenanceStartTime Prelude.Text
updateMaintenanceStartTime_gatewayARN :: (Text -> f Text)
-> UpdateMaintenanceStartTime -> f UpdateMaintenanceStartTime
updateMaintenanceStartTime_gatewayARN = (UpdateMaintenanceStartTime -> Text)
-> (UpdateMaintenanceStartTime
    -> Text -> UpdateMaintenanceStartTime)
-> Lens
     UpdateMaintenanceStartTime UpdateMaintenanceStartTime Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceStartTime' {Text
gatewayARN :: Text
$sel:gatewayARN:UpdateMaintenanceStartTime' :: UpdateMaintenanceStartTime -> Text
gatewayARN} -> Text
gatewayARN) (\s :: UpdateMaintenanceStartTime
s@UpdateMaintenanceStartTime' {} Text
a -> UpdateMaintenanceStartTime
s {$sel:gatewayARN:UpdateMaintenanceStartTime' :: Text
gatewayARN = Text
a} :: UpdateMaintenanceStartTime)

-- | The hour component of the maintenance start time represented as /hh/,
-- where /hh/ is the hour (00 to 23). The hour of the day is in the time
-- zone of the gateway.
updateMaintenanceStartTime_hourOfDay :: Lens.Lens' UpdateMaintenanceStartTime Prelude.Natural
updateMaintenanceStartTime_hourOfDay :: (Natural -> f Natural)
-> UpdateMaintenanceStartTime -> f UpdateMaintenanceStartTime
updateMaintenanceStartTime_hourOfDay = (UpdateMaintenanceStartTime -> Natural)
-> (UpdateMaintenanceStartTime
    -> Natural -> UpdateMaintenanceStartTime)
-> Lens
     UpdateMaintenanceStartTime
     UpdateMaintenanceStartTime
     Natural
     Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceStartTime' {Natural
hourOfDay :: Natural
$sel:hourOfDay:UpdateMaintenanceStartTime' :: UpdateMaintenanceStartTime -> Natural
hourOfDay} -> Natural
hourOfDay) (\s :: UpdateMaintenanceStartTime
s@UpdateMaintenanceStartTime' {} Natural
a -> UpdateMaintenanceStartTime
s {$sel:hourOfDay:UpdateMaintenanceStartTime' :: Natural
hourOfDay = Natural
a} :: UpdateMaintenanceStartTime)

-- | The minute component of the maintenance start time represented as /mm/,
-- where /mm/ is the minute (00 to 59). The minute of the hour is in the
-- time zone of the gateway.
updateMaintenanceStartTime_minuteOfHour :: Lens.Lens' UpdateMaintenanceStartTime Prelude.Natural
updateMaintenanceStartTime_minuteOfHour :: (Natural -> f Natural)
-> UpdateMaintenanceStartTime -> f UpdateMaintenanceStartTime
updateMaintenanceStartTime_minuteOfHour = (UpdateMaintenanceStartTime -> Natural)
-> (UpdateMaintenanceStartTime
    -> Natural -> UpdateMaintenanceStartTime)
-> Lens
     UpdateMaintenanceStartTime
     UpdateMaintenanceStartTime
     Natural
     Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceStartTime' {Natural
minuteOfHour :: Natural
$sel:minuteOfHour:UpdateMaintenanceStartTime' :: UpdateMaintenanceStartTime -> Natural
minuteOfHour} -> Natural
minuteOfHour) (\s :: UpdateMaintenanceStartTime
s@UpdateMaintenanceStartTime' {} Natural
a -> UpdateMaintenanceStartTime
s {$sel:minuteOfHour:UpdateMaintenanceStartTime' :: Natural
minuteOfHour = Natural
a} :: UpdateMaintenanceStartTime)

instance Core.AWSRequest UpdateMaintenanceStartTime where
  type
    AWSResponse UpdateMaintenanceStartTime =
      UpdateMaintenanceStartTimeResponse
  request :: UpdateMaintenanceStartTime -> Request UpdateMaintenanceStartTime
request = Service
-> UpdateMaintenanceStartTime -> Request UpdateMaintenanceStartTime
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateMaintenanceStartTime
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateMaintenanceStartTime)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateMaintenanceStartTime))
-> Logger
-> Service
-> Proxy UpdateMaintenanceStartTime
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateMaintenanceStartTime)))
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 Text -> Int -> UpdateMaintenanceStartTimeResponse
UpdateMaintenanceStartTimeResponse'
            (Maybe Text -> Int -> UpdateMaintenanceStartTimeResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateMaintenanceStartTimeResponse)
forall (f :: * -> *) a b. Functor 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
"GatewayARN")
            Either String (Int -> UpdateMaintenanceStartTimeResponse)
-> Either String Int
-> Either String UpdateMaintenanceStartTimeResponse
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 UpdateMaintenanceStartTime

instance Prelude.NFData UpdateMaintenanceStartTime

instance Core.ToHeaders UpdateMaintenanceStartTime where
  toHeaders :: UpdateMaintenanceStartTime -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateMaintenanceStartTime -> 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.UpdateMaintenanceStartTime" ::
                          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 UpdateMaintenanceStartTime where
  toJSON :: UpdateMaintenanceStartTime -> Value
toJSON UpdateMaintenanceStartTime' {Natural
Maybe Natural
Text
minuteOfHour :: Natural
hourOfDay :: Natural
gatewayARN :: Text
dayOfWeek :: Maybe Natural
dayOfMonth :: Maybe Natural
$sel:minuteOfHour:UpdateMaintenanceStartTime' :: UpdateMaintenanceStartTime -> Natural
$sel:hourOfDay:UpdateMaintenanceStartTime' :: UpdateMaintenanceStartTime -> Natural
$sel:gatewayARN:UpdateMaintenanceStartTime' :: UpdateMaintenanceStartTime -> Text
$sel:dayOfWeek:UpdateMaintenanceStartTime' :: UpdateMaintenanceStartTime -> Maybe Natural
$sel:dayOfMonth:UpdateMaintenanceStartTime' :: UpdateMaintenanceStartTime -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DayOfMonth" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
dayOfMonth,
            (Text
"DayOfWeek" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
dayOfWeek,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"GatewayARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
gatewayARN),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"HourOfDay" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
hourOfDay),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"MinuteOfHour" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
minuteOfHour)
          ]
      )

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

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

-- | A JSON object containing the Amazon Resource Name (ARN) of the gateway
-- whose maintenance start time is updated.
--
-- /See:/ 'newUpdateMaintenanceStartTimeResponse' smart constructor.
data UpdateMaintenanceStartTimeResponse = UpdateMaintenanceStartTimeResponse'
  { UpdateMaintenanceStartTimeResponse -> Maybe Text
gatewayARN :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateMaintenanceStartTimeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateMaintenanceStartTimeResponse
-> UpdateMaintenanceStartTimeResponse -> Bool
(UpdateMaintenanceStartTimeResponse
 -> UpdateMaintenanceStartTimeResponse -> Bool)
-> (UpdateMaintenanceStartTimeResponse
    -> UpdateMaintenanceStartTimeResponse -> Bool)
-> Eq UpdateMaintenanceStartTimeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMaintenanceStartTimeResponse
-> UpdateMaintenanceStartTimeResponse -> Bool
$c/= :: UpdateMaintenanceStartTimeResponse
-> UpdateMaintenanceStartTimeResponse -> Bool
== :: UpdateMaintenanceStartTimeResponse
-> UpdateMaintenanceStartTimeResponse -> Bool
$c== :: UpdateMaintenanceStartTimeResponse
-> UpdateMaintenanceStartTimeResponse -> Bool
Prelude.Eq, ReadPrec [UpdateMaintenanceStartTimeResponse]
ReadPrec UpdateMaintenanceStartTimeResponse
Int -> ReadS UpdateMaintenanceStartTimeResponse
ReadS [UpdateMaintenanceStartTimeResponse]
(Int -> ReadS UpdateMaintenanceStartTimeResponse)
-> ReadS [UpdateMaintenanceStartTimeResponse]
-> ReadPrec UpdateMaintenanceStartTimeResponse
-> ReadPrec [UpdateMaintenanceStartTimeResponse]
-> Read UpdateMaintenanceStartTimeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateMaintenanceStartTimeResponse]
$creadListPrec :: ReadPrec [UpdateMaintenanceStartTimeResponse]
readPrec :: ReadPrec UpdateMaintenanceStartTimeResponse
$creadPrec :: ReadPrec UpdateMaintenanceStartTimeResponse
readList :: ReadS [UpdateMaintenanceStartTimeResponse]
$creadList :: ReadS [UpdateMaintenanceStartTimeResponse]
readsPrec :: Int -> ReadS UpdateMaintenanceStartTimeResponse
$creadsPrec :: Int -> ReadS UpdateMaintenanceStartTimeResponse
Prelude.Read, Int -> UpdateMaintenanceStartTimeResponse -> ShowS
[UpdateMaintenanceStartTimeResponse] -> ShowS
UpdateMaintenanceStartTimeResponse -> String
(Int -> UpdateMaintenanceStartTimeResponse -> ShowS)
-> (UpdateMaintenanceStartTimeResponse -> String)
-> ([UpdateMaintenanceStartTimeResponse] -> ShowS)
-> Show UpdateMaintenanceStartTimeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMaintenanceStartTimeResponse] -> ShowS
$cshowList :: [UpdateMaintenanceStartTimeResponse] -> ShowS
show :: UpdateMaintenanceStartTimeResponse -> String
$cshow :: UpdateMaintenanceStartTimeResponse -> String
showsPrec :: Int -> UpdateMaintenanceStartTimeResponse -> ShowS
$cshowsPrec :: Int -> UpdateMaintenanceStartTimeResponse -> ShowS
Prelude.Show, (forall x.
 UpdateMaintenanceStartTimeResponse
 -> Rep UpdateMaintenanceStartTimeResponse x)
-> (forall x.
    Rep UpdateMaintenanceStartTimeResponse x
    -> UpdateMaintenanceStartTimeResponse)
-> Generic UpdateMaintenanceStartTimeResponse
forall x.
Rep UpdateMaintenanceStartTimeResponse x
-> UpdateMaintenanceStartTimeResponse
forall x.
UpdateMaintenanceStartTimeResponse
-> Rep UpdateMaintenanceStartTimeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateMaintenanceStartTimeResponse x
-> UpdateMaintenanceStartTimeResponse
$cfrom :: forall x.
UpdateMaintenanceStartTimeResponse
-> Rep UpdateMaintenanceStartTimeResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateMaintenanceStartTimeResponse' 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:
--
-- 'gatewayARN', 'updateMaintenanceStartTimeResponse_gatewayARN' - Undocumented member.
--
-- 'httpStatus', 'updateMaintenanceStartTimeResponse_httpStatus' - The response's http status code.
newUpdateMaintenanceStartTimeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateMaintenanceStartTimeResponse
newUpdateMaintenanceStartTimeResponse :: Int -> UpdateMaintenanceStartTimeResponse
newUpdateMaintenanceStartTimeResponse Int
pHttpStatus_ =
  UpdateMaintenanceStartTimeResponse' :: Maybe Text -> Int -> UpdateMaintenanceStartTimeResponse
UpdateMaintenanceStartTimeResponse'
    { $sel:gatewayARN:UpdateMaintenanceStartTimeResponse' :: Maybe Text
gatewayARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateMaintenanceStartTimeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
updateMaintenanceStartTimeResponse_gatewayARN :: Lens.Lens' UpdateMaintenanceStartTimeResponse (Prelude.Maybe Prelude.Text)
updateMaintenanceStartTimeResponse_gatewayARN :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceStartTimeResponse
-> f UpdateMaintenanceStartTimeResponse
updateMaintenanceStartTimeResponse_gatewayARN = (UpdateMaintenanceStartTimeResponse -> Maybe Text)
-> (UpdateMaintenanceStartTimeResponse
    -> Maybe Text -> UpdateMaintenanceStartTimeResponse)
-> Lens
     UpdateMaintenanceStartTimeResponse
     UpdateMaintenanceStartTimeResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceStartTimeResponse' {Maybe Text
gatewayARN :: Maybe Text
$sel:gatewayARN:UpdateMaintenanceStartTimeResponse' :: UpdateMaintenanceStartTimeResponse -> Maybe Text
gatewayARN} -> Maybe Text
gatewayARN) (\s :: UpdateMaintenanceStartTimeResponse
s@UpdateMaintenanceStartTimeResponse' {} Maybe Text
a -> UpdateMaintenanceStartTimeResponse
s {$sel:gatewayARN:UpdateMaintenanceStartTimeResponse' :: Maybe Text
gatewayARN = Maybe Text
a} :: UpdateMaintenanceStartTimeResponse)

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

instance
  Prelude.NFData
    UpdateMaintenanceStartTimeResponse