{-# 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.OpsWorks.DescribeInstances
-- 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)
--
-- Requests a description of a set of instances.
--
-- This call accepts only one resource-identifying parameter.
--
-- __Required Permissions__: To use this action, an IAM user must have a
-- Show, Deploy, or Manage permissions level for the stack, or an attached
-- policy that explicitly grants permissions. For more information about
-- user permissions, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html Managing User Permissions>.
module Amazonka.OpsWorks.DescribeInstances
  ( -- * Creating a Request
    DescribeInstances (..),
    newDescribeInstances,

    -- * Request Lenses
    describeInstances_instanceIds,
    describeInstances_stackId,
    describeInstances_layerId,

    -- * Destructuring the Response
    DescribeInstancesResponse (..),
    newDescribeInstancesResponse,

    -- * Response Lenses
    describeInstancesResponse_instances,
    describeInstancesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeInstances' smart constructor.
data DescribeInstances = DescribeInstances'
  { -- | An array of instance IDs to be described. If you use this parameter,
    -- @DescribeInstances@ returns a description of the specified instances.
    -- Otherwise, it returns a description of every instance.
    DescribeInstances -> Maybe [Text]
instanceIds :: Prelude.Maybe [Prelude.Text],
    -- | A stack ID. If you use this parameter, @DescribeInstances@ returns
    -- descriptions of the instances associated with the specified stack.
    DescribeInstances -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | A layer ID. If you use this parameter, @DescribeInstances@ returns
    -- descriptions of the instances associated with the specified layer.
    DescribeInstances -> Maybe Text
layerId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeInstances -> DescribeInstances -> Bool
(DescribeInstances -> DescribeInstances -> Bool)
-> (DescribeInstances -> DescribeInstances -> Bool)
-> Eq DescribeInstances
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInstances -> DescribeInstances -> Bool
$c/= :: DescribeInstances -> DescribeInstances -> Bool
== :: DescribeInstances -> DescribeInstances -> Bool
$c== :: DescribeInstances -> DescribeInstances -> Bool
Prelude.Eq, ReadPrec [DescribeInstances]
ReadPrec DescribeInstances
Int -> ReadS DescribeInstances
ReadS [DescribeInstances]
(Int -> ReadS DescribeInstances)
-> ReadS [DescribeInstances]
-> ReadPrec DescribeInstances
-> ReadPrec [DescribeInstances]
-> Read DescribeInstances
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInstances]
$creadListPrec :: ReadPrec [DescribeInstances]
readPrec :: ReadPrec DescribeInstances
$creadPrec :: ReadPrec DescribeInstances
readList :: ReadS [DescribeInstances]
$creadList :: ReadS [DescribeInstances]
readsPrec :: Int -> ReadS DescribeInstances
$creadsPrec :: Int -> ReadS DescribeInstances
Prelude.Read, Int -> DescribeInstances -> ShowS
[DescribeInstances] -> ShowS
DescribeInstances -> String
(Int -> DescribeInstances -> ShowS)
-> (DescribeInstances -> String)
-> ([DescribeInstances] -> ShowS)
-> Show DescribeInstances
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInstances] -> ShowS
$cshowList :: [DescribeInstances] -> ShowS
show :: DescribeInstances -> String
$cshow :: DescribeInstances -> String
showsPrec :: Int -> DescribeInstances -> ShowS
$cshowsPrec :: Int -> DescribeInstances -> ShowS
Prelude.Show, (forall x. DescribeInstances -> Rep DescribeInstances x)
-> (forall x. Rep DescribeInstances x -> DescribeInstances)
-> Generic DescribeInstances
forall x. Rep DescribeInstances x -> DescribeInstances
forall x. DescribeInstances -> Rep DescribeInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeInstances x -> DescribeInstances
$cfrom :: forall x. DescribeInstances -> Rep DescribeInstances x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInstances' 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', 'describeInstances_instanceIds' - An array of instance IDs to be described. If you use this parameter,
-- @DescribeInstances@ returns a description of the specified instances.
-- Otherwise, it returns a description of every instance.
--
-- 'stackId', 'describeInstances_stackId' - A stack ID. If you use this parameter, @DescribeInstances@ returns
-- descriptions of the instances associated with the specified stack.
--
-- 'layerId', 'describeInstances_layerId' - A layer ID. If you use this parameter, @DescribeInstances@ returns
-- descriptions of the instances associated with the specified layer.
newDescribeInstances ::
  DescribeInstances
newDescribeInstances :: DescribeInstances
newDescribeInstances =
  DescribeInstances' :: Maybe [Text] -> Maybe Text -> Maybe Text -> DescribeInstances
DescribeInstances'
    { $sel:instanceIds:DescribeInstances' :: Maybe [Text]
instanceIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:DescribeInstances' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:layerId:DescribeInstances' :: Maybe Text
layerId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | An array of instance IDs to be described. If you use this parameter,
-- @DescribeInstances@ returns a description of the specified instances.
-- Otherwise, it returns a description of every instance.
describeInstances_instanceIds :: Lens.Lens' DescribeInstances (Prelude.Maybe [Prelude.Text])
describeInstances_instanceIds :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeInstances -> f DescribeInstances
describeInstances_instanceIds = (DescribeInstances -> Maybe [Text])
-> (DescribeInstances -> Maybe [Text] -> DescribeInstances)
-> Lens
     DescribeInstances DescribeInstances (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstances' {Maybe [Text]
instanceIds :: Maybe [Text]
$sel:instanceIds:DescribeInstances' :: DescribeInstances -> Maybe [Text]
instanceIds} -> Maybe [Text]
instanceIds) (\s :: DescribeInstances
s@DescribeInstances' {} Maybe [Text]
a -> DescribeInstances
s {$sel:instanceIds:DescribeInstances' :: Maybe [Text]
instanceIds = Maybe [Text]
a} :: DescribeInstances) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeInstances -> f DescribeInstances)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeInstances
-> f DescribeInstances
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A stack ID. If you use this parameter, @DescribeInstances@ returns
-- descriptions of the instances associated with the specified stack.
describeInstances_stackId :: Lens.Lens' DescribeInstances (Prelude.Maybe Prelude.Text)
describeInstances_stackId :: (Maybe Text -> f (Maybe Text))
-> DescribeInstances -> f DescribeInstances
describeInstances_stackId = (DescribeInstances -> Maybe Text)
-> (DescribeInstances -> Maybe Text -> DescribeInstances)
-> Lens
     DescribeInstances DescribeInstances (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstances' {Maybe Text
stackId :: Maybe Text
$sel:stackId:DescribeInstances' :: DescribeInstances -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: DescribeInstances
s@DescribeInstances' {} Maybe Text
a -> DescribeInstances
s {$sel:stackId:DescribeInstances' :: Maybe Text
stackId = Maybe Text
a} :: DescribeInstances)

-- | A layer ID. If you use this parameter, @DescribeInstances@ returns
-- descriptions of the instances associated with the specified layer.
describeInstances_layerId :: Lens.Lens' DescribeInstances (Prelude.Maybe Prelude.Text)
describeInstances_layerId :: (Maybe Text -> f (Maybe Text))
-> DescribeInstances -> f DescribeInstances
describeInstances_layerId = (DescribeInstances -> Maybe Text)
-> (DescribeInstances -> Maybe Text -> DescribeInstances)
-> Lens
     DescribeInstances DescribeInstances (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstances' {Maybe Text
layerId :: Maybe Text
$sel:layerId:DescribeInstances' :: DescribeInstances -> Maybe Text
layerId} -> Maybe Text
layerId) (\s :: DescribeInstances
s@DescribeInstances' {} Maybe Text
a -> DescribeInstances
s {$sel:layerId:DescribeInstances' :: Maybe Text
layerId = Maybe Text
a} :: DescribeInstances)

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

instance Prelude.NFData DescribeInstances

instance Core.ToHeaders DescribeInstances where
  toHeaders :: DescribeInstances -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeInstances -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"OpsWorks_20130218.DescribeInstances" ::
                          Prelude.ByteString
                      ),
            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 DescribeInstances where
  toJSON :: DescribeInstances -> Value
toJSON DescribeInstances' {Maybe [Text]
Maybe Text
layerId :: Maybe Text
stackId :: Maybe Text
instanceIds :: Maybe [Text]
$sel:layerId:DescribeInstances' :: DescribeInstances -> Maybe Text
$sel:stackId:DescribeInstances' :: DescribeInstances -> Maybe Text
$sel:instanceIds:DescribeInstances' :: DescribeInstances -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"InstanceIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
instanceIds,
            (Text
"StackId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
stackId,
            (Text
"LayerId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
layerId
          ]
      )

instance Core.ToPath DescribeInstances where
  toPath :: DescribeInstances -> ByteString
toPath = ByteString -> DescribeInstances -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | Contains the response to a @DescribeInstances@ request.
--
-- /See:/ 'newDescribeInstancesResponse' smart constructor.
data DescribeInstancesResponse = DescribeInstancesResponse'
  { -- | An array of @Instance@ objects that describe the instances.
    DescribeInstancesResponse -> Maybe [Instance]
instances :: Prelude.Maybe [Instance],
    -- | The response's http status code.
    DescribeInstancesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeInstancesResponse -> DescribeInstancesResponse -> Bool
(DescribeInstancesResponse -> DescribeInstancesResponse -> Bool)
-> (DescribeInstancesResponse -> DescribeInstancesResponse -> Bool)
-> Eq DescribeInstancesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInstancesResponse -> DescribeInstancesResponse -> Bool
$c/= :: DescribeInstancesResponse -> DescribeInstancesResponse -> Bool
== :: DescribeInstancesResponse -> DescribeInstancesResponse -> Bool
$c== :: DescribeInstancesResponse -> DescribeInstancesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeInstancesResponse]
ReadPrec DescribeInstancesResponse
Int -> ReadS DescribeInstancesResponse
ReadS [DescribeInstancesResponse]
(Int -> ReadS DescribeInstancesResponse)
-> ReadS [DescribeInstancesResponse]
-> ReadPrec DescribeInstancesResponse
-> ReadPrec [DescribeInstancesResponse]
-> Read DescribeInstancesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInstancesResponse]
$creadListPrec :: ReadPrec [DescribeInstancesResponse]
readPrec :: ReadPrec DescribeInstancesResponse
$creadPrec :: ReadPrec DescribeInstancesResponse
readList :: ReadS [DescribeInstancesResponse]
$creadList :: ReadS [DescribeInstancesResponse]
readsPrec :: Int -> ReadS DescribeInstancesResponse
$creadsPrec :: Int -> ReadS DescribeInstancesResponse
Prelude.Read, Int -> DescribeInstancesResponse -> ShowS
[DescribeInstancesResponse] -> ShowS
DescribeInstancesResponse -> String
(Int -> DescribeInstancesResponse -> ShowS)
-> (DescribeInstancesResponse -> String)
-> ([DescribeInstancesResponse] -> ShowS)
-> Show DescribeInstancesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInstancesResponse] -> ShowS
$cshowList :: [DescribeInstancesResponse] -> ShowS
show :: DescribeInstancesResponse -> String
$cshow :: DescribeInstancesResponse -> String
showsPrec :: Int -> DescribeInstancesResponse -> ShowS
$cshowsPrec :: Int -> DescribeInstancesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeInstancesResponse -> Rep DescribeInstancesResponse x)
-> (forall x.
    Rep DescribeInstancesResponse x -> DescribeInstancesResponse)
-> Generic DescribeInstancesResponse
forall x.
Rep DescribeInstancesResponse x -> DescribeInstancesResponse
forall x.
DescribeInstancesResponse -> Rep DescribeInstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeInstancesResponse x -> DescribeInstancesResponse
$cfrom :: forall x.
DescribeInstancesResponse -> Rep DescribeInstancesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInstancesResponse' 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', 'describeInstancesResponse_instances' - An array of @Instance@ objects that describe the instances.
--
-- 'httpStatus', 'describeInstancesResponse_httpStatus' - The response's http status code.
newDescribeInstancesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeInstancesResponse
newDescribeInstancesResponse :: Int -> DescribeInstancesResponse
newDescribeInstancesResponse Int
pHttpStatus_ =
  DescribeInstancesResponse' :: Maybe [Instance] -> Int -> DescribeInstancesResponse
DescribeInstancesResponse'
    { $sel:instances:DescribeInstancesResponse' :: Maybe [Instance]
instances =
        Maybe [Instance]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of @Instance@ objects that describe the instances.
describeInstancesResponse_instances :: Lens.Lens' DescribeInstancesResponse (Prelude.Maybe [Instance])
describeInstancesResponse_instances :: (Maybe [Instance] -> f (Maybe [Instance]))
-> DescribeInstancesResponse -> f DescribeInstancesResponse
describeInstancesResponse_instances = (DescribeInstancesResponse -> Maybe [Instance])
-> (DescribeInstancesResponse
    -> Maybe [Instance] -> DescribeInstancesResponse)
-> Lens
     DescribeInstancesResponse
     DescribeInstancesResponse
     (Maybe [Instance])
     (Maybe [Instance])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInstancesResponse' {Maybe [Instance]
instances :: Maybe [Instance]
$sel:instances:DescribeInstancesResponse' :: DescribeInstancesResponse -> Maybe [Instance]
instances} -> Maybe [Instance]
instances) (\s :: DescribeInstancesResponse
s@DescribeInstancesResponse' {} Maybe [Instance]
a -> DescribeInstancesResponse
s {$sel:instances:DescribeInstancesResponse' :: Maybe [Instance]
instances = Maybe [Instance]
a} :: DescribeInstancesResponse) ((Maybe [Instance] -> f (Maybe [Instance]))
 -> DescribeInstancesResponse -> f DescribeInstancesResponse)
-> ((Maybe [Instance] -> f (Maybe [Instance]))
    -> Maybe [Instance] -> f (Maybe [Instance]))
-> (Maybe [Instance] -> f (Maybe [Instance]))
-> DescribeInstancesResponse
-> f DescribeInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Instance] [Instance] [Instance] [Instance]
-> Iso
     (Maybe [Instance])
     (Maybe [Instance])
     (Maybe [Instance])
     (Maybe [Instance])
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 [Instance] [Instance] [Instance] [Instance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeInstancesResponse