{-# 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.SnowDeviceManagement.DescribeDevice
-- 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)
--
-- Checks device-specific information, such as the device type, software
-- version, IP addresses, and lock status.
module Amazonka.SnowDeviceManagement.DescribeDevice
  ( -- * Creating a Request
    DescribeDevice (..),
    newDescribeDevice,

    -- * Request Lenses
    describeDevice_managedDeviceId,

    -- * Destructuring the Response
    DescribeDeviceResponse (..),
    newDescribeDeviceResponse,

    -- * Response Lenses
    describeDeviceResponse_deviceState,
    describeDeviceResponse_deviceCapacities,
    describeDeviceResponse_lastUpdatedAt,
    describeDeviceResponse_associatedWithJob,
    describeDeviceResponse_lastReachedOutAt,
    describeDeviceResponse_software,
    describeDeviceResponse_physicalNetworkInterfaces,
    describeDeviceResponse_managedDeviceId,
    describeDeviceResponse_managedDeviceArn,
    describeDeviceResponse_deviceType,
    describeDeviceResponse_tags,
    describeDeviceResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SnowDeviceManagement.Types

-- | /See:/ 'newDescribeDevice' smart constructor.
data DescribeDevice = DescribeDevice'
  { -- | The ID of the device that you are checking the information of.
    DescribeDevice -> Text
managedDeviceId :: Prelude.Text
  }
  deriving (DescribeDevice -> DescribeDevice -> Bool
(DescribeDevice -> DescribeDevice -> Bool)
-> (DescribeDevice -> DescribeDevice -> Bool) -> Eq DescribeDevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDevice -> DescribeDevice -> Bool
$c/= :: DescribeDevice -> DescribeDevice -> Bool
== :: DescribeDevice -> DescribeDevice -> Bool
$c== :: DescribeDevice -> DescribeDevice -> Bool
Prelude.Eq, ReadPrec [DescribeDevice]
ReadPrec DescribeDevice
Int -> ReadS DescribeDevice
ReadS [DescribeDevice]
(Int -> ReadS DescribeDevice)
-> ReadS [DescribeDevice]
-> ReadPrec DescribeDevice
-> ReadPrec [DescribeDevice]
-> Read DescribeDevice
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDevice]
$creadListPrec :: ReadPrec [DescribeDevice]
readPrec :: ReadPrec DescribeDevice
$creadPrec :: ReadPrec DescribeDevice
readList :: ReadS [DescribeDevice]
$creadList :: ReadS [DescribeDevice]
readsPrec :: Int -> ReadS DescribeDevice
$creadsPrec :: Int -> ReadS DescribeDevice
Prelude.Read, Int -> DescribeDevice -> ShowS
[DescribeDevice] -> ShowS
DescribeDevice -> String
(Int -> DescribeDevice -> ShowS)
-> (DescribeDevice -> String)
-> ([DescribeDevice] -> ShowS)
-> Show DescribeDevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDevice] -> ShowS
$cshowList :: [DescribeDevice] -> ShowS
show :: DescribeDevice -> String
$cshow :: DescribeDevice -> String
showsPrec :: Int -> DescribeDevice -> ShowS
$cshowsPrec :: Int -> DescribeDevice -> ShowS
Prelude.Show, (forall x. DescribeDevice -> Rep DescribeDevice x)
-> (forall x. Rep DescribeDevice x -> DescribeDevice)
-> Generic DescribeDevice
forall x. Rep DescribeDevice x -> DescribeDevice
forall x. DescribeDevice -> Rep DescribeDevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDevice x -> DescribeDevice
$cfrom :: forall x. DescribeDevice -> Rep DescribeDevice x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDevice' 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:
--
-- 'managedDeviceId', 'describeDevice_managedDeviceId' - The ID of the device that you are checking the information of.
newDescribeDevice ::
  -- | 'managedDeviceId'
  Prelude.Text ->
  DescribeDevice
newDescribeDevice :: Text -> DescribeDevice
newDescribeDevice Text
pManagedDeviceId_ =
  DescribeDevice' :: Text -> DescribeDevice
DescribeDevice'
    { $sel:managedDeviceId:DescribeDevice' :: Text
managedDeviceId =
        Text
pManagedDeviceId_
    }

-- | The ID of the device that you are checking the information of.
describeDevice_managedDeviceId :: Lens.Lens' DescribeDevice Prelude.Text
describeDevice_managedDeviceId :: (Text -> f Text) -> DescribeDevice -> f DescribeDevice
describeDevice_managedDeviceId = (DescribeDevice -> Text)
-> (DescribeDevice -> Text -> DescribeDevice)
-> Lens DescribeDevice DescribeDevice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDevice' {Text
managedDeviceId :: Text
$sel:managedDeviceId:DescribeDevice' :: DescribeDevice -> Text
managedDeviceId} -> Text
managedDeviceId) (\s :: DescribeDevice
s@DescribeDevice' {} Text
a -> DescribeDevice
s {$sel:managedDeviceId:DescribeDevice' :: Text
managedDeviceId = Text
a} :: DescribeDevice)

instance Core.AWSRequest DescribeDevice where
  type
    AWSResponse DescribeDevice =
      DescribeDeviceResponse
  request :: DescribeDevice -> Request DescribeDevice
request = Service -> DescribeDevice -> Request DescribeDevice
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDevice
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeDevice)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeDevice))
-> Logger
-> Service
-> Proxy DescribeDevice
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeDevice)))
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 UnlockState
-> Maybe [Capacity]
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe SoftwareInformation
-> Maybe [PhysicalNetworkInterface]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeDeviceResponse
DescribeDeviceResponse'
            (Maybe UnlockState
 -> Maybe [Capacity]
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe SoftwareInformation
 -> Maybe [PhysicalNetworkInterface]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> DescribeDeviceResponse)
-> Either String (Maybe UnlockState)
-> Either
     String
     (Maybe [Capacity]
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe SoftwareInformation
      -> Maybe [PhysicalNetworkInterface]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe UnlockState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deviceState")
            Either
  String
  (Maybe [Capacity]
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe SoftwareInformation
   -> Maybe [PhysicalNetworkInterface]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe [Capacity])
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe SoftwareInformation
      -> Maybe [PhysicalNetworkInterface]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Capacity]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deviceCapacities"
                            Either String (Maybe (Maybe [Capacity]))
-> Maybe [Capacity] -> Either String (Maybe [Capacity])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Capacity]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe SoftwareInformation
   -> Maybe [PhysicalNetworkInterface]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe SoftwareInformation
      -> Maybe [PhysicalNetworkInterface]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastUpdatedAt")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe SoftwareInformation
   -> Maybe [PhysicalNetworkInterface]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe SoftwareInformation
      -> Maybe [PhysicalNetworkInterface]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
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
"associatedWithJob")
            Either
  String
  (Maybe POSIX
   -> Maybe SoftwareInformation
   -> Maybe [PhysicalNetworkInterface]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe SoftwareInformation
      -> Maybe [PhysicalNetworkInterface]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastReachedOutAt")
            Either
  String
  (Maybe SoftwareInformation
   -> Maybe [PhysicalNetworkInterface]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe SoftwareInformation)
-> Either
     String
     (Maybe [PhysicalNetworkInterface]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe SoftwareInformation)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"software")
            Either
  String
  (Maybe [PhysicalNetworkInterface]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe [PhysicalNetworkInterface])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [PhysicalNetworkInterface]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"physicalNetworkInterfaces"
                            Either String (Maybe (Maybe [PhysicalNetworkInterface]))
-> Maybe [PhysicalNetworkInterface]
-> Either String (Maybe [PhysicalNetworkInterface])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [PhysicalNetworkInterface]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeDeviceResponse)
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
"managedDeviceId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeDeviceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> DescribeDeviceResponse)
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
"managedDeviceArn")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> DescribeDeviceResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> DescribeDeviceResponse)
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
"deviceType")
            Either
  String (Maybe (HashMap Text Text) -> Int -> DescribeDeviceResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeDeviceResponse)
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 -> DescribeDeviceResponse)
-> Either String Int -> Either String DescribeDeviceResponse
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 DescribeDevice

instance Prelude.NFData DescribeDevice

instance Core.ToHeaders DescribeDevice where
  toHeaders :: DescribeDevice -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeDevice -> 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.ToJSON DescribeDevice where
  toJSON :: DescribeDevice -> Value
toJSON = Value -> DescribeDevice -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)

instance Core.ToPath DescribeDevice where
  toPath :: DescribeDevice -> ByteString
toPath DescribeDevice' {Text
managedDeviceId :: Text
$sel:managedDeviceId:DescribeDevice' :: DescribeDevice -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/managed-device/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
managedDeviceId,
        ByteString
"/describe"
      ]

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

-- | /See:/ 'newDescribeDeviceResponse' smart constructor.
data DescribeDeviceResponse = DescribeDeviceResponse'
  { -- | The current state of the device.
    DescribeDeviceResponse -> Maybe UnlockState
deviceState :: Prelude.Maybe UnlockState,
    -- | The hardware specifications of the device.
    DescribeDeviceResponse -> Maybe [Capacity]
deviceCapacities :: Prelude.Maybe [Capacity],
    -- | When the device last pushed an update to the Amazon Web Services Cloud.
    -- Indicates when the device cache was refreshed.
    DescribeDeviceResponse -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The ID of the job used when ordering the device.
    DescribeDeviceResponse -> Maybe Text
associatedWithJob :: Prelude.Maybe Prelude.Text,
    -- | When the device last contacted the Amazon Web Services Cloud. Indicates
    -- that the device is online.
    DescribeDeviceResponse -> Maybe POSIX
lastReachedOutAt :: Prelude.Maybe Core.POSIX,
    -- | The software installed on the device.
    DescribeDeviceResponse -> Maybe SoftwareInformation
software :: Prelude.Maybe SoftwareInformation,
    -- | The network interfaces available on the device.
    DescribeDeviceResponse -> Maybe [PhysicalNetworkInterface]
physicalNetworkInterfaces :: Prelude.Maybe [PhysicalNetworkInterface],
    -- | The ID of the device that you checked the information for.
    DescribeDeviceResponse -> Maybe Text
managedDeviceId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the device.
    DescribeDeviceResponse -> Maybe Text
managedDeviceArn :: Prelude.Maybe Prelude.Text,
    -- | The type of Amazon Web Services Snow Family device.
    DescribeDeviceResponse -> Maybe Text
deviceType :: Prelude.Maybe Prelude.Text,
    -- | Optional metadata that you assign to a resource. You can use tags to
    -- categorize a resource in different ways, such as by purpose, owner, or
    -- environment.
    DescribeDeviceResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeDeviceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDeviceResponse -> DescribeDeviceResponse -> Bool
(DescribeDeviceResponse -> DescribeDeviceResponse -> Bool)
-> (DescribeDeviceResponse -> DescribeDeviceResponse -> Bool)
-> Eq DescribeDeviceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDeviceResponse -> DescribeDeviceResponse -> Bool
$c/= :: DescribeDeviceResponse -> DescribeDeviceResponse -> Bool
== :: DescribeDeviceResponse -> DescribeDeviceResponse -> Bool
$c== :: DescribeDeviceResponse -> DescribeDeviceResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDeviceResponse]
ReadPrec DescribeDeviceResponse
Int -> ReadS DescribeDeviceResponse
ReadS [DescribeDeviceResponse]
(Int -> ReadS DescribeDeviceResponse)
-> ReadS [DescribeDeviceResponse]
-> ReadPrec DescribeDeviceResponse
-> ReadPrec [DescribeDeviceResponse]
-> Read DescribeDeviceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDeviceResponse]
$creadListPrec :: ReadPrec [DescribeDeviceResponse]
readPrec :: ReadPrec DescribeDeviceResponse
$creadPrec :: ReadPrec DescribeDeviceResponse
readList :: ReadS [DescribeDeviceResponse]
$creadList :: ReadS [DescribeDeviceResponse]
readsPrec :: Int -> ReadS DescribeDeviceResponse
$creadsPrec :: Int -> ReadS DescribeDeviceResponse
Prelude.Read, Int -> DescribeDeviceResponse -> ShowS
[DescribeDeviceResponse] -> ShowS
DescribeDeviceResponse -> String
(Int -> DescribeDeviceResponse -> ShowS)
-> (DescribeDeviceResponse -> String)
-> ([DescribeDeviceResponse] -> ShowS)
-> Show DescribeDeviceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDeviceResponse] -> ShowS
$cshowList :: [DescribeDeviceResponse] -> ShowS
show :: DescribeDeviceResponse -> String
$cshow :: DescribeDeviceResponse -> String
showsPrec :: Int -> DescribeDeviceResponse -> ShowS
$cshowsPrec :: Int -> DescribeDeviceResponse -> ShowS
Prelude.Show, (forall x. DescribeDeviceResponse -> Rep DescribeDeviceResponse x)
-> (forall x.
    Rep DescribeDeviceResponse x -> DescribeDeviceResponse)
-> Generic DescribeDeviceResponse
forall x. Rep DescribeDeviceResponse x -> DescribeDeviceResponse
forall x. DescribeDeviceResponse -> Rep DescribeDeviceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDeviceResponse x -> DescribeDeviceResponse
$cfrom :: forall x. DescribeDeviceResponse -> Rep DescribeDeviceResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDeviceResponse' 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:
--
-- 'deviceState', 'describeDeviceResponse_deviceState' - The current state of the device.
--
-- 'deviceCapacities', 'describeDeviceResponse_deviceCapacities' - The hardware specifications of the device.
--
-- 'lastUpdatedAt', 'describeDeviceResponse_lastUpdatedAt' - When the device last pushed an update to the Amazon Web Services Cloud.
-- Indicates when the device cache was refreshed.
--
-- 'associatedWithJob', 'describeDeviceResponse_associatedWithJob' - The ID of the job used when ordering the device.
--
-- 'lastReachedOutAt', 'describeDeviceResponse_lastReachedOutAt' - When the device last contacted the Amazon Web Services Cloud. Indicates
-- that the device is online.
--
-- 'software', 'describeDeviceResponse_software' - The software installed on the device.
--
-- 'physicalNetworkInterfaces', 'describeDeviceResponse_physicalNetworkInterfaces' - The network interfaces available on the device.
--
-- 'managedDeviceId', 'describeDeviceResponse_managedDeviceId' - The ID of the device that you checked the information for.
--
-- 'managedDeviceArn', 'describeDeviceResponse_managedDeviceArn' - The Amazon Resource Name (ARN) of the device.
--
-- 'deviceType', 'describeDeviceResponse_deviceType' - The type of Amazon Web Services Snow Family device.
--
-- 'tags', 'describeDeviceResponse_tags' - Optional metadata that you assign to a resource. You can use tags to
-- categorize a resource in different ways, such as by purpose, owner, or
-- environment.
--
-- 'httpStatus', 'describeDeviceResponse_httpStatus' - The response's http status code.
newDescribeDeviceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDeviceResponse
newDescribeDeviceResponse :: Int -> DescribeDeviceResponse
newDescribeDeviceResponse Int
pHttpStatus_ =
  DescribeDeviceResponse' :: Maybe UnlockState
-> Maybe [Capacity]
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe SoftwareInformation
-> Maybe [PhysicalNetworkInterface]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeDeviceResponse
DescribeDeviceResponse'
    { $sel:deviceState:DescribeDeviceResponse' :: Maybe UnlockState
deviceState =
        Maybe UnlockState
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceCapacities:DescribeDeviceResponse' :: Maybe [Capacity]
deviceCapacities = Maybe [Capacity]
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:DescribeDeviceResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:associatedWithJob:DescribeDeviceResponse' :: Maybe Text
associatedWithJob = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastReachedOutAt:DescribeDeviceResponse' :: Maybe POSIX
lastReachedOutAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:software:DescribeDeviceResponse' :: Maybe SoftwareInformation
software = Maybe SoftwareInformation
forall a. Maybe a
Prelude.Nothing,
      $sel:physicalNetworkInterfaces:DescribeDeviceResponse' :: Maybe [PhysicalNetworkInterface]
physicalNetworkInterfaces = Maybe [PhysicalNetworkInterface]
forall a. Maybe a
Prelude.Nothing,
      $sel:managedDeviceId:DescribeDeviceResponse' :: Maybe Text
managedDeviceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:managedDeviceArn:DescribeDeviceResponse' :: Maybe Text
managedDeviceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceType:DescribeDeviceResponse' :: Maybe Text
deviceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeDeviceResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDeviceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current state of the device.
describeDeviceResponse_deviceState :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe UnlockState)
describeDeviceResponse_deviceState :: (Maybe UnlockState -> f (Maybe UnlockState))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_deviceState = (DescribeDeviceResponse -> Maybe UnlockState)
-> (DescribeDeviceResponse
    -> Maybe UnlockState -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe UnlockState)
     (Maybe UnlockState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe UnlockState
deviceState :: Maybe UnlockState
$sel:deviceState:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe UnlockState
deviceState} -> Maybe UnlockState
deviceState) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe UnlockState
a -> DescribeDeviceResponse
s {$sel:deviceState:DescribeDeviceResponse' :: Maybe UnlockState
deviceState = Maybe UnlockState
a} :: DescribeDeviceResponse)

-- | The hardware specifications of the device.
describeDeviceResponse_deviceCapacities :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe [Capacity])
describeDeviceResponse_deviceCapacities :: (Maybe [Capacity] -> f (Maybe [Capacity]))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_deviceCapacities = (DescribeDeviceResponse -> Maybe [Capacity])
-> (DescribeDeviceResponse
    -> Maybe [Capacity] -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe [Capacity])
     (Maybe [Capacity])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe [Capacity]
deviceCapacities :: Maybe [Capacity]
$sel:deviceCapacities:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe [Capacity]
deviceCapacities} -> Maybe [Capacity]
deviceCapacities) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe [Capacity]
a -> DescribeDeviceResponse
s {$sel:deviceCapacities:DescribeDeviceResponse' :: Maybe [Capacity]
deviceCapacities = Maybe [Capacity]
a} :: DescribeDeviceResponse) ((Maybe [Capacity] -> f (Maybe [Capacity]))
 -> DescribeDeviceResponse -> f DescribeDeviceResponse)
-> ((Maybe [Capacity] -> f (Maybe [Capacity]))
    -> Maybe [Capacity] -> f (Maybe [Capacity]))
-> (Maybe [Capacity] -> f (Maybe [Capacity]))
-> DescribeDeviceResponse
-> f DescribeDeviceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Capacity] [Capacity] [Capacity] [Capacity]
-> Iso
     (Maybe [Capacity])
     (Maybe [Capacity])
     (Maybe [Capacity])
     (Maybe [Capacity])
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 [Capacity] [Capacity] [Capacity] [Capacity]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | When the device last pushed an update to the Amazon Web Services Cloud.
-- Indicates when the device cache was refreshed.
describeDeviceResponse_lastUpdatedAt :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.UTCTime)
describeDeviceResponse_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_lastUpdatedAt = (DescribeDeviceResponse -> Maybe POSIX)
-> (DescribeDeviceResponse
    -> Maybe POSIX -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe POSIX
a -> DescribeDeviceResponse
s {$sel:lastUpdatedAt:DescribeDeviceResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: DescribeDeviceResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDeviceResponse -> f DescribeDeviceResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDeviceResponse
-> f DescribeDeviceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The ID of the job used when ordering the device.
describeDeviceResponse_associatedWithJob :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_associatedWithJob :: (Maybe Text -> f (Maybe Text))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_associatedWithJob = (DescribeDeviceResponse -> Maybe Text)
-> (DescribeDeviceResponse -> Maybe Text -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
associatedWithJob :: Maybe Text
$sel:associatedWithJob:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
associatedWithJob} -> Maybe Text
associatedWithJob) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:associatedWithJob:DescribeDeviceResponse' :: Maybe Text
associatedWithJob = Maybe Text
a} :: DescribeDeviceResponse)

-- | When the device last contacted the Amazon Web Services Cloud. Indicates
-- that the device is online.
describeDeviceResponse_lastReachedOutAt :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.UTCTime)
describeDeviceResponse_lastReachedOutAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_lastReachedOutAt = (DescribeDeviceResponse -> Maybe POSIX)
-> (DescribeDeviceResponse
    -> Maybe POSIX -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe POSIX
lastReachedOutAt :: Maybe POSIX
$sel:lastReachedOutAt:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe POSIX
lastReachedOutAt} -> Maybe POSIX
lastReachedOutAt) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe POSIX
a -> DescribeDeviceResponse
s {$sel:lastReachedOutAt:DescribeDeviceResponse' :: Maybe POSIX
lastReachedOutAt = Maybe POSIX
a} :: DescribeDeviceResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDeviceResponse -> f DescribeDeviceResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDeviceResponse
-> f DescribeDeviceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The software installed on the device.
describeDeviceResponse_software :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe SoftwareInformation)
describeDeviceResponse_software :: (Maybe SoftwareInformation -> f (Maybe SoftwareInformation))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_software = (DescribeDeviceResponse -> Maybe SoftwareInformation)
-> (DescribeDeviceResponse
    -> Maybe SoftwareInformation -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe SoftwareInformation)
     (Maybe SoftwareInformation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe SoftwareInformation
software :: Maybe SoftwareInformation
$sel:software:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe SoftwareInformation
software} -> Maybe SoftwareInformation
software) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe SoftwareInformation
a -> DescribeDeviceResponse
s {$sel:software:DescribeDeviceResponse' :: Maybe SoftwareInformation
software = Maybe SoftwareInformation
a} :: DescribeDeviceResponse)

-- | The network interfaces available on the device.
describeDeviceResponse_physicalNetworkInterfaces :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe [PhysicalNetworkInterface])
describeDeviceResponse_physicalNetworkInterfaces :: (Maybe [PhysicalNetworkInterface]
 -> f (Maybe [PhysicalNetworkInterface]))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_physicalNetworkInterfaces = (DescribeDeviceResponse -> Maybe [PhysicalNetworkInterface])
-> (DescribeDeviceResponse
    -> Maybe [PhysicalNetworkInterface] -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe [PhysicalNetworkInterface])
     (Maybe [PhysicalNetworkInterface])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe [PhysicalNetworkInterface]
physicalNetworkInterfaces :: Maybe [PhysicalNetworkInterface]
$sel:physicalNetworkInterfaces:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe [PhysicalNetworkInterface]
physicalNetworkInterfaces} -> Maybe [PhysicalNetworkInterface]
physicalNetworkInterfaces) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe [PhysicalNetworkInterface]
a -> DescribeDeviceResponse
s {$sel:physicalNetworkInterfaces:DescribeDeviceResponse' :: Maybe [PhysicalNetworkInterface]
physicalNetworkInterfaces = Maybe [PhysicalNetworkInterface]
a} :: DescribeDeviceResponse) ((Maybe [PhysicalNetworkInterface]
  -> f (Maybe [PhysicalNetworkInterface]))
 -> DescribeDeviceResponse -> f DescribeDeviceResponse)
-> ((Maybe [PhysicalNetworkInterface]
     -> f (Maybe [PhysicalNetworkInterface]))
    -> Maybe [PhysicalNetworkInterface]
    -> f (Maybe [PhysicalNetworkInterface]))
-> (Maybe [PhysicalNetworkInterface]
    -> f (Maybe [PhysicalNetworkInterface]))
-> DescribeDeviceResponse
-> f DescribeDeviceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PhysicalNetworkInterface]
  [PhysicalNetworkInterface]
  [PhysicalNetworkInterface]
  [PhysicalNetworkInterface]
-> Iso
     (Maybe [PhysicalNetworkInterface])
     (Maybe [PhysicalNetworkInterface])
     (Maybe [PhysicalNetworkInterface])
     (Maybe [PhysicalNetworkInterface])
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
  [PhysicalNetworkInterface]
  [PhysicalNetworkInterface]
  [PhysicalNetworkInterface]
  [PhysicalNetworkInterface]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the device that you checked the information for.
describeDeviceResponse_managedDeviceId :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_managedDeviceId :: (Maybe Text -> f (Maybe Text))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_managedDeviceId = (DescribeDeviceResponse -> Maybe Text)
-> (DescribeDeviceResponse -> Maybe Text -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
managedDeviceId :: Maybe Text
$sel:managedDeviceId:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
managedDeviceId} -> Maybe Text
managedDeviceId) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:managedDeviceId:DescribeDeviceResponse' :: Maybe Text
managedDeviceId = Maybe Text
a} :: DescribeDeviceResponse)

-- | The Amazon Resource Name (ARN) of the device.
describeDeviceResponse_managedDeviceArn :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_managedDeviceArn :: (Maybe Text -> f (Maybe Text))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_managedDeviceArn = (DescribeDeviceResponse -> Maybe Text)
-> (DescribeDeviceResponse -> Maybe Text -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
managedDeviceArn :: Maybe Text
$sel:managedDeviceArn:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
managedDeviceArn} -> Maybe Text
managedDeviceArn) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:managedDeviceArn:DescribeDeviceResponse' :: Maybe Text
managedDeviceArn = Maybe Text
a} :: DescribeDeviceResponse)

-- | The type of Amazon Web Services Snow Family device.
describeDeviceResponse_deviceType :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe Prelude.Text)
describeDeviceResponse_deviceType :: (Maybe Text -> f (Maybe Text))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_deviceType = (DescribeDeviceResponse -> Maybe Text)
-> (DescribeDeviceResponse -> Maybe Text -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Maybe Text
deviceType :: Maybe Text
$sel:deviceType:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe Text
deviceType} -> Maybe Text
deviceType) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe Text
a -> DescribeDeviceResponse
s {$sel:deviceType:DescribeDeviceResponse' :: Maybe Text
deviceType = Maybe Text
a} :: DescribeDeviceResponse)

-- | Optional metadata that you assign to a resource. You can use tags to
-- categorize a resource in different ways, such as by purpose, owner, or
-- environment.
describeDeviceResponse_tags :: Lens.Lens' DescribeDeviceResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeDeviceResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_tags = (DescribeDeviceResponse -> Maybe (HashMap Text Text))
-> (DescribeDeviceResponse
    -> Maybe (HashMap Text Text) -> DescribeDeviceResponse)
-> Lens
     DescribeDeviceResponse
     DescribeDeviceResponse
     (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 (\DescribeDeviceResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeDeviceResponse' :: DescribeDeviceResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Maybe (HashMap Text Text)
a -> DescribeDeviceResponse
s {$sel:tags:DescribeDeviceResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeDeviceResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeDeviceResponse -> f DescribeDeviceResponse)
-> ((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)))
-> DescribeDeviceResponse
-> f DescribeDeviceResponse
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.
describeDeviceResponse_httpStatus :: Lens.Lens' DescribeDeviceResponse Prelude.Int
describeDeviceResponse_httpStatus :: (Int -> f Int)
-> DescribeDeviceResponse -> f DescribeDeviceResponse
describeDeviceResponse_httpStatus = (DescribeDeviceResponse -> Int)
-> (DescribeDeviceResponse -> Int -> DescribeDeviceResponse)
-> Lens DescribeDeviceResponse DescribeDeviceResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeDeviceResponse' :: DescribeDeviceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeDeviceResponse
s@DescribeDeviceResponse' {} Int
a -> DescribeDeviceResponse
s {$sel:httpStatus:DescribeDeviceResponse' :: Int
httpStatus = Int
a} :: DescribeDeviceResponse)

instance Prelude.NFData DescribeDeviceResponse