{-# 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.ECS.DescribeContainerInstances
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes one or more container instances. Returns metadata about each
-- container instance requested.
module Amazonka.ECS.DescribeContainerInstances
  ( -- * Creating a Request
    DescribeContainerInstances (..),
    newDescribeContainerInstances,

    -- * Request Lenses
    describeContainerInstances_cluster,
    describeContainerInstances_include,
    describeContainerInstances_containerInstances,

    -- * Destructuring the Response
    DescribeContainerInstancesResponse (..),
    newDescribeContainerInstancesResponse,

    -- * Response Lenses
    describeContainerInstancesResponse_containerInstances,
    describeContainerInstancesResponse_failures,
    describeContainerInstancesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ECS.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeContainerInstances' smart constructor.
data DescribeContainerInstances = DescribeContainerInstances'
  { -- | The short name or full Amazon Resource Name (ARN) of the cluster that
    -- hosts the container instances to describe. If you do not specify a
    -- cluster, the default cluster is assumed. This parameter is required if
    -- the container instance or container instances you are describing were
    -- launched in any cluster other than the default cluster.
    DescribeContainerInstances -> Maybe Text
cluster :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether you want to see the resource tags for the container
    -- instance. If @TAGS@ is specified, the tags are included in the response.
    -- If @CONTAINER_INSTANCE_HEALTH@ is specified, the container instance
    -- health is included in the response. If this field is omitted, tags and
    -- container instance health status aren\'t included in the response.
    DescribeContainerInstances -> Maybe [ContainerInstanceField]
include :: Prelude.Maybe [ContainerInstanceField],
    -- | A list of up to 100 container instance IDs or full Amazon Resource Name
    -- (ARN) entries.
    DescribeContainerInstances -> [Text]
containerInstances :: [Prelude.Text]
  }
  deriving (DescribeContainerInstances -> DescribeContainerInstances -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeContainerInstances -> DescribeContainerInstances -> Bool
$c/= :: DescribeContainerInstances -> DescribeContainerInstances -> Bool
== :: DescribeContainerInstances -> DescribeContainerInstances -> Bool
$c== :: DescribeContainerInstances -> DescribeContainerInstances -> Bool
Prelude.Eq, ReadPrec [DescribeContainerInstances]
ReadPrec DescribeContainerInstances
Int -> ReadS DescribeContainerInstances
ReadS [DescribeContainerInstances]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeContainerInstances]
$creadListPrec :: ReadPrec [DescribeContainerInstances]
readPrec :: ReadPrec DescribeContainerInstances
$creadPrec :: ReadPrec DescribeContainerInstances
readList :: ReadS [DescribeContainerInstances]
$creadList :: ReadS [DescribeContainerInstances]
readsPrec :: Int -> ReadS DescribeContainerInstances
$creadsPrec :: Int -> ReadS DescribeContainerInstances
Prelude.Read, Int -> DescribeContainerInstances -> ShowS
[DescribeContainerInstances] -> ShowS
DescribeContainerInstances -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeContainerInstances] -> ShowS
$cshowList :: [DescribeContainerInstances] -> ShowS
show :: DescribeContainerInstances -> String
$cshow :: DescribeContainerInstances -> String
showsPrec :: Int -> DescribeContainerInstances -> ShowS
$cshowsPrec :: Int -> DescribeContainerInstances -> ShowS
Prelude.Show, forall x.
Rep DescribeContainerInstances x -> DescribeContainerInstances
forall x.
DescribeContainerInstances -> Rep DescribeContainerInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeContainerInstances x -> DescribeContainerInstances
$cfrom :: forall x.
DescribeContainerInstances -> Rep DescribeContainerInstances x
Prelude.Generic)

-- |
-- Create a value of 'DescribeContainerInstances' 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:
--
-- 'cluster', 'describeContainerInstances_cluster' - The short name or full Amazon Resource Name (ARN) of the cluster that
-- hosts the container instances to describe. If you do not specify a
-- cluster, the default cluster is assumed. This parameter is required if
-- the container instance or container instances you are describing were
-- launched in any cluster other than the default cluster.
--
-- 'include', 'describeContainerInstances_include' - Specifies whether you want to see the resource tags for the container
-- instance. If @TAGS@ is specified, the tags are included in the response.
-- If @CONTAINER_INSTANCE_HEALTH@ is specified, the container instance
-- health is included in the response. If this field is omitted, tags and
-- container instance health status aren\'t included in the response.
--
-- 'containerInstances', 'describeContainerInstances_containerInstances' - A list of up to 100 container instance IDs or full Amazon Resource Name
-- (ARN) entries.
newDescribeContainerInstances ::
  DescribeContainerInstances
newDescribeContainerInstances :: DescribeContainerInstances
newDescribeContainerInstances =
  DescribeContainerInstances'
    { $sel:cluster:DescribeContainerInstances' :: Maybe Text
cluster =
        forall a. Maybe a
Prelude.Nothing,
      $sel:include:DescribeContainerInstances' :: Maybe [ContainerInstanceField]
include = forall a. Maybe a
Prelude.Nothing,
      $sel:containerInstances:DescribeContainerInstances' :: [Text]
containerInstances = forall a. Monoid a => a
Prelude.mempty
    }

-- | The short name or full Amazon Resource Name (ARN) of the cluster that
-- hosts the container instances to describe. If you do not specify a
-- cluster, the default cluster is assumed. This parameter is required if
-- the container instance or container instances you are describing were
-- launched in any cluster other than the default cluster.
describeContainerInstances_cluster :: Lens.Lens' DescribeContainerInstances (Prelude.Maybe Prelude.Text)
describeContainerInstances_cluster :: Lens' DescribeContainerInstances (Maybe Text)
describeContainerInstances_cluster = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContainerInstances' {Maybe Text
cluster :: Maybe Text
$sel:cluster:DescribeContainerInstances' :: DescribeContainerInstances -> Maybe Text
cluster} -> Maybe Text
cluster) (\s :: DescribeContainerInstances
s@DescribeContainerInstances' {} Maybe Text
a -> DescribeContainerInstances
s {$sel:cluster:DescribeContainerInstances' :: Maybe Text
cluster = Maybe Text
a} :: DescribeContainerInstances)

-- | Specifies whether you want to see the resource tags for the container
-- instance. If @TAGS@ is specified, the tags are included in the response.
-- If @CONTAINER_INSTANCE_HEALTH@ is specified, the container instance
-- health is included in the response. If this field is omitted, tags and
-- container instance health status aren\'t included in the response.
describeContainerInstances_include :: Lens.Lens' DescribeContainerInstances (Prelude.Maybe [ContainerInstanceField])
describeContainerInstances_include :: Lens' DescribeContainerInstances (Maybe [ContainerInstanceField])
describeContainerInstances_include = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContainerInstances' {Maybe [ContainerInstanceField]
include :: Maybe [ContainerInstanceField]
$sel:include:DescribeContainerInstances' :: DescribeContainerInstances -> Maybe [ContainerInstanceField]
include} -> Maybe [ContainerInstanceField]
include) (\s :: DescribeContainerInstances
s@DescribeContainerInstances' {} Maybe [ContainerInstanceField]
a -> DescribeContainerInstances
s {$sel:include:DescribeContainerInstances' :: Maybe [ContainerInstanceField]
include = Maybe [ContainerInstanceField]
a} :: DescribeContainerInstances) 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

-- | A list of up to 100 container instance IDs or full Amazon Resource Name
-- (ARN) entries.
describeContainerInstances_containerInstances :: Lens.Lens' DescribeContainerInstances [Prelude.Text]
describeContainerInstances_containerInstances :: Lens' DescribeContainerInstances [Text]
describeContainerInstances_containerInstances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContainerInstances' {[Text]
containerInstances :: [Text]
$sel:containerInstances:DescribeContainerInstances' :: DescribeContainerInstances -> [Text]
containerInstances} -> [Text]
containerInstances) (\s :: DescribeContainerInstances
s@DescribeContainerInstances' {} [Text]
a -> DescribeContainerInstances
s {$sel:containerInstances:DescribeContainerInstances' :: [Text]
containerInstances = [Text]
a} :: DescribeContainerInstances) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest DescribeContainerInstances where
  type
    AWSResponse DescribeContainerInstances =
      DescribeContainerInstancesResponse
  request :: (Service -> Service)
-> DescribeContainerInstances -> Request DescribeContainerInstances
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeContainerInstances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeContainerInstances)))
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 [ContainerInstance]
-> Maybe [Failure] -> Int -> DescribeContainerInstancesResponse
DescribeContainerInstancesResponse'
            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
"containerInstances"
                            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.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"failures" 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 DescribeContainerInstances where
  hashWithSalt :: Int -> DescribeContainerInstances -> Int
hashWithSalt Int
_salt DescribeContainerInstances' {[Text]
Maybe [ContainerInstanceField]
Maybe Text
containerInstances :: [Text]
include :: Maybe [ContainerInstanceField]
cluster :: Maybe Text
$sel:containerInstances:DescribeContainerInstances' :: DescribeContainerInstances -> [Text]
$sel:include:DescribeContainerInstances' :: DescribeContainerInstances -> Maybe [ContainerInstanceField]
$sel:cluster:DescribeContainerInstances' :: DescribeContainerInstances -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cluster
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ContainerInstanceField]
include
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
containerInstances

instance Prelude.NFData DescribeContainerInstances where
  rnf :: DescribeContainerInstances -> ()
rnf DescribeContainerInstances' {[Text]
Maybe [ContainerInstanceField]
Maybe Text
containerInstances :: [Text]
include :: Maybe [ContainerInstanceField]
cluster :: Maybe Text
$sel:containerInstances:DescribeContainerInstances' :: DescribeContainerInstances -> [Text]
$sel:include:DescribeContainerInstances' :: DescribeContainerInstances -> Maybe [ContainerInstanceField]
$sel:cluster:DescribeContainerInstances' :: DescribeContainerInstances -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cluster
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ContainerInstanceField]
include
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
containerInstances

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

instance Data.ToJSON DescribeContainerInstances where
  toJSON :: DescribeContainerInstances -> Value
toJSON DescribeContainerInstances' {[Text]
Maybe [ContainerInstanceField]
Maybe Text
containerInstances :: [Text]
include :: Maybe [ContainerInstanceField]
cluster :: Maybe Text
$sel:containerInstances:DescribeContainerInstances' :: DescribeContainerInstances -> [Text]
$sel:include:DescribeContainerInstances' :: DescribeContainerInstances -> Maybe [ContainerInstanceField]
$sel:cluster:DescribeContainerInstances' :: DescribeContainerInstances -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"cluster" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
cluster,
            (Key
"include" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ContainerInstanceField]
include,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"containerInstances" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Text]
containerInstances)
          ]
      )

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

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

-- | /See:/ 'newDescribeContainerInstancesResponse' smart constructor.
data DescribeContainerInstancesResponse = DescribeContainerInstancesResponse'
  { -- | The list of container instances.
    DescribeContainerInstancesResponse -> Maybe [ContainerInstance]
containerInstances :: Prelude.Maybe [ContainerInstance],
    -- | Any failures associated with the call.
    DescribeContainerInstancesResponse -> Maybe [Failure]
failures :: Prelude.Maybe [Failure],
    -- | The response's http status code.
    DescribeContainerInstancesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeContainerInstancesResponse
-> DescribeContainerInstancesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeContainerInstancesResponse
-> DescribeContainerInstancesResponse -> Bool
$c/= :: DescribeContainerInstancesResponse
-> DescribeContainerInstancesResponse -> Bool
== :: DescribeContainerInstancesResponse
-> DescribeContainerInstancesResponse -> Bool
$c== :: DescribeContainerInstancesResponse
-> DescribeContainerInstancesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeContainerInstancesResponse]
ReadPrec DescribeContainerInstancesResponse
Int -> ReadS DescribeContainerInstancesResponse
ReadS [DescribeContainerInstancesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeContainerInstancesResponse]
$creadListPrec :: ReadPrec [DescribeContainerInstancesResponse]
readPrec :: ReadPrec DescribeContainerInstancesResponse
$creadPrec :: ReadPrec DescribeContainerInstancesResponse
readList :: ReadS [DescribeContainerInstancesResponse]
$creadList :: ReadS [DescribeContainerInstancesResponse]
readsPrec :: Int -> ReadS DescribeContainerInstancesResponse
$creadsPrec :: Int -> ReadS DescribeContainerInstancesResponse
Prelude.Read, Int -> DescribeContainerInstancesResponse -> ShowS
[DescribeContainerInstancesResponse] -> ShowS
DescribeContainerInstancesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeContainerInstancesResponse] -> ShowS
$cshowList :: [DescribeContainerInstancesResponse] -> ShowS
show :: DescribeContainerInstancesResponse -> String
$cshow :: DescribeContainerInstancesResponse -> String
showsPrec :: Int -> DescribeContainerInstancesResponse -> ShowS
$cshowsPrec :: Int -> DescribeContainerInstancesResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeContainerInstancesResponse x
-> DescribeContainerInstancesResponse
forall x.
DescribeContainerInstancesResponse
-> Rep DescribeContainerInstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeContainerInstancesResponse x
-> DescribeContainerInstancesResponse
$cfrom :: forall x.
DescribeContainerInstancesResponse
-> Rep DescribeContainerInstancesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeContainerInstancesResponse' 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:
--
-- 'containerInstances', 'describeContainerInstancesResponse_containerInstances' - The list of container instances.
--
-- 'failures', 'describeContainerInstancesResponse_failures' - Any failures associated with the call.
--
-- 'httpStatus', 'describeContainerInstancesResponse_httpStatus' - The response's http status code.
newDescribeContainerInstancesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeContainerInstancesResponse
newDescribeContainerInstancesResponse :: Int -> DescribeContainerInstancesResponse
newDescribeContainerInstancesResponse Int
pHttpStatus_ =
  DescribeContainerInstancesResponse'
    { $sel:containerInstances:DescribeContainerInstancesResponse' :: Maybe [ContainerInstance]
containerInstances =
        forall a. Maybe a
Prelude.Nothing,
      $sel:failures:DescribeContainerInstancesResponse' :: Maybe [Failure]
failures = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeContainerInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of container instances.
describeContainerInstancesResponse_containerInstances :: Lens.Lens' DescribeContainerInstancesResponse (Prelude.Maybe [ContainerInstance])
describeContainerInstancesResponse_containerInstances :: Lens'
  DescribeContainerInstancesResponse (Maybe [ContainerInstance])
describeContainerInstancesResponse_containerInstances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContainerInstancesResponse' {Maybe [ContainerInstance]
containerInstances :: Maybe [ContainerInstance]
$sel:containerInstances:DescribeContainerInstancesResponse' :: DescribeContainerInstancesResponse -> Maybe [ContainerInstance]
containerInstances} -> Maybe [ContainerInstance]
containerInstances) (\s :: DescribeContainerInstancesResponse
s@DescribeContainerInstancesResponse' {} Maybe [ContainerInstance]
a -> DescribeContainerInstancesResponse
s {$sel:containerInstances:DescribeContainerInstancesResponse' :: Maybe [ContainerInstance]
containerInstances = Maybe [ContainerInstance]
a} :: DescribeContainerInstancesResponse) 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

-- | Any failures associated with the call.
describeContainerInstancesResponse_failures :: Lens.Lens' DescribeContainerInstancesResponse (Prelude.Maybe [Failure])
describeContainerInstancesResponse_failures :: Lens' DescribeContainerInstancesResponse (Maybe [Failure])
describeContainerInstancesResponse_failures = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContainerInstancesResponse' {Maybe [Failure]
failures :: Maybe [Failure]
$sel:failures:DescribeContainerInstancesResponse' :: DescribeContainerInstancesResponse -> Maybe [Failure]
failures} -> Maybe [Failure]
failures) (\s :: DescribeContainerInstancesResponse
s@DescribeContainerInstancesResponse' {} Maybe [Failure]
a -> DescribeContainerInstancesResponse
s {$sel:failures:DescribeContainerInstancesResponse' :: Maybe [Failure]
failures = Maybe [Failure]
a} :: DescribeContainerInstancesResponse) 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.
describeContainerInstancesResponse_httpStatus :: Lens.Lens' DescribeContainerInstancesResponse Prelude.Int
describeContainerInstancesResponse_httpStatus :: Lens' DescribeContainerInstancesResponse Int
describeContainerInstancesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContainerInstancesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeContainerInstancesResponse' :: DescribeContainerInstancesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeContainerInstancesResponse
s@DescribeContainerInstancesResponse' {} Int
a -> DescribeContainerInstancesResponse
s {$sel:httpStatus:DescribeContainerInstancesResponse' :: Int
httpStatus = Int
a} :: DescribeContainerInstancesResponse)

instance
  Prelude.NFData
    DescribeContainerInstancesResponse
  where
  rnf :: DescribeContainerInstancesResponse -> ()
rnf DescribeContainerInstancesResponse' {Int
Maybe [Failure]
Maybe [ContainerInstance]
httpStatus :: Int
failures :: Maybe [Failure]
containerInstances :: Maybe [ContainerInstance]
$sel:httpStatus:DescribeContainerInstancesResponse' :: DescribeContainerInstancesResponse -> Int
$sel:failures:DescribeContainerInstancesResponse' :: DescribeContainerInstancesResponse -> Maybe [Failure]
$sel:containerInstances:DescribeContainerInstancesResponse' :: DescribeContainerInstancesResponse -> Maybe [ContainerInstance]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ContainerInstance]
containerInstances
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Failure]
failures
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus