{-# 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.DescribeAvailabilityMonitorTest
-- 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 information about the most recent high availability monitoring
-- test that was performed on the host in a cluster. If a test isn\'t
-- performed, the status and start time in the response would be null.
module Amazonka.StorageGateway.DescribeAvailabilityMonitorTest
  ( -- * Creating a Request
    DescribeAvailabilityMonitorTest (..),
    newDescribeAvailabilityMonitorTest,

    -- * Request Lenses
    describeAvailabilityMonitorTest_gatewayARN,

    -- * Destructuring the Response
    DescribeAvailabilityMonitorTestResponse (..),
    newDescribeAvailabilityMonitorTestResponse,

    -- * Response Lenses
    describeAvailabilityMonitorTestResponse_status,
    describeAvailabilityMonitorTestResponse_startTime,
    describeAvailabilityMonitorTestResponse_gatewayARN,
    describeAvailabilityMonitorTestResponse_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

-- | /See:/ 'newDescribeAvailabilityMonitorTest' smart constructor.
data DescribeAvailabilityMonitorTest = DescribeAvailabilityMonitorTest'
  { DescribeAvailabilityMonitorTest -> Text
gatewayARN :: Prelude.Text
  }
  deriving (DescribeAvailabilityMonitorTest
-> DescribeAvailabilityMonitorTest -> Bool
(DescribeAvailabilityMonitorTest
 -> DescribeAvailabilityMonitorTest -> Bool)
-> (DescribeAvailabilityMonitorTest
    -> DescribeAvailabilityMonitorTest -> Bool)
-> Eq DescribeAvailabilityMonitorTest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAvailabilityMonitorTest
-> DescribeAvailabilityMonitorTest -> Bool
$c/= :: DescribeAvailabilityMonitorTest
-> DescribeAvailabilityMonitorTest -> Bool
== :: DescribeAvailabilityMonitorTest
-> DescribeAvailabilityMonitorTest -> Bool
$c== :: DescribeAvailabilityMonitorTest
-> DescribeAvailabilityMonitorTest -> Bool
Prelude.Eq, ReadPrec [DescribeAvailabilityMonitorTest]
ReadPrec DescribeAvailabilityMonitorTest
Int -> ReadS DescribeAvailabilityMonitorTest
ReadS [DescribeAvailabilityMonitorTest]
(Int -> ReadS DescribeAvailabilityMonitorTest)
-> ReadS [DescribeAvailabilityMonitorTest]
-> ReadPrec DescribeAvailabilityMonitorTest
-> ReadPrec [DescribeAvailabilityMonitorTest]
-> Read DescribeAvailabilityMonitorTest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAvailabilityMonitorTest]
$creadListPrec :: ReadPrec [DescribeAvailabilityMonitorTest]
readPrec :: ReadPrec DescribeAvailabilityMonitorTest
$creadPrec :: ReadPrec DescribeAvailabilityMonitorTest
readList :: ReadS [DescribeAvailabilityMonitorTest]
$creadList :: ReadS [DescribeAvailabilityMonitorTest]
readsPrec :: Int -> ReadS DescribeAvailabilityMonitorTest
$creadsPrec :: Int -> ReadS DescribeAvailabilityMonitorTest
Prelude.Read, Int -> DescribeAvailabilityMonitorTest -> ShowS
[DescribeAvailabilityMonitorTest] -> ShowS
DescribeAvailabilityMonitorTest -> String
(Int -> DescribeAvailabilityMonitorTest -> ShowS)
-> (DescribeAvailabilityMonitorTest -> String)
-> ([DescribeAvailabilityMonitorTest] -> ShowS)
-> Show DescribeAvailabilityMonitorTest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAvailabilityMonitorTest] -> ShowS
$cshowList :: [DescribeAvailabilityMonitorTest] -> ShowS
show :: DescribeAvailabilityMonitorTest -> String
$cshow :: DescribeAvailabilityMonitorTest -> String
showsPrec :: Int -> DescribeAvailabilityMonitorTest -> ShowS
$cshowsPrec :: Int -> DescribeAvailabilityMonitorTest -> ShowS
Prelude.Show, (forall x.
 DescribeAvailabilityMonitorTest
 -> Rep DescribeAvailabilityMonitorTest x)
-> (forall x.
    Rep DescribeAvailabilityMonitorTest x
    -> DescribeAvailabilityMonitorTest)
-> Generic DescribeAvailabilityMonitorTest
forall x.
Rep DescribeAvailabilityMonitorTest x
-> DescribeAvailabilityMonitorTest
forall x.
DescribeAvailabilityMonitorTest
-> Rep DescribeAvailabilityMonitorTest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAvailabilityMonitorTest x
-> DescribeAvailabilityMonitorTest
$cfrom :: forall x.
DescribeAvailabilityMonitorTest
-> Rep DescribeAvailabilityMonitorTest x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAvailabilityMonitorTest' 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', 'describeAvailabilityMonitorTest_gatewayARN' - Undocumented member.
newDescribeAvailabilityMonitorTest ::
  -- | 'gatewayARN'
  Prelude.Text ->
  DescribeAvailabilityMonitorTest
newDescribeAvailabilityMonitorTest :: Text -> DescribeAvailabilityMonitorTest
newDescribeAvailabilityMonitorTest Text
pGatewayARN_ =
  DescribeAvailabilityMonitorTest' :: Text -> DescribeAvailabilityMonitorTest
DescribeAvailabilityMonitorTest'
    { $sel:gatewayARN:DescribeAvailabilityMonitorTest' :: Text
gatewayARN =
        Text
pGatewayARN_
    }

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

instance
  Core.AWSRequest
    DescribeAvailabilityMonitorTest
  where
  type
    AWSResponse DescribeAvailabilityMonitorTest =
      DescribeAvailabilityMonitorTestResponse
  request :: DescribeAvailabilityMonitorTest
-> Request DescribeAvailabilityMonitorTest
request = Service
-> DescribeAvailabilityMonitorTest
-> Request DescribeAvailabilityMonitorTest
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeAvailabilityMonitorTest
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeAvailabilityMonitorTest)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeAvailabilityMonitorTest))
-> Logger
-> Service
-> Proxy DescribeAvailabilityMonitorTest
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeAvailabilityMonitorTest)))
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 AvailabilityMonitorTestStatus
-> Maybe POSIX
-> Maybe Text
-> Int
-> DescribeAvailabilityMonitorTestResponse
DescribeAvailabilityMonitorTestResponse'
            (Maybe AvailabilityMonitorTestStatus
 -> Maybe POSIX
 -> Maybe Text
 -> Int
 -> DescribeAvailabilityMonitorTestResponse)
-> Either String (Maybe AvailabilityMonitorTestStatus)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text -> Int -> DescribeAvailabilityMonitorTestResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe AvailabilityMonitorTestStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe POSIX
   -> Maybe Text -> Int -> DescribeAvailabilityMonitorTestResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text -> Int -> DescribeAvailabilityMonitorTestResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"StartTime")
            Either
  String
  (Maybe Text -> Int -> DescribeAvailabilityMonitorTestResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeAvailabilityMonitorTestResponse)
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
"GatewayARN")
            Either String (Int -> DescribeAvailabilityMonitorTestResponse)
-> Either String Int
-> Either String DescribeAvailabilityMonitorTestResponse
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
    DescribeAvailabilityMonitorTest

instance
  Prelude.NFData
    DescribeAvailabilityMonitorTest

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

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

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

-- | /See:/ 'newDescribeAvailabilityMonitorTestResponse' smart constructor.
data DescribeAvailabilityMonitorTestResponse = DescribeAvailabilityMonitorTestResponse'
  { -- | The status of the high availability monitoring test. If a test hasn\'t
    -- been performed, the value of this field is null.
    DescribeAvailabilityMonitorTestResponse
-> Maybe AvailabilityMonitorTestStatus
status :: Prelude.Maybe AvailabilityMonitorTestStatus,
    -- | The time the high availability monitoring test was started. If a test
    -- hasn\'t been performed, the value of this field is null.
    DescribeAvailabilityMonitorTestResponse -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    DescribeAvailabilityMonitorTestResponse -> Maybe Text
gatewayARN :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeAvailabilityMonitorTestResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeAvailabilityMonitorTestResponse
-> DescribeAvailabilityMonitorTestResponse -> Bool
(DescribeAvailabilityMonitorTestResponse
 -> DescribeAvailabilityMonitorTestResponse -> Bool)
-> (DescribeAvailabilityMonitorTestResponse
    -> DescribeAvailabilityMonitorTestResponse -> Bool)
-> Eq DescribeAvailabilityMonitorTestResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAvailabilityMonitorTestResponse
-> DescribeAvailabilityMonitorTestResponse -> Bool
$c/= :: DescribeAvailabilityMonitorTestResponse
-> DescribeAvailabilityMonitorTestResponse -> Bool
== :: DescribeAvailabilityMonitorTestResponse
-> DescribeAvailabilityMonitorTestResponse -> Bool
$c== :: DescribeAvailabilityMonitorTestResponse
-> DescribeAvailabilityMonitorTestResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAvailabilityMonitorTestResponse]
ReadPrec DescribeAvailabilityMonitorTestResponse
Int -> ReadS DescribeAvailabilityMonitorTestResponse
ReadS [DescribeAvailabilityMonitorTestResponse]
(Int -> ReadS DescribeAvailabilityMonitorTestResponse)
-> ReadS [DescribeAvailabilityMonitorTestResponse]
-> ReadPrec DescribeAvailabilityMonitorTestResponse
-> ReadPrec [DescribeAvailabilityMonitorTestResponse]
-> Read DescribeAvailabilityMonitorTestResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAvailabilityMonitorTestResponse]
$creadListPrec :: ReadPrec [DescribeAvailabilityMonitorTestResponse]
readPrec :: ReadPrec DescribeAvailabilityMonitorTestResponse
$creadPrec :: ReadPrec DescribeAvailabilityMonitorTestResponse
readList :: ReadS [DescribeAvailabilityMonitorTestResponse]
$creadList :: ReadS [DescribeAvailabilityMonitorTestResponse]
readsPrec :: Int -> ReadS DescribeAvailabilityMonitorTestResponse
$creadsPrec :: Int -> ReadS DescribeAvailabilityMonitorTestResponse
Prelude.Read, Int -> DescribeAvailabilityMonitorTestResponse -> ShowS
[DescribeAvailabilityMonitorTestResponse] -> ShowS
DescribeAvailabilityMonitorTestResponse -> String
(Int -> DescribeAvailabilityMonitorTestResponse -> ShowS)
-> (DescribeAvailabilityMonitorTestResponse -> String)
-> ([DescribeAvailabilityMonitorTestResponse] -> ShowS)
-> Show DescribeAvailabilityMonitorTestResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAvailabilityMonitorTestResponse] -> ShowS
$cshowList :: [DescribeAvailabilityMonitorTestResponse] -> ShowS
show :: DescribeAvailabilityMonitorTestResponse -> String
$cshow :: DescribeAvailabilityMonitorTestResponse -> String
showsPrec :: Int -> DescribeAvailabilityMonitorTestResponse -> ShowS
$cshowsPrec :: Int -> DescribeAvailabilityMonitorTestResponse -> ShowS
Prelude.Show, (forall x.
 DescribeAvailabilityMonitorTestResponse
 -> Rep DescribeAvailabilityMonitorTestResponse x)
-> (forall x.
    Rep DescribeAvailabilityMonitorTestResponse x
    -> DescribeAvailabilityMonitorTestResponse)
-> Generic DescribeAvailabilityMonitorTestResponse
forall x.
Rep DescribeAvailabilityMonitorTestResponse x
-> DescribeAvailabilityMonitorTestResponse
forall x.
DescribeAvailabilityMonitorTestResponse
-> Rep DescribeAvailabilityMonitorTestResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAvailabilityMonitorTestResponse x
-> DescribeAvailabilityMonitorTestResponse
$cfrom :: forall x.
DescribeAvailabilityMonitorTestResponse
-> Rep DescribeAvailabilityMonitorTestResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAvailabilityMonitorTestResponse' 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:
--
-- 'status', 'describeAvailabilityMonitorTestResponse_status' - The status of the high availability monitoring test. If a test hasn\'t
-- been performed, the value of this field is null.
--
-- 'startTime', 'describeAvailabilityMonitorTestResponse_startTime' - The time the high availability monitoring test was started. If a test
-- hasn\'t been performed, the value of this field is null.
--
-- 'gatewayARN', 'describeAvailabilityMonitorTestResponse_gatewayARN' - Undocumented member.
--
-- 'httpStatus', 'describeAvailabilityMonitorTestResponse_httpStatus' - The response's http status code.
newDescribeAvailabilityMonitorTestResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeAvailabilityMonitorTestResponse
newDescribeAvailabilityMonitorTestResponse :: Int -> DescribeAvailabilityMonitorTestResponse
newDescribeAvailabilityMonitorTestResponse
  Int
pHttpStatus_ =
    DescribeAvailabilityMonitorTestResponse' :: Maybe AvailabilityMonitorTestStatus
-> Maybe POSIX
-> Maybe Text
-> Int
-> DescribeAvailabilityMonitorTestResponse
DescribeAvailabilityMonitorTestResponse'
      { $sel:status:DescribeAvailabilityMonitorTestResponse' :: Maybe AvailabilityMonitorTestStatus
status =
          Maybe AvailabilityMonitorTestStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:startTime:DescribeAvailabilityMonitorTestResponse' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:gatewayARN:DescribeAvailabilityMonitorTestResponse' :: Maybe Text
gatewayARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeAvailabilityMonitorTestResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The status of the high availability monitoring test. If a test hasn\'t
-- been performed, the value of this field is null.
describeAvailabilityMonitorTestResponse_status :: Lens.Lens' DescribeAvailabilityMonitorTestResponse (Prelude.Maybe AvailabilityMonitorTestStatus)
describeAvailabilityMonitorTestResponse_status :: (Maybe AvailabilityMonitorTestStatus
 -> f (Maybe AvailabilityMonitorTestStatus))
-> DescribeAvailabilityMonitorTestResponse
-> f DescribeAvailabilityMonitorTestResponse
describeAvailabilityMonitorTestResponse_status = (DescribeAvailabilityMonitorTestResponse
 -> Maybe AvailabilityMonitorTestStatus)
-> (DescribeAvailabilityMonitorTestResponse
    -> Maybe AvailabilityMonitorTestStatus
    -> DescribeAvailabilityMonitorTestResponse)
-> Lens
     DescribeAvailabilityMonitorTestResponse
     DescribeAvailabilityMonitorTestResponse
     (Maybe AvailabilityMonitorTestStatus)
     (Maybe AvailabilityMonitorTestStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAvailabilityMonitorTestResponse' {Maybe AvailabilityMonitorTestStatus
status :: Maybe AvailabilityMonitorTestStatus
$sel:status:DescribeAvailabilityMonitorTestResponse' :: DescribeAvailabilityMonitorTestResponse
-> Maybe AvailabilityMonitorTestStatus
status} -> Maybe AvailabilityMonitorTestStatus
status) (\s :: DescribeAvailabilityMonitorTestResponse
s@DescribeAvailabilityMonitorTestResponse' {} Maybe AvailabilityMonitorTestStatus
a -> DescribeAvailabilityMonitorTestResponse
s {$sel:status:DescribeAvailabilityMonitorTestResponse' :: Maybe AvailabilityMonitorTestStatus
status = Maybe AvailabilityMonitorTestStatus
a} :: DescribeAvailabilityMonitorTestResponse)

-- | The time the high availability monitoring test was started. If a test
-- hasn\'t been performed, the value of this field is null.
describeAvailabilityMonitorTestResponse_startTime :: Lens.Lens' DescribeAvailabilityMonitorTestResponse (Prelude.Maybe Prelude.UTCTime)
describeAvailabilityMonitorTestResponse_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeAvailabilityMonitorTestResponse
-> f DescribeAvailabilityMonitorTestResponse
describeAvailabilityMonitorTestResponse_startTime = (DescribeAvailabilityMonitorTestResponse -> Maybe POSIX)
-> (DescribeAvailabilityMonitorTestResponse
    -> Maybe POSIX -> DescribeAvailabilityMonitorTestResponse)
-> Lens
     DescribeAvailabilityMonitorTestResponse
     DescribeAvailabilityMonitorTestResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAvailabilityMonitorTestResponse' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:DescribeAvailabilityMonitorTestResponse' :: DescribeAvailabilityMonitorTestResponse -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: DescribeAvailabilityMonitorTestResponse
s@DescribeAvailabilityMonitorTestResponse' {} Maybe POSIX
a -> DescribeAvailabilityMonitorTestResponse
s {$sel:startTime:DescribeAvailabilityMonitorTestResponse' :: Maybe POSIX
startTime = Maybe POSIX
a} :: DescribeAvailabilityMonitorTestResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeAvailabilityMonitorTestResponse
 -> f DescribeAvailabilityMonitorTestResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeAvailabilityMonitorTestResponse
-> f DescribeAvailabilityMonitorTestResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

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

instance
  Prelude.NFData
    DescribeAvailabilityMonitorTestResponse