{-# 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.Greengrass.GetDeviceDefinition
-- 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 device definition.
module Amazonka.Greengrass.GetDeviceDefinition
  ( -- * Creating a Request
    GetDeviceDefinition (..),
    newGetDeviceDefinition,

    -- * Request Lenses
    getDeviceDefinition_deviceDefinitionId,

    -- * Destructuring the Response
    GetDeviceDefinitionResponse (..),
    newGetDeviceDefinitionResponse,

    -- * Response Lenses
    getDeviceDefinitionResponse_latestVersionArn,
    getDeviceDefinitionResponse_arn,
    getDeviceDefinitionResponse_name,
    getDeviceDefinitionResponse_creationTimestamp,
    getDeviceDefinitionResponse_id,
    getDeviceDefinitionResponse_latestVersion,
    getDeviceDefinitionResponse_lastUpdatedTimestamp,
    getDeviceDefinitionResponse_tags,
    getDeviceDefinitionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Greengrass.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:/ 'newGetDeviceDefinition' smart constructor.
data GetDeviceDefinition = GetDeviceDefinition'
  { -- | The ID of the device definition.
    GetDeviceDefinition -> Text
deviceDefinitionId :: Prelude.Text
  }
  deriving (GetDeviceDefinition -> GetDeviceDefinition -> Bool
(GetDeviceDefinition -> GetDeviceDefinition -> Bool)
-> (GetDeviceDefinition -> GetDeviceDefinition -> Bool)
-> Eq GetDeviceDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDeviceDefinition -> GetDeviceDefinition -> Bool
$c/= :: GetDeviceDefinition -> GetDeviceDefinition -> Bool
== :: GetDeviceDefinition -> GetDeviceDefinition -> Bool
$c== :: GetDeviceDefinition -> GetDeviceDefinition -> Bool
Prelude.Eq, ReadPrec [GetDeviceDefinition]
ReadPrec GetDeviceDefinition
Int -> ReadS GetDeviceDefinition
ReadS [GetDeviceDefinition]
(Int -> ReadS GetDeviceDefinition)
-> ReadS [GetDeviceDefinition]
-> ReadPrec GetDeviceDefinition
-> ReadPrec [GetDeviceDefinition]
-> Read GetDeviceDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDeviceDefinition]
$creadListPrec :: ReadPrec [GetDeviceDefinition]
readPrec :: ReadPrec GetDeviceDefinition
$creadPrec :: ReadPrec GetDeviceDefinition
readList :: ReadS [GetDeviceDefinition]
$creadList :: ReadS [GetDeviceDefinition]
readsPrec :: Int -> ReadS GetDeviceDefinition
$creadsPrec :: Int -> ReadS GetDeviceDefinition
Prelude.Read, Int -> GetDeviceDefinition -> ShowS
[GetDeviceDefinition] -> ShowS
GetDeviceDefinition -> String
(Int -> GetDeviceDefinition -> ShowS)
-> (GetDeviceDefinition -> String)
-> ([GetDeviceDefinition] -> ShowS)
-> Show GetDeviceDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDeviceDefinition] -> ShowS
$cshowList :: [GetDeviceDefinition] -> ShowS
show :: GetDeviceDefinition -> String
$cshow :: GetDeviceDefinition -> String
showsPrec :: Int -> GetDeviceDefinition -> ShowS
$cshowsPrec :: Int -> GetDeviceDefinition -> ShowS
Prelude.Show, (forall x. GetDeviceDefinition -> Rep GetDeviceDefinition x)
-> (forall x. Rep GetDeviceDefinition x -> GetDeviceDefinition)
-> Generic GetDeviceDefinition
forall x. Rep GetDeviceDefinition x -> GetDeviceDefinition
forall x. GetDeviceDefinition -> Rep GetDeviceDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDeviceDefinition x -> GetDeviceDefinition
$cfrom :: forall x. GetDeviceDefinition -> Rep GetDeviceDefinition x
Prelude.Generic)

-- |
-- Create a value of 'GetDeviceDefinition' 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:
--
-- 'deviceDefinitionId', 'getDeviceDefinition_deviceDefinitionId' - The ID of the device definition.
newGetDeviceDefinition ::
  -- | 'deviceDefinitionId'
  Prelude.Text ->
  GetDeviceDefinition
newGetDeviceDefinition :: Text -> GetDeviceDefinition
newGetDeviceDefinition Text
pDeviceDefinitionId_ =
  GetDeviceDefinition' :: Text -> GetDeviceDefinition
GetDeviceDefinition'
    { $sel:deviceDefinitionId:GetDeviceDefinition' :: Text
deviceDefinitionId =
        Text
pDeviceDefinitionId_
    }

-- | The ID of the device definition.
getDeviceDefinition_deviceDefinitionId :: Lens.Lens' GetDeviceDefinition Prelude.Text
getDeviceDefinition_deviceDefinitionId :: (Text -> f Text) -> GetDeviceDefinition -> f GetDeviceDefinition
getDeviceDefinition_deviceDefinitionId = (GetDeviceDefinition -> Text)
-> (GetDeviceDefinition -> Text -> GetDeviceDefinition)
-> Lens GetDeviceDefinition GetDeviceDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceDefinition' {Text
deviceDefinitionId :: Text
$sel:deviceDefinitionId:GetDeviceDefinition' :: GetDeviceDefinition -> Text
deviceDefinitionId} -> Text
deviceDefinitionId) (\s :: GetDeviceDefinition
s@GetDeviceDefinition' {} Text
a -> GetDeviceDefinition
s {$sel:deviceDefinitionId:GetDeviceDefinition' :: Text
deviceDefinitionId = Text
a} :: GetDeviceDefinition)

instance Core.AWSRequest GetDeviceDefinition where
  type
    AWSResponse GetDeviceDefinition =
      GetDeviceDefinitionResponse
  request :: GetDeviceDefinition -> Request GetDeviceDefinition
request = Service -> GetDeviceDefinition -> Request GetDeviceDefinition
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDeviceDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetDeviceDefinition)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDeviceDefinition))
-> Logger
-> Service
-> Proxy GetDeviceDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetDeviceDefinition)))
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> GetDeviceDefinitionResponse
GetDeviceDefinitionResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> GetDeviceDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeviceDefinitionResponse)
forall (f :: * -> *) a b. Functor 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
"LatestVersionArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeviceDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeviceDefinitionResponse)
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
"Arn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeviceDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeviceDefinitionResponse)
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
"Name")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeviceDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeviceDefinitionResponse)
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
"CreationTimestamp")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeviceDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeviceDefinitionResponse)
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
"Id")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeviceDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> GetDeviceDefinitionResponse)
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
"LatestVersion")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> GetDeviceDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> GetDeviceDefinitionResponse)
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
"LastUpdatedTimestamp")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> GetDeviceDefinitionResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> GetDeviceDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetDeviceDefinitionResponse)
-> Either String Int -> Either String GetDeviceDefinitionResponse
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 GetDeviceDefinition

instance Prelude.NFData GetDeviceDefinition

instance Core.ToHeaders GetDeviceDefinition where
  toHeaders :: GetDeviceDefinition -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetDeviceDefinition -> 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 GetDeviceDefinition where
  toPath :: GetDeviceDefinition -> ByteString
toPath GetDeviceDefinition' {Text
deviceDefinitionId :: Text
$sel:deviceDefinitionId:GetDeviceDefinition' :: GetDeviceDefinition -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/definition/devices/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
deviceDefinitionId
      ]

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

-- | /See:/ 'newGetDeviceDefinitionResponse' smart constructor.
data GetDeviceDefinitionResponse = GetDeviceDefinitionResponse'
  { -- | The ARN of the latest version associated with the definition.
    GetDeviceDefinitionResponse -> Maybe Text
latestVersionArn :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the definition.
    GetDeviceDefinitionResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The name of the definition.
    GetDeviceDefinitionResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the definition was
    -- created.
    GetDeviceDefinitionResponse -> Maybe Text
creationTimestamp :: Prelude.Maybe Prelude.Text,
    -- | The ID of the definition.
    GetDeviceDefinitionResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The ID of the latest version associated with the definition.
    GetDeviceDefinitionResponse -> Maybe Text
latestVersion :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the definition was last
    -- updated.
    GetDeviceDefinitionResponse -> Maybe Text
lastUpdatedTimestamp :: Prelude.Maybe Prelude.Text,
    -- | Tag(s) attached to the resource arn.
    GetDeviceDefinitionResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    GetDeviceDefinitionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDeviceDefinitionResponse -> GetDeviceDefinitionResponse -> Bool
(GetDeviceDefinitionResponse
 -> GetDeviceDefinitionResponse -> Bool)
-> (GetDeviceDefinitionResponse
    -> GetDeviceDefinitionResponse -> Bool)
-> Eq GetDeviceDefinitionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDeviceDefinitionResponse -> GetDeviceDefinitionResponse -> Bool
$c/= :: GetDeviceDefinitionResponse -> GetDeviceDefinitionResponse -> Bool
== :: GetDeviceDefinitionResponse -> GetDeviceDefinitionResponse -> Bool
$c== :: GetDeviceDefinitionResponse -> GetDeviceDefinitionResponse -> Bool
Prelude.Eq, ReadPrec [GetDeviceDefinitionResponse]
ReadPrec GetDeviceDefinitionResponse
Int -> ReadS GetDeviceDefinitionResponse
ReadS [GetDeviceDefinitionResponse]
(Int -> ReadS GetDeviceDefinitionResponse)
-> ReadS [GetDeviceDefinitionResponse]
-> ReadPrec GetDeviceDefinitionResponse
-> ReadPrec [GetDeviceDefinitionResponse]
-> Read GetDeviceDefinitionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDeviceDefinitionResponse]
$creadListPrec :: ReadPrec [GetDeviceDefinitionResponse]
readPrec :: ReadPrec GetDeviceDefinitionResponse
$creadPrec :: ReadPrec GetDeviceDefinitionResponse
readList :: ReadS [GetDeviceDefinitionResponse]
$creadList :: ReadS [GetDeviceDefinitionResponse]
readsPrec :: Int -> ReadS GetDeviceDefinitionResponse
$creadsPrec :: Int -> ReadS GetDeviceDefinitionResponse
Prelude.Read, Int -> GetDeviceDefinitionResponse -> ShowS
[GetDeviceDefinitionResponse] -> ShowS
GetDeviceDefinitionResponse -> String
(Int -> GetDeviceDefinitionResponse -> ShowS)
-> (GetDeviceDefinitionResponse -> String)
-> ([GetDeviceDefinitionResponse] -> ShowS)
-> Show GetDeviceDefinitionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDeviceDefinitionResponse] -> ShowS
$cshowList :: [GetDeviceDefinitionResponse] -> ShowS
show :: GetDeviceDefinitionResponse -> String
$cshow :: GetDeviceDefinitionResponse -> String
showsPrec :: Int -> GetDeviceDefinitionResponse -> ShowS
$cshowsPrec :: Int -> GetDeviceDefinitionResponse -> ShowS
Prelude.Show, (forall x.
 GetDeviceDefinitionResponse -> Rep GetDeviceDefinitionResponse x)
-> (forall x.
    Rep GetDeviceDefinitionResponse x -> GetDeviceDefinitionResponse)
-> Generic GetDeviceDefinitionResponse
forall x.
Rep GetDeviceDefinitionResponse x -> GetDeviceDefinitionResponse
forall x.
GetDeviceDefinitionResponse -> Rep GetDeviceDefinitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDeviceDefinitionResponse x -> GetDeviceDefinitionResponse
$cfrom :: forall x.
GetDeviceDefinitionResponse -> Rep GetDeviceDefinitionResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDeviceDefinitionResponse' 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:
--
-- 'latestVersionArn', 'getDeviceDefinitionResponse_latestVersionArn' - The ARN of the latest version associated with the definition.
--
-- 'arn', 'getDeviceDefinitionResponse_arn' - The ARN of the definition.
--
-- 'name', 'getDeviceDefinitionResponse_name' - The name of the definition.
--
-- 'creationTimestamp', 'getDeviceDefinitionResponse_creationTimestamp' - The time, in milliseconds since the epoch, when the definition was
-- created.
--
-- 'id', 'getDeviceDefinitionResponse_id' - The ID of the definition.
--
-- 'latestVersion', 'getDeviceDefinitionResponse_latestVersion' - The ID of the latest version associated with the definition.
--
-- 'lastUpdatedTimestamp', 'getDeviceDefinitionResponse_lastUpdatedTimestamp' - The time, in milliseconds since the epoch, when the definition was last
-- updated.
--
-- 'tags', 'getDeviceDefinitionResponse_tags' - Tag(s) attached to the resource arn.
--
-- 'httpStatus', 'getDeviceDefinitionResponse_httpStatus' - The response's http status code.
newGetDeviceDefinitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDeviceDefinitionResponse
newGetDeviceDefinitionResponse :: Int -> GetDeviceDefinitionResponse
newGetDeviceDefinitionResponse Int
pHttpStatus_ =
  GetDeviceDefinitionResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> GetDeviceDefinitionResponse
GetDeviceDefinitionResponse'
    { $sel:latestVersionArn:GetDeviceDefinitionResponse' :: Maybe Text
latestVersionArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:GetDeviceDefinitionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetDeviceDefinitionResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:GetDeviceDefinitionResponse' :: Maybe Text
creationTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetDeviceDefinitionResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:latestVersion:GetDeviceDefinitionResponse' :: Maybe Text
latestVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTimestamp:GetDeviceDefinitionResponse' :: Maybe Text
lastUpdatedTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetDeviceDefinitionResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDeviceDefinitionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the latest version associated with the definition.
getDeviceDefinitionResponse_latestVersionArn :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_latestVersionArn :: (Maybe Text -> f (Maybe Text))
-> GetDeviceDefinitionResponse -> f GetDeviceDefinitionResponse
getDeviceDefinitionResponse_latestVersionArn = (GetDeviceDefinitionResponse -> Maybe Text)
-> (GetDeviceDefinitionResponse
    -> Maybe Text -> GetDeviceDefinitionResponse)
-> Lens
     GetDeviceDefinitionResponse
     GetDeviceDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceDefinitionResponse' {Maybe Text
latestVersionArn :: Maybe Text
$sel:latestVersionArn:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
latestVersionArn} -> Maybe Text
latestVersionArn) (\s :: GetDeviceDefinitionResponse
s@GetDeviceDefinitionResponse' {} Maybe Text
a -> GetDeviceDefinitionResponse
s {$sel:latestVersionArn:GetDeviceDefinitionResponse' :: Maybe Text
latestVersionArn = Maybe Text
a} :: GetDeviceDefinitionResponse)

-- | The ARN of the definition.
getDeviceDefinitionResponse_arn :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_arn :: (Maybe Text -> f (Maybe Text))
-> GetDeviceDefinitionResponse -> f GetDeviceDefinitionResponse
getDeviceDefinitionResponse_arn = (GetDeviceDefinitionResponse -> Maybe Text)
-> (GetDeviceDefinitionResponse
    -> Maybe Text -> GetDeviceDefinitionResponse)
-> Lens
     GetDeviceDefinitionResponse
     GetDeviceDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceDefinitionResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GetDeviceDefinitionResponse
s@GetDeviceDefinitionResponse' {} Maybe Text
a -> GetDeviceDefinitionResponse
s {$sel:arn:GetDeviceDefinitionResponse' :: Maybe Text
arn = Maybe Text
a} :: GetDeviceDefinitionResponse)

-- | The name of the definition.
getDeviceDefinitionResponse_name :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_name :: (Maybe Text -> f (Maybe Text))
-> GetDeviceDefinitionResponse -> f GetDeviceDefinitionResponse
getDeviceDefinitionResponse_name = (GetDeviceDefinitionResponse -> Maybe Text)
-> (GetDeviceDefinitionResponse
    -> Maybe Text -> GetDeviceDefinitionResponse)
-> Lens
     GetDeviceDefinitionResponse
     GetDeviceDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceDefinitionResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetDeviceDefinitionResponse
s@GetDeviceDefinitionResponse' {} Maybe Text
a -> GetDeviceDefinitionResponse
s {$sel:name:GetDeviceDefinitionResponse' :: Maybe Text
name = Maybe Text
a} :: GetDeviceDefinitionResponse)

-- | The time, in milliseconds since the epoch, when the definition was
-- created.
getDeviceDefinitionResponse_creationTimestamp :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_creationTimestamp :: (Maybe Text -> f (Maybe Text))
-> GetDeviceDefinitionResponse -> f GetDeviceDefinitionResponse
getDeviceDefinitionResponse_creationTimestamp = (GetDeviceDefinitionResponse -> Maybe Text)
-> (GetDeviceDefinitionResponse
    -> Maybe Text -> GetDeviceDefinitionResponse)
-> Lens
     GetDeviceDefinitionResponse
     GetDeviceDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceDefinitionResponse' {Maybe Text
creationTimestamp :: Maybe Text
$sel:creationTimestamp:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
creationTimestamp} -> Maybe Text
creationTimestamp) (\s :: GetDeviceDefinitionResponse
s@GetDeviceDefinitionResponse' {} Maybe Text
a -> GetDeviceDefinitionResponse
s {$sel:creationTimestamp:GetDeviceDefinitionResponse' :: Maybe Text
creationTimestamp = Maybe Text
a} :: GetDeviceDefinitionResponse)

-- | The ID of the definition.
getDeviceDefinitionResponse_id :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_id :: (Maybe Text -> f (Maybe Text))
-> GetDeviceDefinitionResponse -> f GetDeviceDefinitionResponse
getDeviceDefinitionResponse_id = (GetDeviceDefinitionResponse -> Maybe Text)
-> (GetDeviceDefinitionResponse
    -> Maybe Text -> GetDeviceDefinitionResponse)
-> Lens
     GetDeviceDefinitionResponse
     GetDeviceDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceDefinitionResponse' {Maybe Text
id :: Maybe Text
$sel:id:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: GetDeviceDefinitionResponse
s@GetDeviceDefinitionResponse' {} Maybe Text
a -> GetDeviceDefinitionResponse
s {$sel:id:GetDeviceDefinitionResponse' :: Maybe Text
id = Maybe Text
a} :: GetDeviceDefinitionResponse)

-- | The ID of the latest version associated with the definition.
getDeviceDefinitionResponse_latestVersion :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_latestVersion :: (Maybe Text -> f (Maybe Text))
-> GetDeviceDefinitionResponse -> f GetDeviceDefinitionResponse
getDeviceDefinitionResponse_latestVersion = (GetDeviceDefinitionResponse -> Maybe Text)
-> (GetDeviceDefinitionResponse
    -> Maybe Text -> GetDeviceDefinitionResponse)
-> Lens
     GetDeviceDefinitionResponse
     GetDeviceDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceDefinitionResponse' {Maybe Text
latestVersion :: Maybe Text
$sel:latestVersion:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
latestVersion} -> Maybe Text
latestVersion) (\s :: GetDeviceDefinitionResponse
s@GetDeviceDefinitionResponse' {} Maybe Text
a -> GetDeviceDefinitionResponse
s {$sel:latestVersion:GetDeviceDefinitionResponse' :: Maybe Text
latestVersion = Maybe Text
a} :: GetDeviceDefinitionResponse)

-- | The time, in milliseconds since the epoch, when the definition was last
-- updated.
getDeviceDefinitionResponse_lastUpdatedTimestamp :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_lastUpdatedTimestamp :: (Maybe Text -> f (Maybe Text))
-> GetDeviceDefinitionResponse -> f GetDeviceDefinitionResponse
getDeviceDefinitionResponse_lastUpdatedTimestamp = (GetDeviceDefinitionResponse -> Maybe Text)
-> (GetDeviceDefinitionResponse
    -> Maybe Text -> GetDeviceDefinitionResponse)
-> Lens
     GetDeviceDefinitionResponse
     GetDeviceDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceDefinitionResponse' {Maybe Text
lastUpdatedTimestamp :: Maybe Text
$sel:lastUpdatedTimestamp:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
lastUpdatedTimestamp} -> Maybe Text
lastUpdatedTimestamp) (\s :: GetDeviceDefinitionResponse
s@GetDeviceDefinitionResponse' {} Maybe Text
a -> GetDeviceDefinitionResponse
s {$sel:lastUpdatedTimestamp:GetDeviceDefinitionResponse' :: Maybe Text
lastUpdatedTimestamp = Maybe Text
a} :: GetDeviceDefinitionResponse)

-- | Tag(s) attached to the resource arn.
getDeviceDefinitionResponse_tags :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getDeviceDefinitionResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetDeviceDefinitionResponse -> f GetDeviceDefinitionResponse
getDeviceDefinitionResponse_tags = (GetDeviceDefinitionResponse -> Maybe (HashMap Text Text))
-> (GetDeviceDefinitionResponse
    -> Maybe (HashMap Text Text) -> GetDeviceDefinitionResponse)
-> Lens
     GetDeviceDefinitionResponse
     GetDeviceDefinitionResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceDefinitionResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetDeviceDefinitionResponse
s@GetDeviceDefinitionResponse' {} Maybe (HashMap Text Text)
a -> GetDeviceDefinitionResponse
s {$sel:tags:GetDeviceDefinitionResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetDeviceDefinitionResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetDeviceDefinitionResponse -> f GetDeviceDefinitionResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetDeviceDefinitionResponse
-> f GetDeviceDefinitionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetDeviceDefinitionResponse