{-# 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.DescribeTaskSets
-- 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)
--
-- Describes the task sets in the specified cluster and service. This is
-- used when a service uses the @EXTERNAL@ deployment controller type. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html Amazon ECS Deployment Types>
-- in the /Amazon Elastic Container Service Developer Guide/.
module Amazonka.ECS.DescribeTaskSets
  ( -- * Creating a Request
    DescribeTaskSets (..),
    newDescribeTaskSets,

    -- * Request Lenses
    describeTaskSets_taskSets,
    describeTaskSets_include,
    describeTaskSets_cluster,
    describeTaskSets_service,

    -- * Destructuring the Response
    DescribeTaskSetsResponse (..),
    newDescribeTaskSetsResponse,

    -- * Response Lenses
    describeTaskSetsResponse_taskSets,
    describeTaskSetsResponse_failures,
    describeTaskSetsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeTaskSets' smart constructor.
data DescribeTaskSets = DescribeTaskSets'
  { -- | The ID or full Amazon Resource Name (ARN) of task sets to describe.
    DescribeTaskSets -> Maybe [Text]
taskSets :: Prelude.Maybe [Prelude.Text],
    -- | Specifies whether to see the resource tags for the task set. If @TAGS@
    -- is specified, the tags are included in the response. If this field is
    -- omitted, tags are not included in the response.
    DescribeTaskSets -> Maybe [TaskSetField]
include :: Prelude.Maybe [TaskSetField],
    -- | The short name or full Amazon Resource Name (ARN) of the cluster that
    -- hosts the service that the task sets exist in.
    DescribeTaskSets -> Text
cluster :: Prelude.Text,
    -- | The short name or full Amazon Resource Name (ARN) of the service that
    -- the task sets exist in.
    DescribeTaskSets -> Text
service :: Prelude.Text
  }
  deriving (DescribeTaskSets -> DescribeTaskSets -> Bool
(DescribeTaskSets -> DescribeTaskSets -> Bool)
-> (DescribeTaskSets -> DescribeTaskSets -> Bool)
-> Eq DescribeTaskSets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTaskSets -> DescribeTaskSets -> Bool
$c/= :: DescribeTaskSets -> DescribeTaskSets -> Bool
== :: DescribeTaskSets -> DescribeTaskSets -> Bool
$c== :: DescribeTaskSets -> DescribeTaskSets -> Bool
Prelude.Eq, ReadPrec [DescribeTaskSets]
ReadPrec DescribeTaskSets
Int -> ReadS DescribeTaskSets
ReadS [DescribeTaskSets]
(Int -> ReadS DescribeTaskSets)
-> ReadS [DescribeTaskSets]
-> ReadPrec DescribeTaskSets
-> ReadPrec [DescribeTaskSets]
-> Read DescribeTaskSets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTaskSets]
$creadListPrec :: ReadPrec [DescribeTaskSets]
readPrec :: ReadPrec DescribeTaskSets
$creadPrec :: ReadPrec DescribeTaskSets
readList :: ReadS [DescribeTaskSets]
$creadList :: ReadS [DescribeTaskSets]
readsPrec :: Int -> ReadS DescribeTaskSets
$creadsPrec :: Int -> ReadS DescribeTaskSets
Prelude.Read, Int -> DescribeTaskSets -> ShowS
[DescribeTaskSets] -> ShowS
DescribeTaskSets -> String
(Int -> DescribeTaskSets -> ShowS)
-> (DescribeTaskSets -> String)
-> ([DescribeTaskSets] -> ShowS)
-> Show DescribeTaskSets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTaskSets] -> ShowS
$cshowList :: [DescribeTaskSets] -> ShowS
show :: DescribeTaskSets -> String
$cshow :: DescribeTaskSets -> String
showsPrec :: Int -> DescribeTaskSets -> ShowS
$cshowsPrec :: Int -> DescribeTaskSets -> ShowS
Prelude.Show, (forall x. DescribeTaskSets -> Rep DescribeTaskSets x)
-> (forall x. Rep DescribeTaskSets x -> DescribeTaskSets)
-> Generic DescribeTaskSets
forall x. Rep DescribeTaskSets x -> DescribeTaskSets
forall x. DescribeTaskSets -> Rep DescribeTaskSets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTaskSets x -> DescribeTaskSets
$cfrom :: forall x. DescribeTaskSets -> Rep DescribeTaskSets x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTaskSets' 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:
--
-- 'taskSets', 'describeTaskSets_taskSets' - The ID or full Amazon Resource Name (ARN) of task sets to describe.
--
-- 'include', 'describeTaskSets_include' - Specifies whether to see the resource tags for the task set. If @TAGS@
-- is specified, the tags are included in the response. If this field is
-- omitted, tags are not included in the response.
--
-- 'cluster', 'describeTaskSets_cluster' - The short name or full Amazon Resource Name (ARN) of the cluster that
-- hosts the service that the task sets exist in.
--
-- 'service', 'describeTaskSets_service' - The short name or full Amazon Resource Name (ARN) of the service that
-- the task sets exist in.
newDescribeTaskSets ::
  -- | 'cluster'
  Prelude.Text ->
  -- | 'service'
  Prelude.Text ->
  DescribeTaskSets
newDescribeTaskSets :: Text -> Text -> DescribeTaskSets
newDescribeTaskSets Text
pCluster_ Text
pService_ =
  DescribeTaskSets' :: Maybe [Text]
-> Maybe [TaskSetField] -> Text -> Text -> DescribeTaskSets
DescribeTaskSets'
    { $sel:taskSets:DescribeTaskSets' :: Maybe [Text]
taskSets = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:include:DescribeTaskSets' :: Maybe [TaskSetField]
include = Maybe [TaskSetField]
forall a. Maybe a
Prelude.Nothing,
      $sel:cluster:DescribeTaskSets' :: Text
cluster = Text
pCluster_,
      $sel:service:DescribeTaskSets' :: Text
service = Text
pService_
    }

-- | The ID or full Amazon Resource Name (ARN) of task sets to describe.
describeTaskSets_taskSets :: Lens.Lens' DescribeTaskSets (Prelude.Maybe [Prelude.Text])
describeTaskSets_taskSets :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTaskSets -> f DescribeTaskSets
describeTaskSets_taskSets = (DescribeTaskSets -> Maybe [Text])
-> (DescribeTaskSets -> Maybe [Text] -> DescribeTaskSets)
-> Lens
     DescribeTaskSets DescribeTaskSets (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskSets' {Maybe [Text]
taskSets :: Maybe [Text]
$sel:taskSets:DescribeTaskSets' :: DescribeTaskSets -> Maybe [Text]
taskSets} -> Maybe [Text]
taskSets) (\s :: DescribeTaskSets
s@DescribeTaskSets' {} Maybe [Text]
a -> DescribeTaskSets
s {$sel:taskSets:DescribeTaskSets' :: Maybe [Text]
taskSets = Maybe [Text]
a} :: DescribeTaskSets) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeTaskSets -> f DescribeTaskSets)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTaskSets
-> f DescribeTaskSets
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

-- | Specifies whether to see the resource tags for the task set. If @TAGS@
-- is specified, the tags are included in the response. If this field is
-- omitted, tags are not included in the response.
describeTaskSets_include :: Lens.Lens' DescribeTaskSets (Prelude.Maybe [TaskSetField])
describeTaskSets_include :: (Maybe [TaskSetField] -> f (Maybe [TaskSetField]))
-> DescribeTaskSets -> f DescribeTaskSets
describeTaskSets_include = (DescribeTaskSets -> Maybe [TaskSetField])
-> (DescribeTaskSets -> Maybe [TaskSetField] -> DescribeTaskSets)
-> Lens
     DescribeTaskSets
     DescribeTaskSets
     (Maybe [TaskSetField])
     (Maybe [TaskSetField])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskSets' {Maybe [TaskSetField]
include :: Maybe [TaskSetField]
$sel:include:DescribeTaskSets' :: DescribeTaskSets -> Maybe [TaskSetField]
include} -> Maybe [TaskSetField]
include) (\s :: DescribeTaskSets
s@DescribeTaskSets' {} Maybe [TaskSetField]
a -> DescribeTaskSets
s {$sel:include:DescribeTaskSets' :: Maybe [TaskSetField]
include = Maybe [TaskSetField]
a} :: DescribeTaskSets) ((Maybe [TaskSetField] -> f (Maybe [TaskSetField]))
 -> DescribeTaskSets -> f DescribeTaskSets)
-> ((Maybe [TaskSetField] -> f (Maybe [TaskSetField]))
    -> Maybe [TaskSetField] -> f (Maybe [TaskSetField]))
-> (Maybe [TaskSetField] -> f (Maybe [TaskSetField]))
-> DescribeTaskSets
-> f DescribeTaskSets
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [TaskSetField] [TaskSetField] [TaskSetField] [TaskSetField]
-> Iso
     (Maybe [TaskSetField])
     (Maybe [TaskSetField])
     (Maybe [TaskSetField])
     (Maybe [TaskSetField])
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 [TaskSetField] [TaskSetField] [TaskSetField] [TaskSetField]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The short name or full Amazon Resource Name (ARN) of the cluster that
-- hosts the service that the task sets exist in.
describeTaskSets_cluster :: Lens.Lens' DescribeTaskSets Prelude.Text
describeTaskSets_cluster :: (Text -> f Text) -> DescribeTaskSets -> f DescribeTaskSets
describeTaskSets_cluster = (DescribeTaskSets -> Text)
-> (DescribeTaskSets -> Text -> DescribeTaskSets)
-> Lens DescribeTaskSets DescribeTaskSets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskSets' {Text
cluster :: Text
$sel:cluster:DescribeTaskSets' :: DescribeTaskSets -> Text
cluster} -> Text
cluster) (\s :: DescribeTaskSets
s@DescribeTaskSets' {} Text
a -> DescribeTaskSets
s {$sel:cluster:DescribeTaskSets' :: Text
cluster = Text
a} :: DescribeTaskSets)

-- | The short name or full Amazon Resource Name (ARN) of the service that
-- the task sets exist in.
describeTaskSets_service :: Lens.Lens' DescribeTaskSets Prelude.Text
describeTaskSets_service :: (Text -> f Text) -> DescribeTaskSets -> f DescribeTaskSets
describeTaskSets_service = (DescribeTaskSets -> Text)
-> (DescribeTaskSets -> Text -> DescribeTaskSets)
-> Lens DescribeTaskSets DescribeTaskSets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskSets' {Text
service :: Text
$sel:service:DescribeTaskSets' :: DescribeTaskSets -> Text
service} -> Text
service) (\s :: DescribeTaskSets
s@DescribeTaskSets' {} Text
a -> DescribeTaskSets
s {$sel:service:DescribeTaskSets' :: Text
service = Text
a} :: DescribeTaskSets)

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

instance Prelude.NFData DescribeTaskSets

instance Core.ToHeaders DescribeTaskSets where
  toHeaders :: DescribeTaskSets -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeTaskSets -> 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
"AmazonEC2ContainerServiceV20141113.DescribeTaskSets" ::
                          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 DescribeTaskSets where
  toJSON :: DescribeTaskSets -> Value
toJSON DescribeTaskSets' {Maybe [Text]
Maybe [TaskSetField]
Text
service :: Text
cluster :: Text
include :: Maybe [TaskSetField]
taskSets :: Maybe [Text]
$sel:service:DescribeTaskSets' :: DescribeTaskSets -> Text
$sel:cluster:DescribeTaskSets' :: DescribeTaskSets -> Text
$sel:include:DescribeTaskSets' :: DescribeTaskSets -> Maybe [TaskSetField]
$sel:taskSets:DescribeTaskSets' :: DescribeTaskSets -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"taskSets" 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]
taskSets,
            (Text
"include" Text -> [TaskSetField] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([TaskSetField] -> Pair) -> Maybe [TaskSetField] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TaskSetField]
include,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"cluster" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
cluster),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"service" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
service)
          ]
      )

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

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

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

-- |
-- Create a value of 'DescribeTaskSetsResponse' 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:
--
-- 'taskSets', 'describeTaskSetsResponse_taskSets' - The list of task sets described.
--
-- 'failures', 'describeTaskSetsResponse_failures' - Any failures associated with the call.
--
-- 'httpStatus', 'describeTaskSetsResponse_httpStatus' - The response's http status code.
newDescribeTaskSetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeTaskSetsResponse
newDescribeTaskSetsResponse :: Int -> DescribeTaskSetsResponse
newDescribeTaskSetsResponse Int
pHttpStatus_ =
  DescribeTaskSetsResponse' :: Maybe [TaskSet]
-> Maybe [Failure] -> Int -> DescribeTaskSetsResponse
DescribeTaskSetsResponse'
    { $sel:taskSets:DescribeTaskSetsResponse' :: Maybe [TaskSet]
taskSets =
        Maybe [TaskSet]
forall a. Maybe a
Prelude.Nothing,
      $sel:failures:DescribeTaskSetsResponse' :: Maybe [Failure]
failures = Maybe [Failure]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeTaskSetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of task sets described.
describeTaskSetsResponse_taskSets :: Lens.Lens' DescribeTaskSetsResponse (Prelude.Maybe [TaskSet])
describeTaskSetsResponse_taskSets :: (Maybe [TaskSet] -> f (Maybe [TaskSet]))
-> DescribeTaskSetsResponse -> f DescribeTaskSetsResponse
describeTaskSetsResponse_taskSets = (DescribeTaskSetsResponse -> Maybe [TaskSet])
-> (DescribeTaskSetsResponse
    -> Maybe [TaskSet] -> DescribeTaskSetsResponse)
-> Lens
     DescribeTaskSetsResponse
     DescribeTaskSetsResponse
     (Maybe [TaskSet])
     (Maybe [TaskSet])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskSetsResponse' {Maybe [TaskSet]
taskSets :: Maybe [TaskSet]
$sel:taskSets:DescribeTaskSetsResponse' :: DescribeTaskSetsResponse -> Maybe [TaskSet]
taskSets} -> Maybe [TaskSet]
taskSets) (\s :: DescribeTaskSetsResponse
s@DescribeTaskSetsResponse' {} Maybe [TaskSet]
a -> DescribeTaskSetsResponse
s {$sel:taskSets:DescribeTaskSetsResponse' :: Maybe [TaskSet]
taskSets = Maybe [TaskSet]
a} :: DescribeTaskSetsResponse) ((Maybe [TaskSet] -> f (Maybe [TaskSet]))
 -> DescribeTaskSetsResponse -> f DescribeTaskSetsResponse)
-> ((Maybe [TaskSet] -> f (Maybe [TaskSet]))
    -> Maybe [TaskSet] -> f (Maybe [TaskSet]))
-> (Maybe [TaskSet] -> f (Maybe [TaskSet]))
-> DescribeTaskSetsResponse
-> f DescribeTaskSetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [TaskSet] [TaskSet] [TaskSet] [TaskSet]
-> Iso
     (Maybe [TaskSet])
     (Maybe [TaskSet])
     (Maybe [TaskSet])
     (Maybe [TaskSet])
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 [TaskSet] [TaskSet] [TaskSet] [TaskSet]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Any failures associated with the call.
describeTaskSetsResponse_failures :: Lens.Lens' DescribeTaskSetsResponse (Prelude.Maybe [Failure])
describeTaskSetsResponse_failures :: (Maybe [Failure] -> f (Maybe [Failure]))
-> DescribeTaskSetsResponse -> f DescribeTaskSetsResponse
describeTaskSetsResponse_failures = (DescribeTaskSetsResponse -> Maybe [Failure])
-> (DescribeTaskSetsResponse
    -> Maybe [Failure] -> DescribeTaskSetsResponse)
-> Lens
     DescribeTaskSetsResponse
     DescribeTaskSetsResponse
     (Maybe [Failure])
     (Maybe [Failure])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskSetsResponse' {Maybe [Failure]
failures :: Maybe [Failure]
$sel:failures:DescribeTaskSetsResponse' :: DescribeTaskSetsResponse -> Maybe [Failure]
failures} -> Maybe [Failure]
failures) (\s :: DescribeTaskSetsResponse
s@DescribeTaskSetsResponse' {} Maybe [Failure]
a -> DescribeTaskSetsResponse
s {$sel:failures:DescribeTaskSetsResponse' :: Maybe [Failure]
failures = Maybe [Failure]
a} :: DescribeTaskSetsResponse) ((Maybe [Failure] -> f (Maybe [Failure]))
 -> DescribeTaskSetsResponse -> f DescribeTaskSetsResponse)
-> ((Maybe [Failure] -> f (Maybe [Failure]))
    -> Maybe [Failure] -> f (Maybe [Failure]))
-> (Maybe [Failure] -> f (Maybe [Failure]))
-> DescribeTaskSetsResponse
-> f DescribeTaskSetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Failure] [Failure] [Failure] [Failure]
-> Iso
     (Maybe [Failure])
     (Maybe [Failure])
     (Maybe [Failure])
     (Maybe [Failure])
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 [Failure] [Failure] [Failure] [Failure]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeTaskSetsResponse