{-# 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.IoTSiteWise.DescribeGateway
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves information about a gateway.
module Amazonka.IoTSiteWise.DescribeGateway
  ( -- * Creating a Request
    DescribeGateway (..),
    newDescribeGateway,

    -- * Request Lenses
    describeGateway_gatewayId,

    -- * Destructuring the Response
    DescribeGatewayResponse (..),
    newDescribeGatewayResponse,

    -- * Response Lenses
    describeGatewayResponse_gatewayPlatform,
    describeGatewayResponse_httpStatus,
    describeGatewayResponse_gatewayId,
    describeGatewayResponse_gatewayName,
    describeGatewayResponse_gatewayArn,
    describeGatewayResponse_gatewayCapabilitySummaries,
    describeGatewayResponse_creationDate,
    describeGatewayResponse_lastUpdateDate,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTSiteWise.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

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

-- |
-- Create a value of 'DescribeGateway' 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:
--
-- 'gatewayId', 'describeGateway_gatewayId' - The ID of the gateway device.
newDescribeGateway ::
  -- | 'gatewayId'
  Prelude.Text ->
  DescribeGateway
newDescribeGateway :: Text -> DescribeGateway
newDescribeGateway Text
pGatewayId_ =
  DescribeGateway' {$sel:gatewayId:DescribeGateway' :: Text
gatewayId = Text
pGatewayId_}

-- | The ID of the gateway device.
describeGateway_gatewayId :: Lens.Lens' DescribeGateway Prelude.Text
describeGateway_gatewayId :: Lens' DescribeGateway Text
describeGateway_gatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGateway' {Text
gatewayId :: Text
$sel:gatewayId:DescribeGateway' :: DescribeGateway -> Text
gatewayId} -> Text
gatewayId) (\s :: DescribeGateway
s@DescribeGateway' {} Text
a -> DescribeGateway
s {$sel:gatewayId:DescribeGateway' :: Text
gatewayId = Text
a} :: DescribeGateway)

instance Core.AWSRequest DescribeGateway where
  type
    AWSResponse DescribeGateway =
      DescribeGatewayResponse
  request :: (Service -> Service) -> DescribeGateway -> Request DescribeGateway
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeGateway
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeGateway)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe GatewayPlatform
-> Int
-> Text
-> Text
-> Text
-> [GatewayCapabilitySummary]
-> POSIX
-> POSIX
-> DescribeGatewayResponse
DescribeGatewayResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"gatewayPlatform")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"gatewayId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"gatewayName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"gatewayArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"gatewayCapabilitySummaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"creationDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"lastUpdateDate")
      )

instance Prelude.Hashable DescribeGateway where
  hashWithSalt :: Int -> DescribeGateway -> Int
hashWithSalt Int
_salt DescribeGateway' {Text
gatewayId :: Text
$sel:gatewayId:DescribeGateway' :: DescribeGateway -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
gatewayId

instance Prelude.NFData DescribeGateway where
  rnf :: DescribeGateway -> ()
rnf DescribeGateway' {Text
gatewayId :: Text
$sel:gatewayId:DescribeGateway' :: DescribeGateway -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
gatewayId

instance Data.ToHeaders DescribeGateway where
  toHeaders :: DescribeGateway -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath DescribeGateway where
  toPath :: DescribeGateway -> ByteString
toPath DescribeGateway' {Text
gatewayId :: Text
$sel:gatewayId:DescribeGateway' :: DescribeGateway -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/20200301/gateways/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
gatewayId]

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

-- | /See:/ 'newDescribeGatewayResponse' smart constructor.
data DescribeGatewayResponse = DescribeGatewayResponse'
  { -- | The gateway\'s platform.
    DescribeGatewayResponse -> Maybe GatewayPlatform
gatewayPlatform :: Prelude.Maybe GatewayPlatform,
    -- | The response's http status code.
    DescribeGatewayResponse -> Int
httpStatus :: Prelude.Int,
    -- | The ID of the gateway device.
    DescribeGatewayResponse -> Text
gatewayId :: Prelude.Text,
    -- | The name of the gateway.
    DescribeGatewayResponse -> Text
gatewayName :: Prelude.Text,
    -- | The
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
    -- of the gateway, which has the following format.
    --
    -- @arn:${Partition}:iotsitewise:${Region}:${Account}:gateway\/${GatewayId}@
    DescribeGatewayResponse -> Text
gatewayArn :: Prelude.Text,
    -- | A list of gateway capability summaries that each contain a namespace and
    -- status. Each gateway capability defines data sources for the gateway. To
    -- retrieve a capability configuration\'s definition, use
    -- <https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeGatewayCapabilityConfiguration.html DescribeGatewayCapabilityConfiguration>.
    DescribeGatewayResponse -> [GatewayCapabilitySummary]
gatewayCapabilitySummaries :: [GatewayCapabilitySummary],
    -- | The date the gateway was created, in Unix epoch time.
    DescribeGatewayResponse -> POSIX
creationDate :: Data.POSIX,
    -- | The date the gateway was last updated, in Unix epoch time.
    DescribeGatewayResponse -> POSIX
lastUpdateDate :: Data.POSIX
  }
  deriving (DescribeGatewayResponse -> DescribeGatewayResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGatewayResponse -> DescribeGatewayResponse -> Bool
$c/= :: DescribeGatewayResponse -> DescribeGatewayResponse -> Bool
== :: DescribeGatewayResponse -> DescribeGatewayResponse -> Bool
$c== :: DescribeGatewayResponse -> DescribeGatewayResponse -> Bool
Prelude.Eq, ReadPrec [DescribeGatewayResponse]
ReadPrec DescribeGatewayResponse
Int -> ReadS DescribeGatewayResponse
ReadS [DescribeGatewayResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGatewayResponse]
$creadListPrec :: ReadPrec [DescribeGatewayResponse]
readPrec :: ReadPrec DescribeGatewayResponse
$creadPrec :: ReadPrec DescribeGatewayResponse
readList :: ReadS [DescribeGatewayResponse]
$creadList :: ReadS [DescribeGatewayResponse]
readsPrec :: Int -> ReadS DescribeGatewayResponse
$creadsPrec :: Int -> ReadS DescribeGatewayResponse
Prelude.Read, Int -> DescribeGatewayResponse -> ShowS
[DescribeGatewayResponse] -> ShowS
DescribeGatewayResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGatewayResponse] -> ShowS
$cshowList :: [DescribeGatewayResponse] -> ShowS
show :: DescribeGatewayResponse -> String
$cshow :: DescribeGatewayResponse -> String
showsPrec :: Int -> DescribeGatewayResponse -> ShowS
$cshowsPrec :: Int -> DescribeGatewayResponse -> ShowS
Prelude.Show, forall x. Rep DescribeGatewayResponse x -> DescribeGatewayResponse
forall x. DescribeGatewayResponse -> Rep DescribeGatewayResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeGatewayResponse x -> DescribeGatewayResponse
$cfrom :: forall x. DescribeGatewayResponse -> Rep DescribeGatewayResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeGatewayResponse' 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:
--
-- 'gatewayPlatform', 'describeGatewayResponse_gatewayPlatform' - The gateway\'s platform.
--
-- 'httpStatus', 'describeGatewayResponse_httpStatus' - The response's http status code.
--
-- 'gatewayId', 'describeGatewayResponse_gatewayId' - The ID of the gateway device.
--
-- 'gatewayName', 'describeGatewayResponse_gatewayName' - The name of the gateway.
--
-- 'gatewayArn', 'describeGatewayResponse_gatewayArn' - The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the gateway, which has the following format.
--
-- @arn:${Partition}:iotsitewise:${Region}:${Account}:gateway\/${GatewayId}@
--
-- 'gatewayCapabilitySummaries', 'describeGatewayResponse_gatewayCapabilitySummaries' - A list of gateway capability summaries that each contain a namespace and
-- status. Each gateway capability defines data sources for the gateway. To
-- retrieve a capability configuration\'s definition, use
-- <https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeGatewayCapabilityConfiguration.html DescribeGatewayCapabilityConfiguration>.
--
-- 'creationDate', 'describeGatewayResponse_creationDate' - The date the gateway was created, in Unix epoch time.
--
-- 'lastUpdateDate', 'describeGatewayResponse_lastUpdateDate' - The date the gateway was last updated, in Unix epoch time.
newDescribeGatewayResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'gatewayId'
  Prelude.Text ->
  -- | 'gatewayName'
  Prelude.Text ->
  -- | 'gatewayArn'
  Prelude.Text ->
  -- | 'creationDate'
  Prelude.UTCTime ->
  -- | 'lastUpdateDate'
  Prelude.UTCTime ->
  DescribeGatewayResponse
newDescribeGatewayResponse :: Int
-> Text
-> Text
-> Text
-> UTCTime
-> UTCTime
-> DescribeGatewayResponse
newDescribeGatewayResponse
  Int
pHttpStatus_
  Text
pGatewayId_
  Text
pGatewayName_
  Text
pGatewayArn_
  UTCTime
pCreationDate_
  UTCTime
pLastUpdateDate_ =
    DescribeGatewayResponse'
      { $sel:gatewayPlatform:DescribeGatewayResponse' :: Maybe GatewayPlatform
gatewayPlatform =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeGatewayResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:gatewayId:DescribeGatewayResponse' :: Text
gatewayId = Text
pGatewayId_,
        $sel:gatewayName:DescribeGatewayResponse' :: Text
gatewayName = Text
pGatewayName_,
        $sel:gatewayArn:DescribeGatewayResponse' :: Text
gatewayArn = Text
pGatewayArn_,
        $sel:gatewayCapabilitySummaries:DescribeGatewayResponse' :: [GatewayCapabilitySummary]
gatewayCapabilitySummaries = forall a. Monoid a => a
Prelude.mempty,
        $sel:creationDate:DescribeGatewayResponse' :: POSIX
creationDate = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationDate_,
        $sel:lastUpdateDate:DescribeGatewayResponse' :: POSIX
lastUpdateDate =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdateDate_
      }

-- | The gateway\'s platform.
describeGatewayResponse_gatewayPlatform :: Lens.Lens' DescribeGatewayResponse (Prelude.Maybe GatewayPlatform)
describeGatewayResponse_gatewayPlatform :: Lens' DescribeGatewayResponse (Maybe GatewayPlatform)
describeGatewayResponse_gatewayPlatform = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayResponse' {Maybe GatewayPlatform
gatewayPlatform :: Maybe GatewayPlatform
$sel:gatewayPlatform:DescribeGatewayResponse' :: DescribeGatewayResponse -> Maybe GatewayPlatform
gatewayPlatform} -> Maybe GatewayPlatform
gatewayPlatform) (\s :: DescribeGatewayResponse
s@DescribeGatewayResponse' {} Maybe GatewayPlatform
a -> DescribeGatewayResponse
s {$sel:gatewayPlatform:DescribeGatewayResponse' :: Maybe GatewayPlatform
gatewayPlatform = Maybe GatewayPlatform
a} :: DescribeGatewayResponse)

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

-- | The ID of the gateway device.
describeGatewayResponse_gatewayId :: Lens.Lens' DescribeGatewayResponse Prelude.Text
describeGatewayResponse_gatewayId :: Lens' DescribeGatewayResponse Text
describeGatewayResponse_gatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayResponse' {Text
gatewayId :: Text
$sel:gatewayId:DescribeGatewayResponse' :: DescribeGatewayResponse -> Text
gatewayId} -> Text
gatewayId) (\s :: DescribeGatewayResponse
s@DescribeGatewayResponse' {} Text
a -> DescribeGatewayResponse
s {$sel:gatewayId:DescribeGatewayResponse' :: Text
gatewayId = Text
a} :: DescribeGatewayResponse)

-- | The name of the gateway.
describeGatewayResponse_gatewayName :: Lens.Lens' DescribeGatewayResponse Prelude.Text
describeGatewayResponse_gatewayName :: Lens' DescribeGatewayResponse Text
describeGatewayResponse_gatewayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayResponse' {Text
gatewayName :: Text
$sel:gatewayName:DescribeGatewayResponse' :: DescribeGatewayResponse -> Text
gatewayName} -> Text
gatewayName) (\s :: DescribeGatewayResponse
s@DescribeGatewayResponse' {} Text
a -> DescribeGatewayResponse
s {$sel:gatewayName:DescribeGatewayResponse' :: Text
gatewayName = Text
a} :: DescribeGatewayResponse)

-- | The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the gateway, which has the following format.
--
-- @arn:${Partition}:iotsitewise:${Region}:${Account}:gateway\/${GatewayId}@
describeGatewayResponse_gatewayArn :: Lens.Lens' DescribeGatewayResponse Prelude.Text
describeGatewayResponse_gatewayArn :: Lens' DescribeGatewayResponse Text
describeGatewayResponse_gatewayArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayResponse' {Text
gatewayArn :: Text
$sel:gatewayArn:DescribeGatewayResponse' :: DescribeGatewayResponse -> Text
gatewayArn} -> Text
gatewayArn) (\s :: DescribeGatewayResponse
s@DescribeGatewayResponse' {} Text
a -> DescribeGatewayResponse
s {$sel:gatewayArn:DescribeGatewayResponse' :: Text
gatewayArn = Text
a} :: DescribeGatewayResponse)

-- | A list of gateway capability summaries that each contain a namespace and
-- status. Each gateway capability defines data sources for the gateway. To
-- retrieve a capability configuration\'s definition, use
-- <https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeGatewayCapabilityConfiguration.html DescribeGatewayCapabilityConfiguration>.
describeGatewayResponse_gatewayCapabilitySummaries :: Lens.Lens' DescribeGatewayResponse [GatewayCapabilitySummary]
describeGatewayResponse_gatewayCapabilitySummaries :: Lens' DescribeGatewayResponse [GatewayCapabilitySummary]
describeGatewayResponse_gatewayCapabilitySummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayResponse' {[GatewayCapabilitySummary]
gatewayCapabilitySummaries :: [GatewayCapabilitySummary]
$sel:gatewayCapabilitySummaries:DescribeGatewayResponse' :: DescribeGatewayResponse -> [GatewayCapabilitySummary]
gatewayCapabilitySummaries} -> [GatewayCapabilitySummary]
gatewayCapabilitySummaries) (\s :: DescribeGatewayResponse
s@DescribeGatewayResponse' {} [GatewayCapabilitySummary]
a -> DescribeGatewayResponse
s {$sel:gatewayCapabilitySummaries:DescribeGatewayResponse' :: [GatewayCapabilitySummary]
gatewayCapabilitySummaries = [GatewayCapabilitySummary]
a} :: DescribeGatewayResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The date the gateway was created, in Unix epoch time.
describeGatewayResponse_creationDate :: Lens.Lens' DescribeGatewayResponse Prelude.UTCTime
describeGatewayResponse_creationDate :: Lens' DescribeGatewayResponse UTCTime
describeGatewayResponse_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayResponse' {POSIX
creationDate :: POSIX
$sel:creationDate:DescribeGatewayResponse' :: DescribeGatewayResponse -> POSIX
creationDate} -> POSIX
creationDate) (\s :: DescribeGatewayResponse
s@DescribeGatewayResponse' {} POSIX
a -> DescribeGatewayResponse
s {$sel:creationDate:DescribeGatewayResponse' :: POSIX
creationDate = POSIX
a} :: DescribeGatewayResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The date the gateway was last updated, in Unix epoch time.
describeGatewayResponse_lastUpdateDate :: Lens.Lens' DescribeGatewayResponse Prelude.UTCTime
describeGatewayResponse_lastUpdateDate :: Lens' DescribeGatewayResponse UTCTime
describeGatewayResponse_lastUpdateDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayResponse' {POSIX
lastUpdateDate :: POSIX
$sel:lastUpdateDate:DescribeGatewayResponse' :: DescribeGatewayResponse -> POSIX
lastUpdateDate} -> POSIX
lastUpdateDate) (\s :: DescribeGatewayResponse
s@DescribeGatewayResponse' {} POSIX
a -> DescribeGatewayResponse
s {$sel:lastUpdateDate:DescribeGatewayResponse' :: POSIX
lastUpdateDate = POSIX
a} :: DescribeGatewayResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Prelude.NFData DescribeGatewayResponse where
  rnf :: DescribeGatewayResponse -> ()
rnf DescribeGatewayResponse' {Int
[GatewayCapabilitySummary]
Maybe GatewayPlatform
Text
POSIX
lastUpdateDate :: POSIX
creationDate :: POSIX
gatewayCapabilitySummaries :: [GatewayCapabilitySummary]
gatewayArn :: Text
gatewayName :: Text
gatewayId :: Text
httpStatus :: Int
gatewayPlatform :: Maybe GatewayPlatform
$sel:lastUpdateDate:DescribeGatewayResponse' :: DescribeGatewayResponse -> POSIX
$sel:creationDate:DescribeGatewayResponse' :: DescribeGatewayResponse -> POSIX
$sel:gatewayCapabilitySummaries:DescribeGatewayResponse' :: DescribeGatewayResponse -> [GatewayCapabilitySummary]
$sel:gatewayArn:DescribeGatewayResponse' :: DescribeGatewayResponse -> Text
$sel:gatewayName:DescribeGatewayResponse' :: DescribeGatewayResponse -> Text
$sel:gatewayId:DescribeGatewayResponse' :: DescribeGatewayResponse -> Text
$sel:httpStatus:DescribeGatewayResponse' :: DescribeGatewayResponse -> Int
$sel:gatewayPlatform:DescribeGatewayResponse' :: DescribeGatewayResponse -> Maybe GatewayPlatform
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe GatewayPlatform
gatewayPlatform
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
gatewayId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
gatewayName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
gatewayArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [GatewayCapabilitySummary]
gatewayCapabilitySummaries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastUpdateDate