{-# 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.DescribeDeviceEc2Instances
-- 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 the current state of the Amazon EC2 instances. The output is
-- similar to @describeDevice@, but the results are sourced from the device
-- cache in the Amazon Web Services Cloud and include a subset of the
-- available fields.
module Amazonka.SnowDeviceManagement.DescribeDeviceEc2Instances
  ( -- * Creating a Request
    DescribeDeviceEc2Instances (..),
    newDescribeDeviceEc2Instances,

    -- * Request Lenses
    describeDeviceEc2Instances_instanceIds,
    describeDeviceEc2Instances_managedDeviceId,

    -- * Destructuring the Response
    DescribeDeviceEc2InstancesResponse (..),
    newDescribeDeviceEc2InstancesResponse,

    -- * Response Lenses
    describeDeviceEc2InstancesResponse_instances,
    describeDeviceEc2InstancesResponse_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:/ 'newDescribeDeviceEc2Instances' smart constructor.
data DescribeDeviceEc2Instances = DescribeDeviceEc2Instances'
  { -- | A list of instance IDs associated with the managed device.
    DescribeDeviceEc2Instances -> [Text]
instanceIds :: [Prelude.Text],
    -- | The ID of the managed device.
    DescribeDeviceEc2Instances -> Text
managedDeviceId :: Prelude.Text
  }
  deriving (DescribeDeviceEc2Instances -> DescribeDeviceEc2Instances -> Bool
(DescribeDeviceEc2Instances -> DescribeDeviceEc2Instances -> Bool)
-> (DescribeDeviceEc2Instances
    -> DescribeDeviceEc2Instances -> Bool)
-> Eq DescribeDeviceEc2Instances
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDeviceEc2Instances -> DescribeDeviceEc2Instances -> Bool
$c/= :: DescribeDeviceEc2Instances -> DescribeDeviceEc2Instances -> Bool
== :: DescribeDeviceEc2Instances -> DescribeDeviceEc2Instances -> Bool
$c== :: DescribeDeviceEc2Instances -> DescribeDeviceEc2Instances -> Bool
Prelude.Eq, ReadPrec [DescribeDeviceEc2Instances]
ReadPrec DescribeDeviceEc2Instances
Int -> ReadS DescribeDeviceEc2Instances
ReadS [DescribeDeviceEc2Instances]
(Int -> ReadS DescribeDeviceEc2Instances)
-> ReadS [DescribeDeviceEc2Instances]
-> ReadPrec DescribeDeviceEc2Instances
-> ReadPrec [DescribeDeviceEc2Instances]
-> Read DescribeDeviceEc2Instances
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDeviceEc2Instances]
$creadListPrec :: ReadPrec [DescribeDeviceEc2Instances]
readPrec :: ReadPrec DescribeDeviceEc2Instances
$creadPrec :: ReadPrec DescribeDeviceEc2Instances
readList :: ReadS [DescribeDeviceEc2Instances]
$creadList :: ReadS [DescribeDeviceEc2Instances]
readsPrec :: Int -> ReadS DescribeDeviceEc2Instances
$creadsPrec :: Int -> ReadS DescribeDeviceEc2Instances
Prelude.Read, Int -> DescribeDeviceEc2Instances -> ShowS
[DescribeDeviceEc2Instances] -> ShowS
DescribeDeviceEc2Instances -> String
(Int -> DescribeDeviceEc2Instances -> ShowS)
-> (DescribeDeviceEc2Instances -> String)
-> ([DescribeDeviceEc2Instances] -> ShowS)
-> Show DescribeDeviceEc2Instances
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDeviceEc2Instances] -> ShowS
$cshowList :: [DescribeDeviceEc2Instances] -> ShowS
show :: DescribeDeviceEc2Instances -> String
$cshow :: DescribeDeviceEc2Instances -> String
showsPrec :: Int -> DescribeDeviceEc2Instances -> ShowS
$cshowsPrec :: Int -> DescribeDeviceEc2Instances -> ShowS
Prelude.Show, (forall x.
 DescribeDeviceEc2Instances -> Rep DescribeDeviceEc2Instances x)
-> (forall x.
    Rep DescribeDeviceEc2Instances x -> DescribeDeviceEc2Instances)
-> Generic DescribeDeviceEc2Instances
forall x.
Rep DescribeDeviceEc2Instances x -> DescribeDeviceEc2Instances
forall x.
DescribeDeviceEc2Instances -> Rep DescribeDeviceEc2Instances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDeviceEc2Instances x -> DescribeDeviceEc2Instances
$cfrom :: forall x.
DescribeDeviceEc2Instances -> Rep DescribeDeviceEc2Instances x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDeviceEc2Instances' 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:
--
-- 'instanceIds', 'describeDeviceEc2Instances_instanceIds' - A list of instance IDs associated with the managed device.
--
-- 'managedDeviceId', 'describeDeviceEc2Instances_managedDeviceId' - The ID of the managed device.
newDescribeDeviceEc2Instances ::
  -- | 'managedDeviceId'
  Prelude.Text ->
  DescribeDeviceEc2Instances
newDescribeDeviceEc2Instances :: Text -> DescribeDeviceEc2Instances
newDescribeDeviceEc2Instances Text
pManagedDeviceId_ =
  DescribeDeviceEc2Instances' :: [Text] -> Text -> DescribeDeviceEc2Instances
DescribeDeviceEc2Instances'
    { $sel:instanceIds:DescribeDeviceEc2Instances' :: [Text]
instanceIds =
        [Text]
forall a. Monoid a => a
Prelude.mempty,
      $sel:managedDeviceId:DescribeDeviceEc2Instances' :: Text
managedDeviceId = Text
pManagedDeviceId_
    }

-- | A list of instance IDs associated with the managed device.
describeDeviceEc2Instances_instanceIds :: Lens.Lens' DescribeDeviceEc2Instances [Prelude.Text]
describeDeviceEc2Instances_instanceIds :: ([Text] -> f [Text])
-> DescribeDeviceEc2Instances -> f DescribeDeviceEc2Instances
describeDeviceEc2Instances_instanceIds = (DescribeDeviceEc2Instances -> [Text])
-> (DescribeDeviceEc2Instances
    -> [Text] -> DescribeDeviceEc2Instances)
-> Lens
     DescribeDeviceEc2Instances DescribeDeviceEc2Instances [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceEc2Instances' {[Text]
instanceIds :: [Text]
$sel:instanceIds:DescribeDeviceEc2Instances' :: DescribeDeviceEc2Instances -> [Text]
instanceIds} -> [Text]
instanceIds) (\s :: DescribeDeviceEc2Instances
s@DescribeDeviceEc2Instances' {} [Text]
a -> DescribeDeviceEc2Instances
s {$sel:instanceIds:DescribeDeviceEc2Instances' :: [Text]
instanceIds = [Text]
a} :: DescribeDeviceEc2Instances) (([Text] -> f [Text])
 -> DescribeDeviceEc2Instances -> f DescribeDeviceEc2Instances)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> DescribeDeviceEc2Instances
-> f DescribeDeviceEc2Instances
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the managed device.
describeDeviceEc2Instances_managedDeviceId :: Lens.Lens' DescribeDeviceEc2Instances Prelude.Text
describeDeviceEc2Instances_managedDeviceId :: (Text -> f Text)
-> DescribeDeviceEc2Instances -> f DescribeDeviceEc2Instances
describeDeviceEc2Instances_managedDeviceId = (DescribeDeviceEc2Instances -> Text)
-> (DescribeDeviceEc2Instances
    -> Text -> DescribeDeviceEc2Instances)
-> Lens
     DescribeDeviceEc2Instances DescribeDeviceEc2Instances Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceEc2Instances' {Text
managedDeviceId :: Text
$sel:managedDeviceId:DescribeDeviceEc2Instances' :: DescribeDeviceEc2Instances -> Text
managedDeviceId} -> Text
managedDeviceId) (\s :: DescribeDeviceEc2Instances
s@DescribeDeviceEc2Instances' {} Text
a -> DescribeDeviceEc2Instances
s {$sel:managedDeviceId:DescribeDeviceEc2Instances' :: Text
managedDeviceId = Text
a} :: DescribeDeviceEc2Instances)

instance Core.AWSRequest DescribeDeviceEc2Instances where
  type
    AWSResponse DescribeDeviceEc2Instances =
      DescribeDeviceEc2InstancesResponse
  request :: DescribeDeviceEc2Instances -> Request DescribeDeviceEc2Instances
request = Service
-> DescribeDeviceEc2Instances -> Request DescribeDeviceEc2Instances
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDeviceEc2Instances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDeviceEc2Instances)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeDeviceEc2Instances))
-> Logger
-> Service
-> Proxy DescribeDeviceEc2Instances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDeviceEc2Instances)))
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 [InstanceSummary]
-> Int -> DescribeDeviceEc2InstancesResponse
DescribeDeviceEc2InstancesResponse'
            (Maybe [InstanceSummary]
 -> Int -> DescribeDeviceEc2InstancesResponse)
-> Either String (Maybe [InstanceSummary])
-> Either String (Int -> DescribeDeviceEc2InstancesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [InstanceSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"instances" Either String (Maybe (Maybe [InstanceSummary]))
-> Maybe [InstanceSummary]
-> Either String (Maybe [InstanceSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [InstanceSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeDeviceEc2InstancesResponse)
-> Either String Int
-> Either String DescribeDeviceEc2InstancesResponse
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 DescribeDeviceEc2Instances

instance Prelude.NFData DescribeDeviceEc2Instances

instance Core.ToHeaders DescribeDeviceEc2Instances where
  toHeaders :: DescribeDeviceEc2Instances -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeDeviceEc2Instances -> 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 DescribeDeviceEc2Instances where
  toJSON :: DescribeDeviceEc2Instances -> Value
toJSON DescribeDeviceEc2Instances' {[Text]
Text
managedDeviceId :: Text
instanceIds :: [Text]
$sel:managedDeviceId:DescribeDeviceEc2Instances' :: DescribeDeviceEc2Instances -> Text
$sel:instanceIds:DescribeDeviceEc2Instances' :: DescribeDeviceEc2Instances -> [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"instanceIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
instanceIds)]
      )

instance Core.ToPath DescribeDeviceEc2Instances where
  toPath :: DescribeDeviceEc2Instances -> ByteString
toPath DescribeDeviceEc2Instances' {[Text]
Text
managedDeviceId :: Text
instanceIds :: [Text]
$sel:managedDeviceId:DescribeDeviceEc2Instances' :: DescribeDeviceEc2Instances -> Text
$sel:instanceIds:DescribeDeviceEc2Instances' :: DescribeDeviceEc2Instances -> [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
"/resources/ec2/describe"
      ]

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

-- | /See:/ 'newDescribeDeviceEc2InstancesResponse' smart constructor.
data DescribeDeviceEc2InstancesResponse = DescribeDeviceEc2InstancesResponse'
  { -- | A list of structures containing information about each instance.
    DescribeDeviceEc2InstancesResponse -> Maybe [InstanceSummary]
instances :: Prelude.Maybe [InstanceSummary],
    -- | The response's http status code.
    DescribeDeviceEc2InstancesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDeviceEc2InstancesResponse
-> DescribeDeviceEc2InstancesResponse -> Bool
(DescribeDeviceEc2InstancesResponse
 -> DescribeDeviceEc2InstancesResponse -> Bool)
-> (DescribeDeviceEc2InstancesResponse
    -> DescribeDeviceEc2InstancesResponse -> Bool)
-> Eq DescribeDeviceEc2InstancesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDeviceEc2InstancesResponse
-> DescribeDeviceEc2InstancesResponse -> Bool
$c/= :: DescribeDeviceEc2InstancesResponse
-> DescribeDeviceEc2InstancesResponse -> Bool
== :: DescribeDeviceEc2InstancesResponse
-> DescribeDeviceEc2InstancesResponse -> Bool
$c== :: DescribeDeviceEc2InstancesResponse
-> DescribeDeviceEc2InstancesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDeviceEc2InstancesResponse]
ReadPrec DescribeDeviceEc2InstancesResponse
Int -> ReadS DescribeDeviceEc2InstancesResponse
ReadS [DescribeDeviceEc2InstancesResponse]
(Int -> ReadS DescribeDeviceEc2InstancesResponse)
-> ReadS [DescribeDeviceEc2InstancesResponse]
-> ReadPrec DescribeDeviceEc2InstancesResponse
-> ReadPrec [DescribeDeviceEc2InstancesResponse]
-> Read DescribeDeviceEc2InstancesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDeviceEc2InstancesResponse]
$creadListPrec :: ReadPrec [DescribeDeviceEc2InstancesResponse]
readPrec :: ReadPrec DescribeDeviceEc2InstancesResponse
$creadPrec :: ReadPrec DescribeDeviceEc2InstancesResponse
readList :: ReadS [DescribeDeviceEc2InstancesResponse]
$creadList :: ReadS [DescribeDeviceEc2InstancesResponse]
readsPrec :: Int -> ReadS DescribeDeviceEc2InstancesResponse
$creadsPrec :: Int -> ReadS DescribeDeviceEc2InstancesResponse
Prelude.Read, Int -> DescribeDeviceEc2InstancesResponse -> ShowS
[DescribeDeviceEc2InstancesResponse] -> ShowS
DescribeDeviceEc2InstancesResponse -> String
(Int -> DescribeDeviceEc2InstancesResponse -> ShowS)
-> (DescribeDeviceEc2InstancesResponse -> String)
-> ([DescribeDeviceEc2InstancesResponse] -> ShowS)
-> Show DescribeDeviceEc2InstancesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDeviceEc2InstancesResponse] -> ShowS
$cshowList :: [DescribeDeviceEc2InstancesResponse] -> ShowS
show :: DescribeDeviceEc2InstancesResponse -> String
$cshow :: DescribeDeviceEc2InstancesResponse -> String
showsPrec :: Int -> DescribeDeviceEc2InstancesResponse -> ShowS
$cshowsPrec :: Int -> DescribeDeviceEc2InstancesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDeviceEc2InstancesResponse
 -> Rep DescribeDeviceEc2InstancesResponse x)
-> (forall x.
    Rep DescribeDeviceEc2InstancesResponse x
    -> DescribeDeviceEc2InstancesResponse)
-> Generic DescribeDeviceEc2InstancesResponse
forall x.
Rep DescribeDeviceEc2InstancesResponse x
-> DescribeDeviceEc2InstancesResponse
forall x.
DescribeDeviceEc2InstancesResponse
-> Rep DescribeDeviceEc2InstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDeviceEc2InstancesResponse x
-> DescribeDeviceEc2InstancesResponse
$cfrom :: forall x.
DescribeDeviceEc2InstancesResponse
-> Rep DescribeDeviceEc2InstancesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDeviceEc2InstancesResponse' 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:
--
-- 'instances', 'describeDeviceEc2InstancesResponse_instances' - A list of structures containing information about each instance.
--
-- 'httpStatus', 'describeDeviceEc2InstancesResponse_httpStatus' - The response's http status code.
newDescribeDeviceEc2InstancesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDeviceEc2InstancesResponse
newDescribeDeviceEc2InstancesResponse :: Int -> DescribeDeviceEc2InstancesResponse
newDescribeDeviceEc2InstancesResponse Int
pHttpStatus_ =
  DescribeDeviceEc2InstancesResponse' :: Maybe [InstanceSummary]
-> Int -> DescribeDeviceEc2InstancesResponse
DescribeDeviceEc2InstancesResponse'
    { $sel:instances:DescribeDeviceEc2InstancesResponse' :: Maybe [InstanceSummary]
instances =
        Maybe [InstanceSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDeviceEc2InstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of structures containing information about each instance.
describeDeviceEc2InstancesResponse_instances :: Lens.Lens' DescribeDeviceEc2InstancesResponse (Prelude.Maybe [InstanceSummary])
describeDeviceEc2InstancesResponse_instances :: (Maybe [InstanceSummary] -> f (Maybe [InstanceSummary]))
-> DescribeDeviceEc2InstancesResponse
-> f DescribeDeviceEc2InstancesResponse
describeDeviceEc2InstancesResponse_instances = (DescribeDeviceEc2InstancesResponse -> Maybe [InstanceSummary])
-> (DescribeDeviceEc2InstancesResponse
    -> Maybe [InstanceSummary] -> DescribeDeviceEc2InstancesResponse)
-> Lens
     DescribeDeviceEc2InstancesResponse
     DescribeDeviceEc2InstancesResponse
     (Maybe [InstanceSummary])
     (Maybe [InstanceSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDeviceEc2InstancesResponse' {Maybe [InstanceSummary]
instances :: Maybe [InstanceSummary]
$sel:instances:DescribeDeviceEc2InstancesResponse' :: DescribeDeviceEc2InstancesResponse -> Maybe [InstanceSummary]
instances} -> Maybe [InstanceSummary]
instances) (\s :: DescribeDeviceEc2InstancesResponse
s@DescribeDeviceEc2InstancesResponse' {} Maybe [InstanceSummary]
a -> DescribeDeviceEc2InstancesResponse
s {$sel:instances:DescribeDeviceEc2InstancesResponse' :: Maybe [InstanceSummary]
instances = Maybe [InstanceSummary]
a} :: DescribeDeviceEc2InstancesResponse) ((Maybe [InstanceSummary] -> f (Maybe [InstanceSummary]))
 -> DescribeDeviceEc2InstancesResponse
 -> f DescribeDeviceEc2InstancesResponse)
-> ((Maybe [InstanceSummary] -> f (Maybe [InstanceSummary]))
    -> Maybe [InstanceSummary] -> f (Maybe [InstanceSummary]))
-> (Maybe [InstanceSummary] -> f (Maybe [InstanceSummary]))
-> DescribeDeviceEc2InstancesResponse
-> f DescribeDeviceEc2InstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InstanceSummary]
  [InstanceSummary]
  [InstanceSummary]
  [InstanceSummary]
-> Iso
     (Maybe [InstanceSummary])
     (Maybe [InstanceSummary])
     (Maybe [InstanceSummary])
     (Maybe [InstanceSummary])
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
  [InstanceSummary]
  [InstanceSummary]
  [InstanceSummary]
  [InstanceSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeDeviceEc2InstancesResponse