{-# 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.IoT.DescribeThingType
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about the specified thing type.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions DescribeThingType>
-- action.
module Amazonka.IoT.DescribeThingType
  ( -- * Creating a Request
    DescribeThingType (..),
    newDescribeThingType,

    -- * Request Lenses
    describeThingType_thingTypeName,

    -- * Destructuring the Response
    DescribeThingTypeResponse (..),
    newDescribeThingTypeResponse,

    -- * Response Lenses
    describeThingTypeResponse_thingTypeProperties,
    describeThingTypeResponse_thingTypeName,
    describeThingTypeResponse_thingTypeId,
    describeThingTypeResponse_thingTypeMetadata,
    describeThingTypeResponse_thingTypeArn,
    describeThingTypeResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.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

-- | The input for the DescribeThingType operation.
--
-- /See:/ 'newDescribeThingType' smart constructor.
data DescribeThingType = DescribeThingType'
  { -- | The name of the thing type.
    DescribeThingType -> Text
thingTypeName :: Prelude.Text
  }
  deriving (DescribeThingType -> DescribeThingType -> Bool
(DescribeThingType -> DescribeThingType -> Bool)
-> (DescribeThingType -> DescribeThingType -> Bool)
-> Eq DescribeThingType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeThingType -> DescribeThingType -> Bool
$c/= :: DescribeThingType -> DescribeThingType -> Bool
== :: DescribeThingType -> DescribeThingType -> Bool
$c== :: DescribeThingType -> DescribeThingType -> Bool
Prelude.Eq, ReadPrec [DescribeThingType]
ReadPrec DescribeThingType
Int -> ReadS DescribeThingType
ReadS [DescribeThingType]
(Int -> ReadS DescribeThingType)
-> ReadS [DescribeThingType]
-> ReadPrec DescribeThingType
-> ReadPrec [DescribeThingType]
-> Read DescribeThingType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeThingType]
$creadListPrec :: ReadPrec [DescribeThingType]
readPrec :: ReadPrec DescribeThingType
$creadPrec :: ReadPrec DescribeThingType
readList :: ReadS [DescribeThingType]
$creadList :: ReadS [DescribeThingType]
readsPrec :: Int -> ReadS DescribeThingType
$creadsPrec :: Int -> ReadS DescribeThingType
Prelude.Read, Int -> DescribeThingType -> ShowS
[DescribeThingType] -> ShowS
DescribeThingType -> String
(Int -> DescribeThingType -> ShowS)
-> (DescribeThingType -> String)
-> ([DescribeThingType] -> ShowS)
-> Show DescribeThingType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeThingType] -> ShowS
$cshowList :: [DescribeThingType] -> ShowS
show :: DescribeThingType -> String
$cshow :: DescribeThingType -> String
showsPrec :: Int -> DescribeThingType -> ShowS
$cshowsPrec :: Int -> DescribeThingType -> ShowS
Prelude.Show, (forall x. DescribeThingType -> Rep DescribeThingType x)
-> (forall x. Rep DescribeThingType x -> DescribeThingType)
-> Generic DescribeThingType
forall x. Rep DescribeThingType x -> DescribeThingType
forall x. DescribeThingType -> Rep DescribeThingType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeThingType x -> DescribeThingType
$cfrom :: forall x. DescribeThingType -> Rep DescribeThingType x
Prelude.Generic)

-- |
-- Create a value of 'DescribeThingType' 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:
--
-- 'thingTypeName', 'describeThingType_thingTypeName' - The name of the thing type.
newDescribeThingType ::
  -- | 'thingTypeName'
  Prelude.Text ->
  DescribeThingType
newDescribeThingType :: Text -> DescribeThingType
newDescribeThingType Text
pThingTypeName_ =
  DescribeThingType' :: Text -> DescribeThingType
DescribeThingType' {$sel:thingTypeName:DescribeThingType' :: Text
thingTypeName = Text
pThingTypeName_}

-- | The name of the thing type.
describeThingType_thingTypeName :: Lens.Lens' DescribeThingType Prelude.Text
describeThingType_thingTypeName :: (Text -> f Text) -> DescribeThingType -> f DescribeThingType
describeThingType_thingTypeName = (DescribeThingType -> Text)
-> (DescribeThingType -> Text -> DescribeThingType)
-> Lens DescribeThingType DescribeThingType Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThingType' {Text
thingTypeName :: Text
$sel:thingTypeName:DescribeThingType' :: DescribeThingType -> Text
thingTypeName} -> Text
thingTypeName) (\s :: DescribeThingType
s@DescribeThingType' {} Text
a -> DescribeThingType
s {$sel:thingTypeName:DescribeThingType' :: Text
thingTypeName = Text
a} :: DescribeThingType)

instance Core.AWSRequest DescribeThingType where
  type
    AWSResponse DescribeThingType =
      DescribeThingTypeResponse
  request :: DescribeThingType -> Request DescribeThingType
request = Service -> DescribeThingType -> Request DescribeThingType
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeThingType
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeThingType)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeThingType))
-> Logger
-> Service
-> Proxy DescribeThingType
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeThingType)))
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 ThingTypeProperties
-> Maybe Text
-> Maybe Text
-> Maybe ThingTypeMetadata
-> Maybe Text
-> Int
-> DescribeThingTypeResponse
DescribeThingTypeResponse'
            (Maybe ThingTypeProperties
 -> Maybe Text
 -> Maybe Text
 -> Maybe ThingTypeMetadata
 -> Maybe Text
 -> Int
 -> DescribeThingTypeResponse)
-> Either String (Maybe ThingTypeProperties)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ThingTypeMetadata
      -> Maybe Text
      -> Int
      -> DescribeThingTypeResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ThingTypeProperties)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"thingTypeProperties")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ThingTypeMetadata
   -> Maybe Text
   -> Int
   -> DescribeThingTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ThingTypeMetadata
      -> Maybe Text
      -> Int
      -> DescribeThingTypeResponse)
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
"thingTypeName")
            Either
  String
  (Maybe Text
   -> Maybe ThingTypeMetadata
   -> Maybe Text
   -> Int
   -> DescribeThingTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ThingTypeMetadata
      -> Maybe Text -> Int -> DescribeThingTypeResponse)
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
"thingTypeId")
            Either
  String
  (Maybe ThingTypeMetadata
   -> Maybe Text -> Int -> DescribeThingTypeResponse)
-> Either String (Maybe ThingTypeMetadata)
-> Either String (Maybe Text -> Int -> DescribeThingTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ThingTypeMetadata)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"thingTypeMetadata")
            Either String (Maybe Text -> Int -> DescribeThingTypeResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeThingTypeResponse)
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
"thingTypeArn")
            Either String (Int -> DescribeThingTypeResponse)
-> Either String Int -> Either String DescribeThingTypeResponse
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 DescribeThingType

instance Prelude.NFData DescribeThingType

instance Core.ToHeaders DescribeThingType where
  toHeaders :: DescribeThingType -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeThingType -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DescribeThingType where
  toPath :: DescribeThingType -> ByteString
toPath DescribeThingType' {Text
thingTypeName :: Text
$sel:thingTypeName:DescribeThingType' :: DescribeThingType -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/thing-types/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
thingTypeName]

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

-- | The output for the DescribeThingType operation.
--
-- /See:/ 'newDescribeThingTypeResponse' smart constructor.
data DescribeThingTypeResponse = DescribeThingTypeResponse'
  { -- | The ThingTypeProperties contains information about the thing type
    -- including description, and a list of searchable thing attribute names.
    DescribeThingTypeResponse -> Maybe ThingTypeProperties
thingTypeProperties :: Prelude.Maybe ThingTypeProperties,
    -- | The name of the thing type.
    DescribeThingTypeResponse -> Maybe Text
thingTypeName :: Prelude.Maybe Prelude.Text,
    -- | The thing type ID.
    DescribeThingTypeResponse -> Maybe Text
thingTypeId :: Prelude.Maybe Prelude.Text,
    -- | The ThingTypeMetadata contains additional information about the thing
    -- type including: creation date and time, a value indicating whether the
    -- thing type is deprecated, and a date and time when it was deprecated.
    DescribeThingTypeResponse -> Maybe ThingTypeMetadata
thingTypeMetadata :: Prelude.Maybe ThingTypeMetadata,
    -- | The thing type ARN.
    DescribeThingTypeResponse -> Maybe Text
thingTypeArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeThingTypeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeThingTypeResponse -> DescribeThingTypeResponse -> Bool
(DescribeThingTypeResponse -> DescribeThingTypeResponse -> Bool)
-> (DescribeThingTypeResponse -> DescribeThingTypeResponse -> Bool)
-> Eq DescribeThingTypeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeThingTypeResponse -> DescribeThingTypeResponse -> Bool
$c/= :: DescribeThingTypeResponse -> DescribeThingTypeResponse -> Bool
== :: DescribeThingTypeResponse -> DescribeThingTypeResponse -> Bool
$c== :: DescribeThingTypeResponse -> DescribeThingTypeResponse -> Bool
Prelude.Eq, ReadPrec [DescribeThingTypeResponse]
ReadPrec DescribeThingTypeResponse
Int -> ReadS DescribeThingTypeResponse
ReadS [DescribeThingTypeResponse]
(Int -> ReadS DescribeThingTypeResponse)
-> ReadS [DescribeThingTypeResponse]
-> ReadPrec DescribeThingTypeResponse
-> ReadPrec [DescribeThingTypeResponse]
-> Read DescribeThingTypeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeThingTypeResponse]
$creadListPrec :: ReadPrec [DescribeThingTypeResponse]
readPrec :: ReadPrec DescribeThingTypeResponse
$creadPrec :: ReadPrec DescribeThingTypeResponse
readList :: ReadS [DescribeThingTypeResponse]
$creadList :: ReadS [DescribeThingTypeResponse]
readsPrec :: Int -> ReadS DescribeThingTypeResponse
$creadsPrec :: Int -> ReadS DescribeThingTypeResponse
Prelude.Read, Int -> DescribeThingTypeResponse -> ShowS
[DescribeThingTypeResponse] -> ShowS
DescribeThingTypeResponse -> String
(Int -> DescribeThingTypeResponse -> ShowS)
-> (DescribeThingTypeResponse -> String)
-> ([DescribeThingTypeResponse] -> ShowS)
-> Show DescribeThingTypeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeThingTypeResponse] -> ShowS
$cshowList :: [DescribeThingTypeResponse] -> ShowS
show :: DescribeThingTypeResponse -> String
$cshow :: DescribeThingTypeResponse -> String
showsPrec :: Int -> DescribeThingTypeResponse -> ShowS
$cshowsPrec :: Int -> DescribeThingTypeResponse -> ShowS
Prelude.Show, (forall x.
 DescribeThingTypeResponse -> Rep DescribeThingTypeResponse x)
-> (forall x.
    Rep DescribeThingTypeResponse x -> DescribeThingTypeResponse)
-> Generic DescribeThingTypeResponse
forall x.
Rep DescribeThingTypeResponse x -> DescribeThingTypeResponse
forall x.
DescribeThingTypeResponse -> Rep DescribeThingTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeThingTypeResponse x -> DescribeThingTypeResponse
$cfrom :: forall x.
DescribeThingTypeResponse -> Rep DescribeThingTypeResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeThingTypeResponse' 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:
--
-- 'thingTypeProperties', 'describeThingTypeResponse_thingTypeProperties' - The ThingTypeProperties contains information about the thing type
-- including description, and a list of searchable thing attribute names.
--
-- 'thingTypeName', 'describeThingTypeResponse_thingTypeName' - The name of the thing type.
--
-- 'thingTypeId', 'describeThingTypeResponse_thingTypeId' - The thing type ID.
--
-- 'thingTypeMetadata', 'describeThingTypeResponse_thingTypeMetadata' - The ThingTypeMetadata contains additional information about the thing
-- type including: creation date and time, a value indicating whether the
-- thing type is deprecated, and a date and time when it was deprecated.
--
-- 'thingTypeArn', 'describeThingTypeResponse_thingTypeArn' - The thing type ARN.
--
-- 'httpStatus', 'describeThingTypeResponse_httpStatus' - The response's http status code.
newDescribeThingTypeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeThingTypeResponse
newDescribeThingTypeResponse :: Int -> DescribeThingTypeResponse
newDescribeThingTypeResponse Int
pHttpStatus_ =
  DescribeThingTypeResponse' :: Maybe ThingTypeProperties
-> Maybe Text
-> Maybe Text
-> Maybe ThingTypeMetadata
-> Maybe Text
-> Int
-> DescribeThingTypeResponse
DescribeThingTypeResponse'
    { $sel:thingTypeProperties:DescribeThingTypeResponse' :: Maybe ThingTypeProperties
thingTypeProperties =
        Maybe ThingTypeProperties
forall a. Maybe a
Prelude.Nothing,
      $sel:thingTypeName:DescribeThingTypeResponse' :: Maybe Text
thingTypeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:thingTypeId:DescribeThingTypeResponse' :: Maybe Text
thingTypeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:thingTypeMetadata:DescribeThingTypeResponse' :: Maybe ThingTypeMetadata
thingTypeMetadata = Maybe ThingTypeMetadata
forall a. Maybe a
Prelude.Nothing,
      $sel:thingTypeArn:DescribeThingTypeResponse' :: Maybe Text
thingTypeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeThingTypeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ThingTypeProperties contains information about the thing type
-- including description, and a list of searchable thing attribute names.
describeThingTypeResponse_thingTypeProperties :: Lens.Lens' DescribeThingTypeResponse (Prelude.Maybe ThingTypeProperties)
describeThingTypeResponse_thingTypeProperties :: (Maybe ThingTypeProperties -> f (Maybe ThingTypeProperties))
-> DescribeThingTypeResponse -> f DescribeThingTypeResponse
describeThingTypeResponse_thingTypeProperties = (DescribeThingTypeResponse -> Maybe ThingTypeProperties)
-> (DescribeThingTypeResponse
    -> Maybe ThingTypeProperties -> DescribeThingTypeResponse)
-> Lens
     DescribeThingTypeResponse
     DescribeThingTypeResponse
     (Maybe ThingTypeProperties)
     (Maybe ThingTypeProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThingTypeResponse' {Maybe ThingTypeProperties
thingTypeProperties :: Maybe ThingTypeProperties
$sel:thingTypeProperties:DescribeThingTypeResponse' :: DescribeThingTypeResponse -> Maybe ThingTypeProperties
thingTypeProperties} -> Maybe ThingTypeProperties
thingTypeProperties) (\s :: DescribeThingTypeResponse
s@DescribeThingTypeResponse' {} Maybe ThingTypeProperties
a -> DescribeThingTypeResponse
s {$sel:thingTypeProperties:DescribeThingTypeResponse' :: Maybe ThingTypeProperties
thingTypeProperties = Maybe ThingTypeProperties
a} :: DescribeThingTypeResponse)

-- | The name of the thing type.
describeThingTypeResponse_thingTypeName :: Lens.Lens' DescribeThingTypeResponse (Prelude.Maybe Prelude.Text)
describeThingTypeResponse_thingTypeName :: (Maybe Text -> f (Maybe Text))
-> DescribeThingTypeResponse -> f DescribeThingTypeResponse
describeThingTypeResponse_thingTypeName = (DescribeThingTypeResponse -> Maybe Text)
-> (DescribeThingTypeResponse
    -> Maybe Text -> DescribeThingTypeResponse)
-> Lens
     DescribeThingTypeResponse
     DescribeThingTypeResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThingTypeResponse' {Maybe Text
thingTypeName :: Maybe Text
$sel:thingTypeName:DescribeThingTypeResponse' :: DescribeThingTypeResponse -> Maybe Text
thingTypeName} -> Maybe Text
thingTypeName) (\s :: DescribeThingTypeResponse
s@DescribeThingTypeResponse' {} Maybe Text
a -> DescribeThingTypeResponse
s {$sel:thingTypeName:DescribeThingTypeResponse' :: Maybe Text
thingTypeName = Maybe Text
a} :: DescribeThingTypeResponse)

-- | The thing type ID.
describeThingTypeResponse_thingTypeId :: Lens.Lens' DescribeThingTypeResponse (Prelude.Maybe Prelude.Text)
describeThingTypeResponse_thingTypeId :: (Maybe Text -> f (Maybe Text))
-> DescribeThingTypeResponse -> f DescribeThingTypeResponse
describeThingTypeResponse_thingTypeId = (DescribeThingTypeResponse -> Maybe Text)
-> (DescribeThingTypeResponse
    -> Maybe Text -> DescribeThingTypeResponse)
-> Lens
     DescribeThingTypeResponse
     DescribeThingTypeResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThingTypeResponse' {Maybe Text
thingTypeId :: Maybe Text
$sel:thingTypeId:DescribeThingTypeResponse' :: DescribeThingTypeResponse -> Maybe Text
thingTypeId} -> Maybe Text
thingTypeId) (\s :: DescribeThingTypeResponse
s@DescribeThingTypeResponse' {} Maybe Text
a -> DescribeThingTypeResponse
s {$sel:thingTypeId:DescribeThingTypeResponse' :: Maybe Text
thingTypeId = Maybe Text
a} :: DescribeThingTypeResponse)

-- | The ThingTypeMetadata contains additional information about the thing
-- type including: creation date and time, a value indicating whether the
-- thing type is deprecated, and a date and time when it was deprecated.
describeThingTypeResponse_thingTypeMetadata :: Lens.Lens' DescribeThingTypeResponse (Prelude.Maybe ThingTypeMetadata)
describeThingTypeResponse_thingTypeMetadata :: (Maybe ThingTypeMetadata -> f (Maybe ThingTypeMetadata))
-> DescribeThingTypeResponse -> f DescribeThingTypeResponse
describeThingTypeResponse_thingTypeMetadata = (DescribeThingTypeResponse -> Maybe ThingTypeMetadata)
-> (DescribeThingTypeResponse
    -> Maybe ThingTypeMetadata -> DescribeThingTypeResponse)
-> Lens
     DescribeThingTypeResponse
     DescribeThingTypeResponse
     (Maybe ThingTypeMetadata)
     (Maybe ThingTypeMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThingTypeResponse' {Maybe ThingTypeMetadata
thingTypeMetadata :: Maybe ThingTypeMetadata
$sel:thingTypeMetadata:DescribeThingTypeResponse' :: DescribeThingTypeResponse -> Maybe ThingTypeMetadata
thingTypeMetadata} -> Maybe ThingTypeMetadata
thingTypeMetadata) (\s :: DescribeThingTypeResponse
s@DescribeThingTypeResponse' {} Maybe ThingTypeMetadata
a -> DescribeThingTypeResponse
s {$sel:thingTypeMetadata:DescribeThingTypeResponse' :: Maybe ThingTypeMetadata
thingTypeMetadata = Maybe ThingTypeMetadata
a} :: DescribeThingTypeResponse)

-- | The thing type ARN.
describeThingTypeResponse_thingTypeArn :: Lens.Lens' DescribeThingTypeResponse (Prelude.Maybe Prelude.Text)
describeThingTypeResponse_thingTypeArn :: (Maybe Text -> f (Maybe Text))
-> DescribeThingTypeResponse -> f DescribeThingTypeResponse
describeThingTypeResponse_thingTypeArn = (DescribeThingTypeResponse -> Maybe Text)
-> (DescribeThingTypeResponse
    -> Maybe Text -> DescribeThingTypeResponse)
-> Lens
     DescribeThingTypeResponse
     DescribeThingTypeResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeThingTypeResponse' {Maybe Text
thingTypeArn :: Maybe Text
$sel:thingTypeArn:DescribeThingTypeResponse' :: DescribeThingTypeResponse -> Maybe Text
thingTypeArn} -> Maybe Text
thingTypeArn) (\s :: DescribeThingTypeResponse
s@DescribeThingTypeResponse' {} Maybe Text
a -> DescribeThingTypeResponse
s {$sel:thingTypeArn:DescribeThingTypeResponse' :: Maybe Text
thingTypeArn = Maybe Text
a} :: DescribeThingTypeResponse)

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

instance Prelude.NFData DescribeThingTypeResponse