{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves information about a device definition.
module Amazonka.Greengrass.GetDeviceDefinition
  ( -- * Creating a Request
    GetDeviceDefinition (..),
    newGetDeviceDefinition,

    -- * Request Lenses
    getDeviceDefinition_deviceDefinitionId,

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Greengrass.Types
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
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]
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
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. 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'
    { $sel:deviceDefinitionId:GetDeviceDefinition' :: Text
deviceDefinitionId =
        Text
pDeviceDefinitionId_
    }

-- | The ID of the device definition.
getDeviceDefinition_deviceDefinitionId :: Lens.Lens' GetDeviceDefinition Prelude.Text
getDeviceDefinition_deviceDefinitionId :: Lens' GetDeviceDefinition Text
getDeviceDefinition_deviceDefinitionId = 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 :: (Service -> Service)
-> GetDeviceDefinition -> Request GetDeviceDefinition
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetDeviceDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetDeviceDefinition)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> GetDeviceDefinitionResponse
GetDeviceDefinitionResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreationTimestamp")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LastUpdatedTimestamp")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LatestVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LatestVersionArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

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

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

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

instance Data.ToPath GetDeviceDefinition where
  toPath :: GetDeviceDefinition -> ByteString
toPath GetDeviceDefinition' {Text
deviceDefinitionId :: Text
$sel:deviceDefinitionId:GetDeviceDefinition' :: GetDeviceDefinition -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/definition/devices/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
deviceDefinitionId
      ]

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

-- | /See:/ 'newGetDeviceDefinitionResponse' smart constructor.
data GetDeviceDefinitionResponse = GetDeviceDefinitionResponse'
  { -- | The ARN of the definition.
    GetDeviceDefinitionResponse -> Maybe Text
arn :: 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 time, in milliseconds since the epoch, when the definition was last
    -- updated.
    GetDeviceDefinitionResponse -> Maybe Text
lastUpdatedTimestamp :: Prelude.Maybe Prelude.Text,
    -- | The ID of the latest version associated with the definition.
    GetDeviceDefinitionResponse -> Maybe Text
latestVersion :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the latest version associated with the definition.
    GetDeviceDefinitionResponse -> Maybe Text
latestVersionArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the definition.
    GetDeviceDefinitionResponse -> Maybe Text
name :: 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
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]
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
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.
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:
--
-- 'arn', 'getDeviceDefinitionResponse_arn' - The ARN 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.
--
-- 'lastUpdatedTimestamp', 'getDeviceDefinitionResponse_lastUpdatedTimestamp' - The time, in milliseconds since the epoch, when the definition was last
-- updated.
--
-- 'latestVersion', 'getDeviceDefinitionResponse_latestVersion' - The ID of the latest version associated with the definition.
--
-- 'latestVersionArn', 'getDeviceDefinitionResponse_latestVersionArn' - The ARN of the latest version associated with the definition.
--
-- 'name', 'getDeviceDefinitionResponse_name' - The name of the definition.
--
-- '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'
    { $sel:arn:GetDeviceDefinitionResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:GetDeviceDefinitionResponse' :: Maybe Text
creationTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetDeviceDefinitionResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTimestamp:GetDeviceDefinitionResponse' :: Maybe Text
lastUpdatedTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:latestVersion:GetDeviceDefinitionResponse' :: Maybe Text
latestVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:latestVersionArn:GetDeviceDefinitionResponse' :: Maybe Text
latestVersionArn = forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetDeviceDefinitionResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetDeviceDefinitionResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDeviceDefinitionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the definition.
getDeviceDefinitionResponse_arn :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_arn :: Lens' GetDeviceDefinitionResponse (Maybe Text)
getDeviceDefinitionResponse_arn = 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 time, in milliseconds since the epoch, when the definition was
-- created.
getDeviceDefinitionResponse_creationTimestamp :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_creationTimestamp :: Lens' GetDeviceDefinitionResponse (Maybe Text)
getDeviceDefinitionResponse_creationTimestamp = 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 :: Lens' GetDeviceDefinitionResponse (Maybe Text)
getDeviceDefinitionResponse_id = 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 time, in milliseconds since the epoch, when the definition was last
-- updated.
getDeviceDefinitionResponse_lastUpdatedTimestamp :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_lastUpdatedTimestamp :: Lens' GetDeviceDefinitionResponse (Maybe Text)
getDeviceDefinitionResponse_lastUpdatedTimestamp = 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)

-- | The ID of the latest version associated with the definition.
getDeviceDefinitionResponse_latestVersion :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_latestVersion :: Lens' GetDeviceDefinitionResponse (Maybe Text)
getDeviceDefinitionResponse_latestVersion = 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 ARN of the latest version associated with the definition.
getDeviceDefinitionResponse_latestVersionArn :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_latestVersionArn :: Lens' GetDeviceDefinitionResponse (Maybe Text)
getDeviceDefinitionResponse_latestVersionArn = 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 name of the definition.
getDeviceDefinitionResponse_name :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe Prelude.Text)
getDeviceDefinitionResponse_name :: Lens' GetDeviceDefinitionResponse (Maybe Text)
getDeviceDefinitionResponse_name = 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)

-- | Tag(s) attached to the resource arn.
getDeviceDefinitionResponse_tags :: Lens.Lens' GetDeviceDefinitionResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getDeviceDefinitionResponse_tags :: Lens' GetDeviceDefinitionResponse (Maybe (HashMap Text Text))
getDeviceDefinitionResponse_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' GetDeviceDefinitionResponse Int
getDeviceDefinitionResponse_httpStatus = 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 where
  rnf :: GetDeviceDefinitionResponse -> ()
rnf GetDeviceDefinitionResponse' {Int
Maybe Text
Maybe (HashMap Text Text)
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
latestVersionArn :: Maybe Text
latestVersion :: Maybe Text
lastUpdatedTimestamp :: Maybe Text
id :: Maybe Text
creationTimestamp :: Maybe Text
arn :: Maybe Text
$sel:httpStatus:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Int
$sel:tags:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe (HashMap Text Text)
$sel:name:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
$sel:latestVersionArn:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
$sel:latestVersion:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
$sel:lastUpdatedTimestamp:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
$sel:id:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
$sel:creationTimestamp:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
$sel:arn:GetDeviceDefinitionResponse' :: GetDeviceDefinitionResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
creationTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastUpdatedTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
latestVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
latestVersionArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus