{-# 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.SSM.GetCalendarState
-- 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)
--
-- Gets the state of a Amazon Web Services Systems Manager change calendar
-- at the current time or a specified time. If you specify a time,
-- @GetCalendarState@ returns the state of the calendar at that specific
-- time, and returns the next time that the change calendar state will
-- transition. If you don\'t specify a time, @GetCalendarState@ uses the
-- current time. Change Calendar entries have two possible states: @OPEN@
-- or @CLOSED@.
--
-- If you specify more than one calendar in a request, the command returns
-- the status of @OPEN@ only if all calendars in the request are open. If
-- one or more calendars in the request are closed, the status returned is
-- @CLOSED@.
--
-- For more information about Change Calendar, a capability of Amazon Web
-- Services Systems Manager, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar.html Amazon Web Services Systems Manager Change Calendar>
-- in the /Amazon Web Services Systems Manager User Guide/.
module Amazonka.SSM.GetCalendarState
  ( -- * Creating a Request
    GetCalendarState (..),
    newGetCalendarState,

    -- * Request Lenses
    getCalendarState_atTime,
    getCalendarState_calendarNames,

    -- * Destructuring the Response
    GetCalendarStateResponse (..),
    newGetCalendarStateResponse,

    -- * Response Lenses
    getCalendarStateResponse_state,
    getCalendarStateResponse_nextTransitionTime,
    getCalendarStateResponse_atTime,
    getCalendarStateResponse_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.SSM.Types

-- | /See:/ 'newGetCalendarState' smart constructor.
data GetCalendarState = GetCalendarState'
  { -- | (Optional) The specific time for which you want to get calendar state
    -- information, in <https://en.wikipedia.org/wiki/ISO_8601 ISO 8601>
    -- format. If you don\'t specify a value or @AtTime@, the current time is
    -- used.
    GetCalendarState -> Maybe Text
atTime :: Prelude.Maybe Prelude.Text,
    -- | The names or Amazon Resource Names (ARNs) of the Systems Manager
    -- documents (SSM documents) that represent the calendar entries for which
    -- you want to get the state.
    GetCalendarState -> [Text]
calendarNames :: [Prelude.Text]
  }
  deriving (GetCalendarState -> GetCalendarState -> Bool
(GetCalendarState -> GetCalendarState -> Bool)
-> (GetCalendarState -> GetCalendarState -> Bool)
-> Eq GetCalendarState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCalendarState -> GetCalendarState -> Bool
$c/= :: GetCalendarState -> GetCalendarState -> Bool
== :: GetCalendarState -> GetCalendarState -> Bool
$c== :: GetCalendarState -> GetCalendarState -> Bool
Prelude.Eq, ReadPrec [GetCalendarState]
ReadPrec GetCalendarState
Int -> ReadS GetCalendarState
ReadS [GetCalendarState]
(Int -> ReadS GetCalendarState)
-> ReadS [GetCalendarState]
-> ReadPrec GetCalendarState
-> ReadPrec [GetCalendarState]
-> Read GetCalendarState
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCalendarState]
$creadListPrec :: ReadPrec [GetCalendarState]
readPrec :: ReadPrec GetCalendarState
$creadPrec :: ReadPrec GetCalendarState
readList :: ReadS [GetCalendarState]
$creadList :: ReadS [GetCalendarState]
readsPrec :: Int -> ReadS GetCalendarState
$creadsPrec :: Int -> ReadS GetCalendarState
Prelude.Read, Int -> GetCalendarState -> ShowS
[GetCalendarState] -> ShowS
GetCalendarState -> String
(Int -> GetCalendarState -> ShowS)
-> (GetCalendarState -> String)
-> ([GetCalendarState] -> ShowS)
-> Show GetCalendarState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCalendarState] -> ShowS
$cshowList :: [GetCalendarState] -> ShowS
show :: GetCalendarState -> String
$cshow :: GetCalendarState -> String
showsPrec :: Int -> GetCalendarState -> ShowS
$cshowsPrec :: Int -> GetCalendarState -> ShowS
Prelude.Show, (forall x. GetCalendarState -> Rep GetCalendarState x)
-> (forall x. Rep GetCalendarState x -> GetCalendarState)
-> Generic GetCalendarState
forall x. Rep GetCalendarState x -> GetCalendarState
forall x. GetCalendarState -> Rep GetCalendarState x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetCalendarState x -> GetCalendarState
$cfrom :: forall x. GetCalendarState -> Rep GetCalendarState x
Prelude.Generic)

-- |
-- Create a value of 'GetCalendarState' 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:
--
-- 'atTime', 'getCalendarState_atTime' - (Optional) The specific time for which you want to get calendar state
-- information, in <https://en.wikipedia.org/wiki/ISO_8601 ISO 8601>
-- format. If you don\'t specify a value or @AtTime@, the current time is
-- used.
--
-- 'calendarNames', 'getCalendarState_calendarNames' - The names or Amazon Resource Names (ARNs) of the Systems Manager
-- documents (SSM documents) that represent the calendar entries for which
-- you want to get the state.
newGetCalendarState ::
  GetCalendarState
newGetCalendarState :: GetCalendarState
newGetCalendarState =
  GetCalendarState' :: Maybe Text -> [Text] -> GetCalendarState
GetCalendarState'
    { $sel:atTime:GetCalendarState' :: Maybe Text
atTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:calendarNames:GetCalendarState' :: [Text]
calendarNames = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | (Optional) The specific time for which you want to get calendar state
-- information, in <https://en.wikipedia.org/wiki/ISO_8601 ISO 8601>
-- format. If you don\'t specify a value or @AtTime@, the current time is
-- used.
getCalendarState_atTime :: Lens.Lens' GetCalendarState (Prelude.Maybe Prelude.Text)
getCalendarState_atTime :: (Maybe Text -> f (Maybe Text))
-> GetCalendarState -> f GetCalendarState
getCalendarState_atTime = (GetCalendarState -> Maybe Text)
-> (GetCalendarState -> Maybe Text -> GetCalendarState)
-> Lens GetCalendarState GetCalendarState (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCalendarState' {Maybe Text
atTime :: Maybe Text
$sel:atTime:GetCalendarState' :: GetCalendarState -> Maybe Text
atTime} -> Maybe Text
atTime) (\s :: GetCalendarState
s@GetCalendarState' {} Maybe Text
a -> GetCalendarState
s {$sel:atTime:GetCalendarState' :: Maybe Text
atTime = Maybe Text
a} :: GetCalendarState)

-- | The names or Amazon Resource Names (ARNs) of the Systems Manager
-- documents (SSM documents) that represent the calendar entries for which
-- you want to get the state.
getCalendarState_calendarNames :: Lens.Lens' GetCalendarState [Prelude.Text]
getCalendarState_calendarNames :: ([Text] -> f [Text]) -> GetCalendarState -> f GetCalendarState
getCalendarState_calendarNames = (GetCalendarState -> [Text])
-> (GetCalendarState -> [Text] -> GetCalendarState)
-> Lens GetCalendarState GetCalendarState [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCalendarState' {[Text]
calendarNames :: [Text]
$sel:calendarNames:GetCalendarState' :: GetCalendarState -> [Text]
calendarNames} -> [Text]
calendarNames) (\s :: GetCalendarState
s@GetCalendarState' {} [Text]
a -> GetCalendarState
s {$sel:calendarNames:GetCalendarState' :: [Text]
calendarNames = [Text]
a} :: GetCalendarState) (([Text] -> f [Text]) -> GetCalendarState -> f GetCalendarState)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> GetCalendarState
-> f GetCalendarState
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest GetCalendarState where
  type
    AWSResponse GetCalendarState =
      GetCalendarStateResponse
  request :: GetCalendarState -> Request GetCalendarState
request = Service -> GetCalendarState -> Request GetCalendarState
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetCalendarState
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetCalendarState)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetCalendarState))
-> Logger
-> Service
-> Proxy GetCalendarState
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetCalendarState)))
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 CalendarState
-> Maybe Text -> Maybe Text -> Int -> GetCalendarStateResponse
GetCalendarStateResponse'
            (Maybe CalendarState
 -> Maybe Text -> Maybe Text -> Int -> GetCalendarStateResponse)
-> Either String (Maybe CalendarState)
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> GetCalendarStateResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe CalendarState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"State")
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> GetCalendarStateResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> GetCalendarStateResponse)
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
"NextTransitionTime")
            Either String (Maybe Text -> Int -> GetCalendarStateResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetCalendarStateResponse)
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
"AtTime")
            Either String (Int -> GetCalendarStateResponse)
-> Either String Int -> Either String GetCalendarStateResponse
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 GetCalendarState

instance Prelude.NFData GetCalendarState

instance Core.ToHeaders GetCalendarState where
  toHeaders :: GetCalendarState -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetCalendarState -> 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
"AmazonSSM.GetCalendarState" :: 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 GetCalendarState where
  toJSON :: GetCalendarState -> Value
toJSON GetCalendarState' {[Text]
Maybe Text
calendarNames :: [Text]
atTime :: Maybe Text
$sel:calendarNames:GetCalendarState' :: GetCalendarState -> [Text]
$sel:atTime:GetCalendarState' :: GetCalendarState -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AtTime" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
atTime,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"CalendarNames" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
calendarNames)
          ]
      )

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

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

-- | /See:/ 'newGetCalendarStateResponse' smart constructor.
data GetCalendarStateResponse = GetCalendarStateResponse'
  { -- | The state of the calendar. An @OPEN@ calendar indicates that actions are
    -- allowed to proceed, and a @CLOSED@ calendar indicates that actions
    -- aren\'t allowed to proceed.
    GetCalendarStateResponse -> Maybe CalendarState
state :: Prelude.Maybe CalendarState,
    -- | The time, as an <https://en.wikipedia.org/wiki/ISO_8601 ISO 8601>
    -- string, that the calendar state will change. If the current calendar
    -- state is @OPEN@, @NextTransitionTime@ indicates when the calendar state
    -- changes to @CLOSED@, and vice-versa.
    GetCalendarStateResponse -> Maybe Text
nextTransitionTime :: Prelude.Maybe Prelude.Text,
    -- | The time, as an <https://en.wikipedia.org/wiki/ISO_8601 ISO 8601>
    -- string, that you specified in your command. If you don\'t specify a
    -- time, @GetCalendarState@ uses the current time.
    GetCalendarStateResponse -> Maybe Text
atTime :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetCalendarStateResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetCalendarStateResponse -> GetCalendarStateResponse -> Bool
(GetCalendarStateResponse -> GetCalendarStateResponse -> Bool)
-> (GetCalendarStateResponse -> GetCalendarStateResponse -> Bool)
-> Eq GetCalendarStateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCalendarStateResponse -> GetCalendarStateResponse -> Bool
$c/= :: GetCalendarStateResponse -> GetCalendarStateResponse -> Bool
== :: GetCalendarStateResponse -> GetCalendarStateResponse -> Bool
$c== :: GetCalendarStateResponse -> GetCalendarStateResponse -> Bool
Prelude.Eq, ReadPrec [GetCalendarStateResponse]
ReadPrec GetCalendarStateResponse
Int -> ReadS GetCalendarStateResponse
ReadS [GetCalendarStateResponse]
(Int -> ReadS GetCalendarStateResponse)
-> ReadS [GetCalendarStateResponse]
-> ReadPrec GetCalendarStateResponse
-> ReadPrec [GetCalendarStateResponse]
-> Read GetCalendarStateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCalendarStateResponse]
$creadListPrec :: ReadPrec [GetCalendarStateResponse]
readPrec :: ReadPrec GetCalendarStateResponse
$creadPrec :: ReadPrec GetCalendarStateResponse
readList :: ReadS [GetCalendarStateResponse]
$creadList :: ReadS [GetCalendarStateResponse]
readsPrec :: Int -> ReadS GetCalendarStateResponse
$creadsPrec :: Int -> ReadS GetCalendarStateResponse
Prelude.Read, Int -> GetCalendarStateResponse -> ShowS
[GetCalendarStateResponse] -> ShowS
GetCalendarStateResponse -> String
(Int -> GetCalendarStateResponse -> ShowS)
-> (GetCalendarStateResponse -> String)
-> ([GetCalendarStateResponse] -> ShowS)
-> Show GetCalendarStateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCalendarStateResponse] -> ShowS
$cshowList :: [GetCalendarStateResponse] -> ShowS
show :: GetCalendarStateResponse -> String
$cshow :: GetCalendarStateResponse -> String
showsPrec :: Int -> GetCalendarStateResponse -> ShowS
$cshowsPrec :: Int -> GetCalendarStateResponse -> ShowS
Prelude.Show, (forall x.
 GetCalendarStateResponse -> Rep GetCalendarStateResponse x)
-> (forall x.
    Rep GetCalendarStateResponse x -> GetCalendarStateResponse)
-> Generic GetCalendarStateResponse
forall x.
Rep GetCalendarStateResponse x -> GetCalendarStateResponse
forall x.
GetCalendarStateResponse -> Rep GetCalendarStateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCalendarStateResponse x -> GetCalendarStateResponse
$cfrom :: forall x.
GetCalendarStateResponse -> Rep GetCalendarStateResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetCalendarStateResponse' 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:
--
-- 'state', 'getCalendarStateResponse_state' - The state of the calendar. An @OPEN@ calendar indicates that actions are
-- allowed to proceed, and a @CLOSED@ calendar indicates that actions
-- aren\'t allowed to proceed.
--
-- 'nextTransitionTime', 'getCalendarStateResponse_nextTransitionTime' - The time, as an <https://en.wikipedia.org/wiki/ISO_8601 ISO 8601>
-- string, that the calendar state will change. If the current calendar
-- state is @OPEN@, @NextTransitionTime@ indicates when the calendar state
-- changes to @CLOSED@, and vice-versa.
--
-- 'atTime', 'getCalendarStateResponse_atTime' - The time, as an <https://en.wikipedia.org/wiki/ISO_8601 ISO 8601>
-- string, that you specified in your command. If you don\'t specify a
-- time, @GetCalendarState@ uses the current time.
--
-- 'httpStatus', 'getCalendarStateResponse_httpStatus' - The response's http status code.
newGetCalendarStateResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetCalendarStateResponse
newGetCalendarStateResponse :: Int -> GetCalendarStateResponse
newGetCalendarStateResponse Int
pHttpStatus_ =
  GetCalendarStateResponse' :: Maybe CalendarState
-> Maybe Text -> Maybe Text -> Int -> GetCalendarStateResponse
GetCalendarStateResponse'
    { $sel:state:GetCalendarStateResponse' :: Maybe CalendarState
state = Maybe CalendarState
forall a. Maybe a
Prelude.Nothing,
      $sel:nextTransitionTime:GetCalendarStateResponse' :: Maybe Text
nextTransitionTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:atTime:GetCalendarStateResponse' :: Maybe Text
atTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetCalendarStateResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The state of the calendar. An @OPEN@ calendar indicates that actions are
-- allowed to proceed, and a @CLOSED@ calendar indicates that actions
-- aren\'t allowed to proceed.
getCalendarStateResponse_state :: Lens.Lens' GetCalendarStateResponse (Prelude.Maybe CalendarState)
getCalendarStateResponse_state :: (Maybe CalendarState -> f (Maybe CalendarState))
-> GetCalendarStateResponse -> f GetCalendarStateResponse
getCalendarStateResponse_state = (GetCalendarStateResponse -> Maybe CalendarState)
-> (GetCalendarStateResponse
    -> Maybe CalendarState -> GetCalendarStateResponse)
-> Lens
     GetCalendarStateResponse
     GetCalendarStateResponse
     (Maybe CalendarState)
     (Maybe CalendarState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCalendarStateResponse' {Maybe CalendarState
state :: Maybe CalendarState
$sel:state:GetCalendarStateResponse' :: GetCalendarStateResponse -> Maybe CalendarState
state} -> Maybe CalendarState
state) (\s :: GetCalendarStateResponse
s@GetCalendarStateResponse' {} Maybe CalendarState
a -> GetCalendarStateResponse
s {$sel:state:GetCalendarStateResponse' :: Maybe CalendarState
state = Maybe CalendarState
a} :: GetCalendarStateResponse)

-- | The time, as an <https://en.wikipedia.org/wiki/ISO_8601 ISO 8601>
-- string, that the calendar state will change. If the current calendar
-- state is @OPEN@, @NextTransitionTime@ indicates when the calendar state
-- changes to @CLOSED@, and vice-versa.
getCalendarStateResponse_nextTransitionTime :: Lens.Lens' GetCalendarStateResponse (Prelude.Maybe Prelude.Text)
getCalendarStateResponse_nextTransitionTime :: (Maybe Text -> f (Maybe Text))
-> GetCalendarStateResponse -> f GetCalendarStateResponse
getCalendarStateResponse_nextTransitionTime = (GetCalendarStateResponse -> Maybe Text)
-> (GetCalendarStateResponse
    -> Maybe Text -> GetCalendarStateResponse)
-> Lens
     GetCalendarStateResponse
     GetCalendarStateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCalendarStateResponse' {Maybe Text
nextTransitionTime :: Maybe Text
$sel:nextTransitionTime:GetCalendarStateResponse' :: GetCalendarStateResponse -> Maybe Text
nextTransitionTime} -> Maybe Text
nextTransitionTime) (\s :: GetCalendarStateResponse
s@GetCalendarStateResponse' {} Maybe Text
a -> GetCalendarStateResponse
s {$sel:nextTransitionTime:GetCalendarStateResponse' :: Maybe Text
nextTransitionTime = Maybe Text
a} :: GetCalendarStateResponse)

-- | The time, as an <https://en.wikipedia.org/wiki/ISO_8601 ISO 8601>
-- string, that you specified in your command. If you don\'t specify a
-- time, @GetCalendarState@ uses the current time.
getCalendarStateResponse_atTime :: Lens.Lens' GetCalendarStateResponse (Prelude.Maybe Prelude.Text)
getCalendarStateResponse_atTime :: (Maybe Text -> f (Maybe Text))
-> GetCalendarStateResponse -> f GetCalendarStateResponse
getCalendarStateResponse_atTime = (GetCalendarStateResponse -> Maybe Text)
-> (GetCalendarStateResponse
    -> Maybe Text -> GetCalendarStateResponse)
-> Lens
     GetCalendarStateResponse
     GetCalendarStateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCalendarStateResponse' {Maybe Text
atTime :: Maybe Text
$sel:atTime:GetCalendarStateResponse' :: GetCalendarStateResponse -> Maybe Text
atTime} -> Maybe Text
atTime) (\s :: GetCalendarStateResponse
s@GetCalendarStateResponse' {} Maybe Text
a -> GetCalendarStateResponse
s {$sel:atTime:GetCalendarStateResponse' :: Maybe Text
atTime = Maybe Text
a} :: GetCalendarStateResponse)

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

instance Prelude.NFData GetCalendarStateResponse