{-# 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.DescribeTaskDefinition
-- 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 a task definition. You can specify a @family@ and @revision@
-- to find information about a specific task definition, or you can simply
-- specify the family to find the latest @ACTIVE@ revision in that family.
--
-- You can only describe @INACTIVE@ task definitions while an active task
-- or service references them.
module Amazonka.ECS.DescribeTaskDefinition
  ( -- * Creating a Request
    DescribeTaskDefinition (..),
    newDescribeTaskDefinition,

    -- * Request Lenses
    describeTaskDefinition_include,
    describeTaskDefinition_taskDefinition,

    -- * Destructuring the Response
    DescribeTaskDefinitionResponse (..),
    newDescribeTaskDefinitionResponse,

    -- * Response Lenses
    describeTaskDefinitionResponse_taskDefinition,
    describeTaskDefinitionResponse_tags,
    describeTaskDefinitionResponse_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:/ 'newDescribeTaskDefinition' smart constructor.
data DescribeTaskDefinition = DescribeTaskDefinition'
  { -- | Specifies whether to see the resource tags for the task definition. If
    -- @TAGS@ is specified, the tags are included in the response. If this
    -- field is omitted, tags are not included in the response.
    DescribeTaskDefinition -> Maybe [TaskDefinitionField]
include :: Prelude.Maybe [TaskDefinitionField],
    -- | The @family@ for the latest @ACTIVE@ revision, @family@ and @revision@
    -- (@family:revision@) for a specific revision in the family, or full
    -- Amazon Resource Name (ARN) of the task definition to describe.
    DescribeTaskDefinition -> Text
taskDefinition :: Prelude.Text
  }
  deriving (DescribeTaskDefinition -> DescribeTaskDefinition -> Bool
(DescribeTaskDefinition -> DescribeTaskDefinition -> Bool)
-> (DescribeTaskDefinition -> DescribeTaskDefinition -> Bool)
-> Eq DescribeTaskDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTaskDefinition -> DescribeTaskDefinition -> Bool
$c/= :: DescribeTaskDefinition -> DescribeTaskDefinition -> Bool
== :: DescribeTaskDefinition -> DescribeTaskDefinition -> Bool
$c== :: DescribeTaskDefinition -> DescribeTaskDefinition -> Bool
Prelude.Eq, ReadPrec [DescribeTaskDefinition]
ReadPrec DescribeTaskDefinition
Int -> ReadS DescribeTaskDefinition
ReadS [DescribeTaskDefinition]
(Int -> ReadS DescribeTaskDefinition)
-> ReadS [DescribeTaskDefinition]
-> ReadPrec DescribeTaskDefinition
-> ReadPrec [DescribeTaskDefinition]
-> Read DescribeTaskDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTaskDefinition]
$creadListPrec :: ReadPrec [DescribeTaskDefinition]
readPrec :: ReadPrec DescribeTaskDefinition
$creadPrec :: ReadPrec DescribeTaskDefinition
readList :: ReadS [DescribeTaskDefinition]
$creadList :: ReadS [DescribeTaskDefinition]
readsPrec :: Int -> ReadS DescribeTaskDefinition
$creadsPrec :: Int -> ReadS DescribeTaskDefinition
Prelude.Read, Int -> DescribeTaskDefinition -> ShowS
[DescribeTaskDefinition] -> ShowS
DescribeTaskDefinition -> String
(Int -> DescribeTaskDefinition -> ShowS)
-> (DescribeTaskDefinition -> String)
-> ([DescribeTaskDefinition] -> ShowS)
-> Show DescribeTaskDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTaskDefinition] -> ShowS
$cshowList :: [DescribeTaskDefinition] -> ShowS
show :: DescribeTaskDefinition -> String
$cshow :: DescribeTaskDefinition -> String
showsPrec :: Int -> DescribeTaskDefinition -> ShowS
$cshowsPrec :: Int -> DescribeTaskDefinition -> ShowS
Prelude.Show, (forall x. DescribeTaskDefinition -> Rep DescribeTaskDefinition x)
-> (forall x.
    Rep DescribeTaskDefinition x -> DescribeTaskDefinition)
-> Generic DescribeTaskDefinition
forall x. Rep DescribeTaskDefinition x -> DescribeTaskDefinition
forall x. DescribeTaskDefinition -> Rep DescribeTaskDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTaskDefinition x -> DescribeTaskDefinition
$cfrom :: forall x. DescribeTaskDefinition -> Rep DescribeTaskDefinition x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTaskDefinition' 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:
--
-- 'include', 'describeTaskDefinition_include' - Specifies whether to see the resource tags for the task definition. If
-- @TAGS@ is specified, the tags are included in the response. If this
-- field is omitted, tags are not included in the response.
--
-- 'taskDefinition', 'describeTaskDefinition_taskDefinition' - The @family@ for the latest @ACTIVE@ revision, @family@ and @revision@
-- (@family:revision@) for a specific revision in the family, or full
-- Amazon Resource Name (ARN) of the task definition to describe.
newDescribeTaskDefinition ::
  -- | 'taskDefinition'
  Prelude.Text ->
  DescribeTaskDefinition
newDescribeTaskDefinition :: Text -> DescribeTaskDefinition
newDescribeTaskDefinition Text
pTaskDefinition_ =
  DescribeTaskDefinition' :: Maybe [TaskDefinitionField] -> Text -> DescribeTaskDefinition
DescribeTaskDefinition'
    { $sel:include:DescribeTaskDefinition' :: Maybe [TaskDefinitionField]
include = Maybe [TaskDefinitionField]
forall a. Maybe a
Prelude.Nothing,
      $sel:taskDefinition:DescribeTaskDefinition' :: Text
taskDefinition = Text
pTaskDefinition_
    }

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

-- | The @family@ for the latest @ACTIVE@ revision, @family@ and @revision@
-- (@family:revision@) for a specific revision in the family, or full
-- Amazon Resource Name (ARN) of the task definition to describe.
describeTaskDefinition_taskDefinition :: Lens.Lens' DescribeTaskDefinition Prelude.Text
describeTaskDefinition_taskDefinition :: (Text -> f Text)
-> DescribeTaskDefinition -> f DescribeTaskDefinition
describeTaskDefinition_taskDefinition = (DescribeTaskDefinition -> Text)
-> (DescribeTaskDefinition -> Text -> DescribeTaskDefinition)
-> Lens DescribeTaskDefinition DescribeTaskDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskDefinition' {Text
taskDefinition :: Text
$sel:taskDefinition:DescribeTaskDefinition' :: DescribeTaskDefinition -> Text
taskDefinition} -> Text
taskDefinition) (\s :: DescribeTaskDefinition
s@DescribeTaskDefinition' {} Text
a -> DescribeTaskDefinition
s {$sel:taskDefinition:DescribeTaskDefinition' :: Text
taskDefinition = Text
a} :: DescribeTaskDefinition)

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

instance Prelude.NFData DescribeTaskDefinition

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

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

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

-- | /See:/ 'newDescribeTaskDefinitionResponse' smart constructor.
data DescribeTaskDefinitionResponse = DescribeTaskDefinitionResponse'
  { -- | The full task definition description.
    DescribeTaskDefinitionResponse -> Maybe TaskDefinition
taskDefinition :: Prelude.Maybe TaskDefinition,
    -- | The metadata that is applied to the task definition to help you
    -- categorize and organize them. Each tag consists of a key and an optional
    -- value, both of which you define.
    --
    -- The following basic restrictions apply to tags:
    --
    -- -   Maximum number of tags per resource - 50
    --
    -- -   For each resource, each tag key must be unique, and each tag key can
    --     have only one value.
    --
    -- -   Maximum key length - 128 Unicode characters in UTF-8
    --
    -- -   Maximum value length - 256 Unicode characters in UTF-8
    --
    -- -   If your tagging schema is used across multiple services and
    --     resources, remember that other services may have restrictions on
    --     allowed characters. Generally allowed characters are: letters,
    --     numbers, and spaces representable in UTF-8, and the following
    --     characters: + - = . _ : \/ \@.
    --
    -- -   Tag keys and values are case-sensitive.
    --
    -- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
    --     such as a prefix for either keys or values as it is reserved for
    --     Amazon Web Services use. You cannot edit or delete tag keys or
    --     values with this prefix. Tags with this prefix do not count against
    --     your tags per resource limit.
    DescribeTaskDefinitionResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The response's http status code.
    DescribeTaskDefinitionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeTaskDefinitionResponse
-> DescribeTaskDefinitionResponse -> Bool
(DescribeTaskDefinitionResponse
 -> DescribeTaskDefinitionResponse -> Bool)
-> (DescribeTaskDefinitionResponse
    -> DescribeTaskDefinitionResponse -> Bool)
-> Eq DescribeTaskDefinitionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTaskDefinitionResponse
-> DescribeTaskDefinitionResponse -> Bool
$c/= :: DescribeTaskDefinitionResponse
-> DescribeTaskDefinitionResponse -> Bool
== :: DescribeTaskDefinitionResponse
-> DescribeTaskDefinitionResponse -> Bool
$c== :: DescribeTaskDefinitionResponse
-> DescribeTaskDefinitionResponse -> Bool
Prelude.Eq, ReadPrec [DescribeTaskDefinitionResponse]
ReadPrec DescribeTaskDefinitionResponse
Int -> ReadS DescribeTaskDefinitionResponse
ReadS [DescribeTaskDefinitionResponse]
(Int -> ReadS DescribeTaskDefinitionResponse)
-> ReadS [DescribeTaskDefinitionResponse]
-> ReadPrec DescribeTaskDefinitionResponse
-> ReadPrec [DescribeTaskDefinitionResponse]
-> Read DescribeTaskDefinitionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTaskDefinitionResponse]
$creadListPrec :: ReadPrec [DescribeTaskDefinitionResponse]
readPrec :: ReadPrec DescribeTaskDefinitionResponse
$creadPrec :: ReadPrec DescribeTaskDefinitionResponse
readList :: ReadS [DescribeTaskDefinitionResponse]
$creadList :: ReadS [DescribeTaskDefinitionResponse]
readsPrec :: Int -> ReadS DescribeTaskDefinitionResponse
$creadsPrec :: Int -> ReadS DescribeTaskDefinitionResponse
Prelude.Read, Int -> DescribeTaskDefinitionResponse -> ShowS
[DescribeTaskDefinitionResponse] -> ShowS
DescribeTaskDefinitionResponse -> String
(Int -> DescribeTaskDefinitionResponse -> ShowS)
-> (DescribeTaskDefinitionResponse -> String)
-> ([DescribeTaskDefinitionResponse] -> ShowS)
-> Show DescribeTaskDefinitionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTaskDefinitionResponse] -> ShowS
$cshowList :: [DescribeTaskDefinitionResponse] -> ShowS
show :: DescribeTaskDefinitionResponse -> String
$cshow :: DescribeTaskDefinitionResponse -> String
showsPrec :: Int -> DescribeTaskDefinitionResponse -> ShowS
$cshowsPrec :: Int -> DescribeTaskDefinitionResponse -> ShowS
Prelude.Show, (forall x.
 DescribeTaskDefinitionResponse
 -> Rep DescribeTaskDefinitionResponse x)
-> (forall x.
    Rep DescribeTaskDefinitionResponse x
    -> DescribeTaskDefinitionResponse)
-> Generic DescribeTaskDefinitionResponse
forall x.
Rep DescribeTaskDefinitionResponse x
-> DescribeTaskDefinitionResponse
forall x.
DescribeTaskDefinitionResponse
-> Rep DescribeTaskDefinitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeTaskDefinitionResponse x
-> DescribeTaskDefinitionResponse
$cfrom :: forall x.
DescribeTaskDefinitionResponse
-> Rep DescribeTaskDefinitionResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTaskDefinitionResponse' 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:
--
-- 'taskDefinition', 'describeTaskDefinitionResponse_taskDefinition' - The full task definition description.
--
-- 'tags', 'describeTaskDefinitionResponse_tags' - The metadata that is applied to the task definition to help you
-- categorize and organize them. Each tag consists of a key and an optional
-- value, both of which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8
--
-- -   Maximum value length - 256 Unicode characters in UTF-8
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case-sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for either keys or values as it is reserved for
--     Amazon Web Services use. You cannot edit or delete tag keys or
--     values with this prefix. Tags with this prefix do not count against
--     your tags per resource limit.
--
-- 'httpStatus', 'describeTaskDefinitionResponse_httpStatus' - The response's http status code.
newDescribeTaskDefinitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeTaskDefinitionResponse
newDescribeTaskDefinitionResponse :: Int -> DescribeTaskDefinitionResponse
newDescribeTaskDefinitionResponse Int
pHttpStatus_ =
  DescribeTaskDefinitionResponse' :: Maybe TaskDefinition
-> Maybe [Tag] -> Int -> DescribeTaskDefinitionResponse
DescribeTaskDefinitionResponse'
    { $sel:taskDefinition:DescribeTaskDefinitionResponse' :: Maybe TaskDefinition
taskDefinition =
        Maybe TaskDefinition
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeTaskDefinitionResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeTaskDefinitionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The full task definition description.
describeTaskDefinitionResponse_taskDefinition :: Lens.Lens' DescribeTaskDefinitionResponse (Prelude.Maybe TaskDefinition)
describeTaskDefinitionResponse_taskDefinition :: (Maybe TaskDefinition -> f (Maybe TaskDefinition))
-> DescribeTaskDefinitionResponse
-> f DescribeTaskDefinitionResponse
describeTaskDefinitionResponse_taskDefinition = (DescribeTaskDefinitionResponse -> Maybe TaskDefinition)
-> (DescribeTaskDefinitionResponse
    -> Maybe TaskDefinition -> DescribeTaskDefinitionResponse)
-> Lens
     DescribeTaskDefinitionResponse
     DescribeTaskDefinitionResponse
     (Maybe TaskDefinition)
     (Maybe TaskDefinition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskDefinitionResponse' {Maybe TaskDefinition
taskDefinition :: Maybe TaskDefinition
$sel:taskDefinition:DescribeTaskDefinitionResponse' :: DescribeTaskDefinitionResponse -> Maybe TaskDefinition
taskDefinition} -> Maybe TaskDefinition
taskDefinition) (\s :: DescribeTaskDefinitionResponse
s@DescribeTaskDefinitionResponse' {} Maybe TaskDefinition
a -> DescribeTaskDefinitionResponse
s {$sel:taskDefinition:DescribeTaskDefinitionResponse' :: Maybe TaskDefinition
taskDefinition = Maybe TaskDefinition
a} :: DescribeTaskDefinitionResponse)

-- | The metadata that is applied to the task definition to help you
-- categorize and organize them. Each tag consists of a key and an optional
-- value, both of which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8
--
-- -   Maximum value length - 256 Unicode characters in UTF-8
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case-sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for either keys or values as it is reserved for
--     Amazon Web Services use. You cannot edit or delete tag keys or
--     values with this prefix. Tags with this prefix do not count against
--     your tags per resource limit.
describeTaskDefinitionResponse_tags :: Lens.Lens' DescribeTaskDefinitionResponse (Prelude.Maybe [Tag])
describeTaskDefinitionResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> DescribeTaskDefinitionResponse
-> f DescribeTaskDefinitionResponse
describeTaskDefinitionResponse_tags = (DescribeTaskDefinitionResponse -> Maybe [Tag])
-> (DescribeTaskDefinitionResponse
    -> Maybe [Tag] -> DescribeTaskDefinitionResponse)
-> Lens
     DescribeTaskDefinitionResponse
     DescribeTaskDefinitionResponse
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskDefinitionResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:DescribeTaskDefinitionResponse' :: DescribeTaskDefinitionResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: DescribeTaskDefinitionResponse
s@DescribeTaskDefinitionResponse' {} Maybe [Tag]
a -> DescribeTaskDefinitionResponse
s {$sel:tags:DescribeTaskDefinitionResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: DescribeTaskDefinitionResponse) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> DescribeTaskDefinitionResponse
 -> f DescribeTaskDefinitionResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> DescribeTaskDefinitionResponse
-> f DescribeTaskDefinitionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeTaskDefinitionResponse