{-# 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-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)
--
-- 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 Amazonka.IoTSiteWise.Types
import qualified Amazonka.Lens as Lens
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
(DescribeGateway -> DescribeGateway -> Bool)
-> (DescribeGateway -> DescribeGateway -> Bool)
-> Eq DescribeGateway
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]
(Int -> ReadS DescribeGateway)
-> ReadS [DescribeGateway]
-> ReadPrec DescribeGateway
-> ReadPrec [DescribeGateway]
-> Read 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
(Int -> DescribeGateway -> ShowS)
-> (DescribeGateway -> String)
-> ([DescribeGateway] -> ShowS)
-> Show DescribeGateway
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. DescribeGateway -> Rep DescribeGateway x)
-> (forall x. Rep DescribeGateway x -> DescribeGateway)
-> Generic DescribeGateway
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' :: Text -> DescribeGateway
DescribeGateway' {$sel:gatewayId:DescribeGateway' :: Text
gatewayId = Text
pGatewayId_}

-- | The ID of the gateway device.
describeGateway_gatewayId :: Lens.Lens' DescribeGateway Prelude.Text
describeGateway_gatewayId :: (Text -> f Text) -> DescribeGateway -> f DescribeGateway
describeGateway_gatewayId = (DescribeGateway -> Text)
-> (DescribeGateway -> Text -> DescribeGateway)
-> Lens DescribeGateway DescribeGateway Text Text
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 :: DescribeGateway -> Request DescribeGateway
request = Service -> DescribeGateway -> Request DescribeGateway
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeGateway
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeGateway)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeGateway))
-> Logger
-> Service
-> Proxy DescribeGateway
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeGateway)))
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 GatewayPlatform
-> Int
-> Text
-> Text
-> Text
-> [GatewayCapabilitySummary]
-> POSIX
-> POSIX
-> DescribeGatewayResponse
DescribeGatewayResponse'
            (Maybe GatewayPlatform
 -> Int
 -> Text
 -> Text
 -> Text
 -> [GatewayCapabilitySummary]
 -> POSIX
 -> POSIX
 -> DescribeGatewayResponse)
-> Either String (Maybe GatewayPlatform)
-> Either
     String
     (Int
      -> Text
      -> Text
      -> Text
      -> [GatewayCapabilitySummary]
      -> POSIX
      -> POSIX
      -> DescribeGatewayResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe GatewayPlatform)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"gatewayPlatform")
            Either
  String
  (Int
   -> Text
   -> Text
   -> Text
   -> [GatewayCapabilitySummary]
   -> POSIX
   -> POSIX
   -> DescribeGatewayResponse)
-> Either String Int
-> Either
     String
     (Text
      -> Text
      -> Text
      -> [GatewayCapabilitySummary]
      -> POSIX
      -> POSIX
      -> DescribeGatewayResponse)
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))
            Either
  String
  (Text
   -> Text
   -> Text
   -> [GatewayCapabilitySummary]
   -> POSIX
   -> POSIX
   -> DescribeGatewayResponse)
-> Either String Text
-> Either
     String
     (Text
      -> Text
      -> [GatewayCapabilitySummary]
      -> POSIX
      -> POSIX
      -> DescribeGatewayResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"gatewayId")
            Either
  String
  (Text
   -> Text
   -> [GatewayCapabilitySummary]
   -> POSIX
   -> POSIX
   -> DescribeGatewayResponse)
-> Either String Text
-> Either
     String
     (Text
      -> [GatewayCapabilitySummary]
      -> POSIX
      -> POSIX
      -> DescribeGatewayResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"gatewayName")
            Either
  String
  (Text
   -> [GatewayCapabilitySummary]
   -> POSIX
   -> POSIX
   -> DescribeGatewayResponse)
-> Either String Text
-> Either
     String
     ([GatewayCapabilitySummary]
      -> POSIX -> POSIX -> DescribeGatewayResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"gatewayArn")
            Either
  String
  ([GatewayCapabilitySummary]
   -> POSIX -> POSIX -> DescribeGatewayResponse)
-> Either String [GatewayCapabilitySummary]
-> Either String (POSIX -> POSIX -> DescribeGatewayResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [GatewayCapabilitySummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"gatewayCapabilitySummaries"
                            Either String (Maybe [GatewayCapabilitySummary])
-> [GatewayCapabilitySummary]
-> Either String [GatewayCapabilitySummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [GatewayCapabilitySummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (POSIX -> POSIX -> DescribeGatewayResponse)
-> Either String POSIX
-> Either String (POSIX -> DescribeGatewayResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"creationDate")
            Either String (POSIX -> DescribeGatewayResponse)
-> Either String POSIX -> Either String DescribeGatewayResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"lastUpdateDate")
      )

instance Prelude.Hashable DescribeGateway

instance Prelude.NFData DescribeGateway

instance Core.ToHeaders DescribeGateway where
  toHeaders :: DescribeGateway -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeGateway -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath DescribeGateway where
  toPath :: DescribeGateway -> ByteString
toPath DescribeGateway' {Text
gatewayId :: Text
$sel:gatewayId:DescribeGateway' :: DescribeGateway -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/20200301/gateways/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
gatewayId]

instance Core.ToQuery DescribeGateway where
  toQuery :: DescribeGateway -> QueryString
toQuery = QueryString -> DescribeGateway -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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 :: Core.POSIX,
    -- | The date the gateway was last updated, in Unix epoch time.
    DescribeGatewayResponse -> POSIX
lastUpdateDate :: Core.POSIX
  }
  deriving (DescribeGatewayResponse -> DescribeGatewayResponse -> Bool
(DescribeGatewayResponse -> DescribeGatewayResponse -> Bool)
-> (DescribeGatewayResponse -> DescribeGatewayResponse -> Bool)
-> Eq DescribeGatewayResponse
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]
(Int -> ReadS DescribeGatewayResponse)
-> ReadS [DescribeGatewayResponse]
-> ReadPrec DescribeGatewayResponse
-> ReadPrec [DescribeGatewayResponse]
-> Read 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
(Int -> DescribeGatewayResponse -> ShowS)
-> (DescribeGatewayResponse -> String)
-> ([DescribeGatewayResponse] -> ShowS)
-> Show DescribeGatewayResponse
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.
 DescribeGatewayResponse -> Rep DescribeGatewayResponse x)
-> (forall x.
    Rep DescribeGatewayResponse x -> DescribeGatewayResponse)
-> Generic DescribeGatewayResponse
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' :: Maybe GatewayPlatform
-> Int
-> Text
-> Text
-> Text
-> [GatewayCapabilitySummary]
-> POSIX
-> POSIX
-> DescribeGatewayResponse
DescribeGatewayResponse'
      { $sel:gatewayPlatform:DescribeGatewayResponse' :: Maybe GatewayPlatform
gatewayPlatform =
          Maybe 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 = [GatewayCapabilitySummary]
forall a. Monoid a => a
Prelude.mempty,
        $sel:creationDate:DescribeGatewayResponse' :: POSIX
creationDate = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationDate_,
        $sel:lastUpdateDate:DescribeGatewayResponse' :: POSIX
lastUpdateDate =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
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 :: (Maybe GatewayPlatform -> f (Maybe GatewayPlatform))
-> DescribeGatewayResponse -> f DescribeGatewayResponse
describeGatewayResponse_gatewayPlatform = (DescribeGatewayResponse -> Maybe GatewayPlatform)
-> (DescribeGatewayResponse
    -> Maybe GatewayPlatform -> DescribeGatewayResponse)
-> Lens
     DescribeGatewayResponse
     DescribeGatewayResponse
     (Maybe GatewayPlatform)
     (Maybe 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 :: (Int -> f Int)
-> DescribeGatewayResponse -> f DescribeGatewayResponse
describeGatewayResponse_httpStatus = (DescribeGatewayResponse -> Int)
-> (DescribeGatewayResponse -> Int -> DescribeGatewayResponse)
-> Lens DescribeGatewayResponse DescribeGatewayResponse Int Int
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 :: (Text -> f Text)
-> DescribeGatewayResponse -> f DescribeGatewayResponse
describeGatewayResponse_gatewayId = (DescribeGatewayResponse -> Text)
-> (DescribeGatewayResponse -> Text -> DescribeGatewayResponse)
-> Lens DescribeGatewayResponse DescribeGatewayResponse Text Text
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 :: (Text -> f Text)
-> DescribeGatewayResponse -> f DescribeGatewayResponse
describeGatewayResponse_gatewayName = (DescribeGatewayResponse -> Text)
-> (DescribeGatewayResponse -> Text -> DescribeGatewayResponse)
-> Lens DescribeGatewayResponse DescribeGatewayResponse Text Text
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 :: (Text -> f Text)
-> DescribeGatewayResponse -> f DescribeGatewayResponse
describeGatewayResponse_gatewayArn = (DescribeGatewayResponse -> Text)
-> (DescribeGatewayResponse -> Text -> DescribeGatewayResponse)
-> Lens DescribeGatewayResponse DescribeGatewayResponse Text Text
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 :: ([GatewayCapabilitySummary] -> f [GatewayCapabilitySummary])
-> DescribeGatewayResponse -> f DescribeGatewayResponse
describeGatewayResponse_gatewayCapabilitySummaries = (DescribeGatewayResponse -> [GatewayCapabilitySummary])
-> (DescribeGatewayResponse
    -> [GatewayCapabilitySummary] -> DescribeGatewayResponse)
-> Lens
     DescribeGatewayResponse
     DescribeGatewayResponse
     [GatewayCapabilitySummary]
     [GatewayCapabilitySummary]
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) (([GatewayCapabilitySummary] -> f [GatewayCapabilitySummary])
 -> DescribeGatewayResponse -> f DescribeGatewayResponse)
-> (([GatewayCapabilitySummary] -> f [GatewayCapabilitySummary])
    -> [GatewayCapabilitySummary] -> f [GatewayCapabilitySummary])
-> ([GatewayCapabilitySummary] -> f [GatewayCapabilitySummary])
-> DescribeGatewayResponse
-> f DescribeGatewayResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([GatewayCapabilitySummary] -> f [GatewayCapabilitySummary])
-> [GatewayCapabilitySummary] -> f [GatewayCapabilitySummary]
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 :: (UTCTime -> f UTCTime)
-> DescribeGatewayResponse -> f DescribeGatewayResponse
describeGatewayResponse_creationDate = (DescribeGatewayResponse -> POSIX)
-> (DescribeGatewayResponse -> POSIX -> DescribeGatewayResponse)
-> Lens DescribeGatewayResponse DescribeGatewayResponse POSIX POSIX
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) ((POSIX -> f POSIX)
 -> DescribeGatewayResponse -> f DescribeGatewayResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeGatewayResponse
-> f DescribeGatewayResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The date the gateway was last updated, in Unix epoch time.
describeGatewayResponse_lastUpdateDate :: Lens.Lens' DescribeGatewayResponse Prelude.UTCTime
describeGatewayResponse_lastUpdateDate :: (UTCTime -> f UTCTime)
-> DescribeGatewayResponse -> f DescribeGatewayResponse
describeGatewayResponse_lastUpdateDate = (DescribeGatewayResponse -> POSIX)
-> (DescribeGatewayResponse -> POSIX -> DescribeGatewayResponse)
-> Lens DescribeGatewayResponse DescribeGatewayResponse POSIX POSIX
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) ((POSIX -> f POSIX)
 -> DescribeGatewayResponse -> f DescribeGatewayResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeGatewayResponse
-> f DescribeGatewayResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Prelude.NFData DescribeGatewayResponse