{-# 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.DescribeGatewayCapabilityConfiguration
-- 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 capability configuration. Each
-- gateway capability defines data sources for a gateway. A capability
-- configuration can contain multiple data source configurations. If you
-- define OPC-UA sources for a gateway in the IoT SiteWise console, all of
-- your OPC-UA sources are stored in one capability configuration. To list
-- all capability configurations for a gateway, use
-- <https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeGateway.html DescribeGateway>.
module Amazonka.IoTSiteWise.DescribeGatewayCapabilityConfiguration
  ( -- * Creating a Request
    DescribeGatewayCapabilityConfiguration (..),
    newDescribeGatewayCapabilityConfiguration,

    -- * Request Lenses
    describeGatewayCapabilityConfiguration_gatewayId,
    describeGatewayCapabilityConfiguration_capabilityNamespace,

    -- * Destructuring the Response
    DescribeGatewayCapabilityConfigurationResponse (..),
    newDescribeGatewayCapabilityConfigurationResponse,

    -- * Response Lenses
    describeGatewayCapabilityConfigurationResponse_httpStatus,
    describeGatewayCapabilityConfigurationResponse_gatewayId,
    describeGatewayCapabilityConfigurationResponse_capabilityNamespace,
    describeGatewayCapabilityConfigurationResponse_capabilityConfiguration,
    describeGatewayCapabilityConfigurationResponse_capabilitySyncStatus,
  )
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:/ 'newDescribeGatewayCapabilityConfiguration' smart constructor.
data DescribeGatewayCapabilityConfiguration = DescribeGatewayCapabilityConfiguration'
  { -- | The ID of the gateway that defines the capability configuration.
    DescribeGatewayCapabilityConfiguration -> Text
gatewayId :: Prelude.Text,
    -- | The namespace of the capability configuration. For example, if you
    -- configure OPC-UA sources from the IoT SiteWise console, your OPC-UA
    -- capability configuration has the namespace
    -- @iotsitewise:opcuacollector:version@, where @version@ is a number such
    -- as @1@.
    DescribeGatewayCapabilityConfiguration -> Text
capabilityNamespace :: Prelude.Text
  }
  deriving (DescribeGatewayCapabilityConfiguration
-> DescribeGatewayCapabilityConfiguration -> Bool
(DescribeGatewayCapabilityConfiguration
 -> DescribeGatewayCapabilityConfiguration -> Bool)
-> (DescribeGatewayCapabilityConfiguration
    -> DescribeGatewayCapabilityConfiguration -> Bool)
-> Eq DescribeGatewayCapabilityConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGatewayCapabilityConfiguration
-> DescribeGatewayCapabilityConfiguration -> Bool
$c/= :: DescribeGatewayCapabilityConfiguration
-> DescribeGatewayCapabilityConfiguration -> Bool
== :: DescribeGatewayCapabilityConfiguration
-> DescribeGatewayCapabilityConfiguration -> Bool
$c== :: DescribeGatewayCapabilityConfiguration
-> DescribeGatewayCapabilityConfiguration -> Bool
Prelude.Eq, ReadPrec [DescribeGatewayCapabilityConfiguration]
ReadPrec DescribeGatewayCapabilityConfiguration
Int -> ReadS DescribeGatewayCapabilityConfiguration
ReadS [DescribeGatewayCapabilityConfiguration]
(Int -> ReadS DescribeGatewayCapabilityConfiguration)
-> ReadS [DescribeGatewayCapabilityConfiguration]
-> ReadPrec DescribeGatewayCapabilityConfiguration
-> ReadPrec [DescribeGatewayCapabilityConfiguration]
-> Read DescribeGatewayCapabilityConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGatewayCapabilityConfiguration]
$creadListPrec :: ReadPrec [DescribeGatewayCapabilityConfiguration]
readPrec :: ReadPrec DescribeGatewayCapabilityConfiguration
$creadPrec :: ReadPrec DescribeGatewayCapabilityConfiguration
readList :: ReadS [DescribeGatewayCapabilityConfiguration]
$creadList :: ReadS [DescribeGatewayCapabilityConfiguration]
readsPrec :: Int -> ReadS DescribeGatewayCapabilityConfiguration
$creadsPrec :: Int -> ReadS DescribeGatewayCapabilityConfiguration
Prelude.Read, Int -> DescribeGatewayCapabilityConfiguration -> ShowS
[DescribeGatewayCapabilityConfiguration] -> ShowS
DescribeGatewayCapabilityConfiguration -> String
(Int -> DescribeGatewayCapabilityConfiguration -> ShowS)
-> (DescribeGatewayCapabilityConfiguration -> String)
-> ([DescribeGatewayCapabilityConfiguration] -> ShowS)
-> Show DescribeGatewayCapabilityConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGatewayCapabilityConfiguration] -> ShowS
$cshowList :: [DescribeGatewayCapabilityConfiguration] -> ShowS
show :: DescribeGatewayCapabilityConfiguration -> String
$cshow :: DescribeGatewayCapabilityConfiguration -> String
showsPrec :: Int -> DescribeGatewayCapabilityConfiguration -> ShowS
$cshowsPrec :: Int -> DescribeGatewayCapabilityConfiguration -> ShowS
Prelude.Show, (forall x.
 DescribeGatewayCapabilityConfiguration
 -> Rep DescribeGatewayCapabilityConfiguration x)
-> (forall x.
    Rep DescribeGatewayCapabilityConfiguration x
    -> DescribeGatewayCapabilityConfiguration)
-> Generic DescribeGatewayCapabilityConfiguration
forall x.
Rep DescribeGatewayCapabilityConfiguration x
-> DescribeGatewayCapabilityConfiguration
forall x.
DescribeGatewayCapabilityConfiguration
-> Rep DescribeGatewayCapabilityConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeGatewayCapabilityConfiguration x
-> DescribeGatewayCapabilityConfiguration
$cfrom :: forall x.
DescribeGatewayCapabilityConfiguration
-> Rep DescribeGatewayCapabilityConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'DescribeGatewayCapabilityConfiguration' 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', 'describeGatewayCapabilityConfiguration_gatewayId' - The ID of the gateway that defines the capability configuration.
--
-- 'capabilityNamespace', 'describeGatewayCapabilityConfiguration_capabilityNamespace' - The namespace of the capability configuration. For example, if you
-- configure OPC-UA sources from the IoT SiteWise console, your OPC-UA
-- capability configuration has the namespace
-- @iotsitewise:opcuacollector:version@, where @version@ is a number such
-- as @1@.
newDescribeGatewayCapabilityConfiguration ::
  -- | 'gatewayId'
  Prelude.Text ->
  -- | 'capabilityNamespace'
  Prelude.Text ->
  DescribeGatewayCapabilityConfiguration
newDescribeGatewayCapabilityConfiguration :: Text -> Text -> DescribeGatewayCapabilityConfiguration
newDescribeGatewayCapabilityConfiguration
  Text
pGatewayId_
  Text
pCapabilityNamespace_ =
    DescribeGatewayCapabilityConfiguration' :: Text -> Text -> DescribeGatewayCapabilityConfiguration
DescribeGatewayCapabilityConfiguration'
      { $sel:gatewayId:DescribeGatewayCapabilityConfiguration' :: Text
gatewayId =
          Text
pGatewayId_,
        $sel:capabilityNamespace:DescribeGatewayCapabilityConfiguration' :: Text
capabilityNamespace =
          Text
pCapabilityNamespace_
      }

-- | The ID of the gateway that defines the capability configuration.
describeGatewayCapabilityConfiguration_gatewayId :: Lens.Lens' DescribeGatewayCapabilityConfiguration Prelude.Text
describeGatewayCapabilityConfiguration_gatewayId :: (Text -> f Text)
-> DescribeGatewayCapabilityConfiguration
-> f DescribeGatewayCapabilityConfiguration
describeGatewayCapabilityConfiguration_gatewayId = (DescribeGatewayCapabilityConfiguration -> Text)
-> (DescribeGatewayCapabilityConfiguration
    -> Text -> DescribeGatewayCapabilityConfiguration)
-> Lens
     DescribeGatewayCapabilityConfiguration
     DescribeGatewayCapabilityConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayCapabilityConfiguration' {Text
gatewayId :: Text
$sel:gatewayId:DescribeGatewayCapabilityConfiguration' :: DescribeGatewayCapabilityConfiguration -> Text
gatewayId} -> Text
gatewayId) (\s :: DescribeGatewayCapabilityConfiguration
s@DescribeGatewayCapabilityConfiguration' {} Text
a -> DescribeGatewayCapabilityConfiguration
s {$sel:gatewayId:DescribeGatewayCapabilityConfiguration' :: Text
gatewayId = Text
a} :: DescribeGatewayCapabilityConfiguration)

-- | The namespace of the capability configuration. For example, if you
-- configure OPC-UA sources from the IoT SiteWise console, your OPC-UA
-- capability configuration has the namespace
-- @iotsitewise:opcuacollector:version@, where @version@ is a number such
-- as @1@.
describeGatewayCapabilityConfiguration_capabilityNamespace :: Lens.Lens' DescribeGatewayCapabilityConfiguration Prelude.Text
describeGatewayCapabilityConfiguration_capabilityNamespace :: (Text -> f Text)
-> DescribeGatewayCapabilityConfiguration
-> f DescribeGatewayCapabilityConfiguration
describeGatewayCapabilityConfiguration_capabilityNamespace = (DescribeGatewayCapabilityConfiguration -> Text)
-> (DescribeGatewayCapabilityConfiguration
    -> Text -> DescribeGatewayCapabilityConfiguration)
-> Lens
     DescribeGatewayCapabilityConfiguration
     DescribeGatewayCapabilityConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayCapabilityConfiguration' {Text
capabilityNamespace :: Text
$sel:capabilityNamespace:DescribeGatewayCapabilityConfiguration' :: DescribeGatewayCapabilityConfiguration -> Text
capabilityNamespace} -> Text
capabilityNamespace) (\s :: DescribeGatewayCapabilityConfiguration
s@DescribeGatewayCapabilityConfiguration' {} Text
a -> DescribeGatewayCapabilityConfiguration
s {$sel:capabilityNamespace:DescribeGatewayCapabilityConfiguration' :: Text
capabilityNamespace = Text
a} :: DescribeGatewayCapabilityConfiguration)

instance
  Core.AWSRequest
    DescribeGatewayCapabilityConfiguration
  where
  type
    AWSResponse
      DescribeGatewayCapabilityConfiguration =
      DescribeGatewayCapabilityConfigurationResponse
  request :: DescribeGatewayCapabilityConfiguration
-> Request DescribeGatewayCapabilityConfiguration
request = Service
-> DescribeGatewayCapabilityConfiguration
-> Request DescribeGatewayCapabilityConfiguration
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeGatewayCapabilityConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeGatewayCapabilityConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse DescribeGatewayCapabilityConfiguration))
-> Logger
-> Service
-> Proxy DescribeGatewayCapabilityConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeGatewayCapabilityConfiguration)))
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 ->
          Int
-> Text
-> Text
-> Text
-> CapabilitySyncStatus
-> DescribeGatewayCapabilityConfigurationResponse
DescribeGatewayCapabilityConfigurationResponse'
            (Int
 -> Text
 -> Text
 -> Text
 -> CapabilitySyncStatus
 -> DescribeGatewayCapabilityConfigurationResponse)
-> Either String Int
-> Either
     String
     (Text
      -> Text
      -> Text
      -> CapabilitySyncStatus
      -> DescribeGatewayCapabilityConfigurationResponse)
forall (f :: * -> *) a b. Functor 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
   -> CapabilitySyncStatus
   -> DescribeGatewayCapabilityConfigurationResponse)
-> Either String Text
-> Either
     String
     (Text
      -> Text
      -> CapabilitySyncStatus
      -> DescribeGatewayCapabilityConfigurationResponse)
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
   -> CapabilitySyncStatus
   -> DescribeGatewayCapabilityConfigurationResponse)
-> Either String Text
-> Either
     String
     (Text
      -> CapabilitySyncStatus
      -> DescribeGatewayCapabilityConfigurationResponse)
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
"capabilityNamespace")
              Either
  String
  (Text
   -> CapabilitySyncStatus
   -> DescribeGatewayCapabilityConfigurationResponse)
-> Either String Text
-> Either
     String
     (CapabilitySyncStatus
      -> DescribeGatewayCapabilityConfigurationResponse)
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
"capabilityConfiguration")
              Either
  String
  (CapabilitySyncStatus
   -> DescribeGatewayCapabilityConfigurationResponse)
-> Either String CapabilitySyncStatus
-> Either String DescribeGatewayCapabilityConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String CapabilitySyncStatus
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"capabilitySyncStatus")
      )

instance
  Prelude.Hashable
    DescribeGatewayCapabilityConfiguration

instance
  Prelude.NFData
    DescribeGatewayCapabilityConfiguration

instance
  Core.ToHeaders
    DescribeGatewayCapabilityConfiguration
  where
  toHeaders :: DescribeGatewayCapabilityConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribeGatewayCapabilityConfiguration -> 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
    DescribeGatewayCapabilityConfiguration
  where
  toPath :: DescribeGatewayCapabilityConfiguration -> ByteString
toPath DescribeGatewayCapabilityConfiguration' {Text
capabilityNamespace :: Text
gatewayId :: Text
$sel:capabilityNamespace:DescribeGatewayCapabilityConfiguration' :: DescribeGatewayCapabilityConfiguration -> Text
$sel:gatewayId:DescribeGatewayCapabilityConfiguration' :: DescribeGatewayCapabilityConfiguration -> 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,
        ByteString
"/capability/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
capabilityNamespace
      ]

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

-- | /See:/ 'newDescribeGatewayCapabilityConfigurationResponse' smart constructor.
data DescribeGatewayCapabilityConfigurationResponse = DescribeGatewayCapabilityConfigurationResponse'
  { -- | The response's http status code.
    DescribeGatewayCapabilityConfigurationResponse -> Int
httpStatus :: Prelude.Int,
    -- | The ID of the gateway that defines the capability configuration.
    DescribeGatewayCapabilityConfigurationResponse -> Text
gatewayId :: Prelude.Text,
    -- | The namespace of the gateway capability.
    DescribeGatewayCapabilityConfigurationResponse -> Text
capabilityNamespace :: Prelude.Text,
    -- | The JSON document that defines the gateway capability\'s configuration.
    -- For more information, see
    -- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/configure-sources.html#configure-source-cli Configuring data sources (CLI)>
    -- in the /IoT SiteWise User Guide/.
    DescribeGatewayCapabilityConfigurationResponse -> Text
capabilityConfiguration :: Prelude.Text,
    -- | The synchronization status of the capability configuration. The sync
    -- status can be one of the following:
    --
    -- -   @IN_SYNC@ – The gateway is running the capability configuration.
    --
    -- -   @OUT_OF_SYNC@ – The gateway hasn\'t received the capability
    --     configuration.
    --
    -- -   @SYNC_FAILED@ – The gateway rejected the capability configuration.
    DescribeGatewayCapabilityConfigurationResponse
-> CapabilitySyncStatus
capabilitySyncStatus :: CapabilitySyncStatus
  }
  deriving (DescribeGatewayCapabilityConfigurationResponse
-> DescribeGatewayCapabilityConfigurationResponse -> Bool
(DescribeGatewayCapabilityConfigurationResponse
 -> DescribeGatewayCapabilityConfigurationResponse -> Bool)
-> (DescribeGatewayCapabilityConfigurationResponse
    -> DescribeGatewayCapabilityConfigurationResponse -> Bool)
-> Eq DescribeGatewayCapabilityConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeGatewayCapabilityConfigurationResponse
-> DescribeGatewayCapabilityConfigurationResponse -> Bool
$c/= :: DescribeGatewayCapabilityConfigurationResponse
-> DescribeGatewayCapabilityConfigurationResponse -> Bool
== :: DescribeGatewayCapabilityConfigurationResponse
-> DescribeGatewayCapabilityConfigurationResponse -> Bool
$c== :: DescribeGatewayCapabilityConfigurationResponse
-> DescribeGatewayCapabilityConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeGatewayCapabilityConfigurationResponse]
ReadPrec DescribeGatewayCapabilityConfigurationResponse
Int -> ReadS DescribeGatewayCapabilityConfigurationResponse
ReadS [DescribeGatewayCapabilityConfigurationResponse]
(Int -> ReadS DescribeGatewayCapabilityConfigurationResponse)
-> ReadS [DescribeGatewayCapabilityConfigurationResponse]
-> ReadPrec DescribeGatewayCapabilityConfigurationResponse
-> ReadPrec [DescribeGatewayCapabilityConfigurationResponse]
-> Read DescribeGatewayCapabilityConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeGatewayCapabilityConfigurationResponse]
$creadListPrec :: ReadPrec [DescribeGatewayCapabilityConfigurationResponse]
readPrec :: ReadPrec DescribeGatewayCapabilityConfigurationResponse
$creadPrec :: ReadPrec DescribeGatewayCapabilityConfigurationResponse
readList :: ReadS [DescribeGatewayCapabilityConfigurationResponse]
$creadList :: ReadS [DescribeGatewayCapabilityConfigurationResponse]
readsPrec :: Int -> ReadS DescribeGatewayCapabilityConfigurationResponse
$creadsPrec :: Int -> ReadS DescribeGatewayCapabilityConfigurationResponse
Prelude.Read, Int -> DescribeGatewayCapabilityConfigurationResponse -> ShowS
[DescribeGatewayCapabilityConfigurationResponse] -> ShowS
DescribeGatewayCapabilityConfigurationResponse -> String
(Int -> DescribeGatewayCapabilityConfigurationResponse -> ShowS)
-> (DescribeGatewayCapabilityConfigurationResponse -> String)
-> ([DescribeGatewayCapabilityConfigurationResponse] -> ShowS)
-> Show DescribeGatewayCapabilityConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeGatewayCapabilityConfigurationResponse] -> ShowS
$cshowList :: [DescribeGatewayCapabilityConfigurationResponse] -> ShowS
show :: DescribeGatewayCapabilityConfigurationResponse -> String
$cshow :: DescribeGatewayCapabilityConfigurationResponse -> String
showsPrec :: Int -> DescribeGatewayCapabilityConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DescribeGatewayCapabilityConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 DescribeGatewayCapabilityConfigurationResponse
 -> Rep DescribeGatewayCapabilityConfigurationResponse x)
-> (forall x.
    Rep DescribeGatewayCapabilityConfigurationResponse x
    -> DescribeGatewayCapabilityConfigurationResponse)
-> Generic DescribeGatewayCapabilityConfigurationResponse
forall x.
Rep DescribeGatewayCapabilityConfigurationResponse x
-> DescribeGatewayCapabilityConfigurationResponse
forall x.
DescribeGatewayCapabilityConfigurationResponse
-> Rep DescribeGatewayCapabilityConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeGatewayCapabilityConfigurationResponse x
-> DescribeGatewayCapabilityConfigurationResponse
$cfrom :: forall x.
DescribeGatewayCapabilityConfigurationResponse
-> Rep DescribeGatewayCapabilityConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeGatewayCapabilityConfigurationResponse' 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:
--
-- 'httpStatus', 'describeGatewayCapabilityConfigurationResponse_httpStatus' - The response's http status code.
--
-- 'gatewayId', 'describeGatewayCapabilityConfigurationResponse_gatewayId' - The ID of the gateway that defines the capability configuration.
--
-- 'capabilityNamespace', 'describeGatewayCapabilityConfigurationResponse_capabilityNamespace' - The namespace of the gateway capability.
--
-- 'capabilityConfiguration', 'describeGatewayCapabilityConfigurationResponse_capabilityConfiguration' - The JSON document that defines the gateway capability\'s configuration.
-- For more information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/configure-sources.html#configure-source-cli Configuring data sources (CLI)>
-- in the /IoT SiteWise User Guide/.
--
-- 'capabilitySyncStatus', 'describeGatewayCapabilityConfigurationResponse_capabilitySyncStatus' - The synchronization status of the capability configuration. The sync
-- status can be one of the following:
--
-- -   @IN_SYNC@ – The gateway is running the capability configuration.
--
-- -   @OUT_OF_SYNC@ – The gateway hasn\'t received the capability
--     configuration.
--
-- -   @SYNC_FAILED@ – The gateway rejected the capability configuration.
newDescribeGatewayCapabilityConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'gatewayId'
  Prelude.Text ->
  -- | 'capabilityNamespace'
  Prelude.Text ->
  -- | 'capabilityConfiguration'
  Prelude.Text ->
  -- | 'capabilitySyncStatus'
  CapabilitySyncStatus ->
  DescribeGatewayCapabilityConfigurationResponse
newDescribeGatewayCapabilityConfigurationResponse :: Int
-> Text
-> Text
-> Text
-> CapabilitySyncStatus
-> DescribeGatewayCapabilityConfigurationResponse
newDescribeGatewayCapabilityConfigurationResponse
  Int
pHttpStatus_
  Text
pGatewayId_
  Text
pCapabilityNamespace_
  Text
pCapabilityConfiguration_
  CapabilitySyncStatus
pCapabilitySyncStatus_ =
    DescribeGatewayCapabilityConfigurationResponse' :: Int
-> Text
-> Text
-> Text
-> CapabilitySyncStatus
-> DescribeGatewayCapabilityConfigurationResponse
DescribeGatewayCapabilityConfigurationResponse'
      { $sel:httpStatus:DescribeGatewayCapabilityConfigurationResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:gatewayId:DescribeGatewayCapabilityConfigurationResponse' :: Text
gatewayId = Text
pGatewayId_,
        $sel:capabilityNamespace:DescribeGatewayCapabilityConfigurationResponse' :: Text
capabilityNamespace =
          Text
pCapabilityNamespace_,
        $sel:capabilityConfiguration:DescribeGatewayCapabilityConfigurationResponse' :: Text
capabilityConfiguration =
          Text
pCapabilityConfiguration_,
        $sel:capabilitySyncStatus:DescribeGatewayCapabilityConfigurationResponse' :: CapabilitySyncStatus
capabilitySyncStatus =
          CapabilitySyncStatus
pCapabilitySyncStatus_
      }

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

-- | The ID of the gateway that defines the capability configuration.
describeGatewayCapabilityConfigurationResponse_gatewayId :: Lens.Lens' DescribeGatewayCapabilityConfigurationResponse Prelude.Text
describeGatewayCapabilityConfigurationResponse_gatewayId :: (Text -> f Text)
-> DescribeGatewayCapabilityConfigurationResponse
-> f DescribeGatewayCapabilityConfigurationResponse
describeGatewayCapabilityConfigurationResponse_gatewayId = (DescribeGatewayCapabilityConfigurationResponse -> Text)
-> (DescribeGatewayCapabilityConfigurationResponse
    -> Text -> DescribeGatewayCapabilityConfigurationResponse)
-> Lens
     DescribeGatewayCapabilityConfigurationResponse
     DescribeGatewayCapabilityConfigurationResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayCapabilityConfigurationResponse' {Text
gatewayId :: Text
$sel:gatewayId:DescribeGatewayCapabilityConfigurationResponse' :: DescribeGatewayCapabilityConfigurationResponse -> Text
gatewayId} -> Text
gatewayId) (\s :: DescribeGatewayCapabilityConfigurationResponse
s@DescribeGatewayCapabilityConfigurationResponse' {} Text
a -> DescribeGatewayCapabilityConfigurationResponse
s {$sel:gatewayId:DescribeGatewayCapabilityConfigurationResponse' :: Text
gatewayId = Text
a} :: DescribeGatewayCapabilityConfigurationResponse)

-- | The namespace of the gateway capability.
describeGatewayCapabilityConfigurationResponse_capabilityNamespace :: Lens.Lens' DescribeGatewayCapabilityConfigurationResponse Prelude.Text
describeGatewayCapabilityConfigurationResponse_capabilityNamespace :: (Text -> f Text)
-> DescribeGatewayCapabilityConfigurationResponse
-> f DescribeGatewayCapabilityConfigurationResponse
describeGatewayCapabilityConfigurationResponse_capabilityNamespace = (DescribeGatewayCapabilityConfigurationResponse -> Text)
-> (DescribeGatewayCapabilityConfigurationResponse
    -> Text -> DescribeGatewayCapabilityConfigurationResponse)
-> Lens
     DescribeGatewayCapabilityConfigurationResponse
     DescribeGatewayCapabilityConfigurationResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayCapabilityConfigurationResponse' {Text
capabilityNamespace :: Text
$sel:capabilityNamespace:DescribeGatewayCapabilityConfigurationResponse' :: DescribeGatewayCapabilityConfigurationResponse -> Text
capabilityNamespace} -> Text
capabilityNamespace) (\s :: DescribeGatewayCapabilityConfigurationResponse
s@DescribeGatewayCapabilityConfigurationResponse' {} Text
a -> DescribeGatewayCapabilityConfigurationResponse
s {$sel:capabilityNamespace:DescribeGatewayCapabilityConfigurationResponse' :: Text
capabilityNamespace = Text
a} :: DescribeGatewayCapabilityConfigurationResponse)

-- | The JSON document that defines the gateway capability\'s configuration.
-- For more information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/configure-sources.html#configure-source-cli Configuring data sources (CLI)>
-- in the /IoT SiteWise User Guide/.
describeGatewayCapabilityConfigurationResponse_capabilityConfiguration :: Lens.Lens' DescribeGatewayCapabilityConfigurationResponse Prelude.Text
describeGatewayCapabilityConfigurationResponse_capabilityConfiguration :: (Text -> f Text)
-> DescribeGatewayCapabilityConfigurationResponse
-> f DescribeGatewayCapabilityConfigurationResponse
describeGatewayCapabilityConfigurationResponse_capabilityConfiguration = (DescribeGatewayCapabilityConfigurationResponse -> Text)
-> (DescribeGatewayCapabilityConfigurationResponse
    -> Text -> DescribeGatewayCapabilityConfigurationResponse)
-> Lens
     DescribeGatewayCapabilityConfigurationResponse
     DescribeGatewayCapabilityConfigurationResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayCapabilityConfigurationResponse' {Text
capabilityConfiguration :: Text
$sel:capabilityConfiguration:DescribeGatewayCapabilityConfigurationResponse' :: DescribeGatewayCapabilityConfigurationResponse -> Text
capabilityConfiguration} -> Text
capabilityConfiguration) (\s :: DescribeGatewayCapabilityConfigurationResponse
s@DescribeGatewayCapabilityConfigurationResponse' {} Text
a -> DescribeGatewayCapabilityConfigurationResponse
s {$sel:capabilityConfiguration:DescribeGatewayCapabilityConfigurationResponse' :: Text
capabilityConfiguration = Text
a} :: DescribeGatewayCapabilityConfigurationResponse)

-- | The synchronization status of the capability configuration. The sync
-- status can be one of the following:
--
-- -   @IN_SYNC@ – The gateway is running the capability configuration.
--
-- -   @OUT_OF_SYNC@ – The gateway hasn\'t received the capability
--     configuration.
--
-- -   @SYNC_FAILED@ – The gateway rejected the capability configuration.
describeGatewayCapabilityConfigurationResponse_capabilitySyncStatus :: Lens.Lens' DescribeGatewayCapabilityConfigurationResponse CapabilitySyncStatus
describeGatewayCapabilityConfigurationResponse_capabilitySyncStatus :: (CapabilitySyncStatus -> f CapabilitySyncStatus)
-> DescribeGatewayCapabilityConfigurationResponse
-> f DescribeGatewayCapabilityConfigurationResponse
describeGatewayCapabilityConfigurationResponse_capabilitySyncStatus = (DescribeGatewayCapabilityConfigurationResponse
 -> CapabilitySyncStatus)
-> (DescribeGatewayCapabilityConfigurationResponse
    -> CapabilitySyncStatus
    -> DescribeGatewayCapabilityConfigurationResponse)
-> Lens
     DescribeGatewayCapabilityConfigurationResponse
     DescribeGatewayCapabilityConfigurationResponse
     CapabilitySyncStatus
     CapabilitySyncStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeGatewayCapabilityConfigurationResponse' {CapabilitySyncStatus
capabilitySyncStatus :: CapabilitySyncStatus
$sel:capabilitySyncStatus:DescribeGatewayCapabilityConfigurationResponse' :: DescribeGatewayCapabilityConfigurationResponse
-> CapabilitySyncStatus
capabilitySyncStatus} -> CapabilitySyncStatus
capabilitySyncStatus) (\s :: DescribeGatewayCapabilityConfigurationResponse
s@DescribeGatewayCapabilityConfigurationResponse' {} CapabilitySyncStatus
a -> DescribeGatewayCapabilityConfigurationResponse
s {$sel:capabilitySyncStatus:DescribeGatewayCapabilityConfigurationResponse' :: CapabilitySyncStatus
capabilitySyncStatus = CapabilitySyncStatus
a} :: DescribeGatewayCapabilityConfigurationResponse)

instance
  Prelude.NFData
    DescribeGatewayCapabilityConfigurationResponse