{-# 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.UpdateServicePrimaryTaskSet
-- 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)
--
-- Modifies which task set in a service is the primary task set. Any
-- parameters that are updated on the primary task set in a service will
-- transition to the 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.UpdateServicePrimaryTaskSet
  ( -- * Creating a Request
    UpdateServicePrimaryTaskSet (..),
    newUpdateServicePrimaryTaskSet,

    -- * Request Lenses
    updateServicePrimaryTaskSet_cluster,
    updateServicePrimaryTaskSet_service,
    updateServicePrimaryTaskSet_primaryTaskSet,

    -- * Destructuring the Response
    UpdateServicePrimaryTaskSetResponse (..),
    newUpdateServicePrimaryTaskSetResponse,

    -- * Response Lenses
    updateServicePrimaryTaskSetResponse_taskSet,
    updateServicePrimaryTaskSetResponse_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:/ 'newUpdateServicePrimaryTaskSet' smart constructor.
data UpdateServicePrimaryTaskSet = UpdateServicePrimaryTaskSet'
  { -- | The short name or full Amazon Resource Name (ARN) of the cluster that
    -- hosts the service that the task set exists in.
    UpdateServicePrimaryTaskSet -> Text
cluster :: Prelude.Text,
    -- | The short name or full Amazon Resource Name (ARN) of the service that
    -- the task set exists in.
    UpdateServicePrimaryTaskSet -> Text
service :: Prelude.Text,
    -- | The short name or full Amazon Resource Name (ARN) of the task set to set
    -- as the primary task set in the deployment.
    UpdateServicePrimaryTaskSet -> Text
primaryTaskSet :: Prelude.Text
  }
  deriving (UpdateServicePrimaryTaskSet -> UpdateServicePrimaryTaskSet -> Bool
(UpdateServicePrimaryTaskSet
 -> UpdateServicePrimaryTaskSet -> Bool)
-> (UpdateServicePrimaryTaskSet
    -> UpdateServicePrimaryTaskSet -> Bool)
-> Eq UpdateServicePrimaryTaskSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServicePrimaryTaskSet -> UpdateServicePrimaryTaskSet -> Bool
$c/= :: UpdateServicePrimaryTaskSet -> UpdateServicePrimaryTaskSet -> Bool
== :: UpdateServicePrimaryTaskSet -> UpdateServicePrimaryTaskSet -> Bool
$c== :: UpdateServicePrimaryTaskSet -> UpdateServicePrimaryTaskSet -> Bool
Prelude.Eq, ReadPrec [UpdateServicePrimaryTaskSet]
ReadPrec UpdateServicePrimaryTaskSet
Int -> ReadS UpdateServicePrimaryTaskSet
ReadS [UpdateServicePrimaryTaskSet]
(Int -> ReadS UpdateServicePrimaryTaskSet)
-> ReadS [UpdateServicePrimaryTaskSet]
-> ReadPrec UpdateServicePrimaryTaskSet
-> ReadPrec [UpdateServicePrimaryTaskSet]
-> Read UpdateServicePrimaryTaskSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateServicePrimaryTaskSet]
$creadListPrec :: ReadPrec [UpdateServicePrimaryTaskSet]
readPrec :: ReadPrec UpdateServicePrimaryTaskSet
$creadPrec :: ReadPrec UpdateServicePrimaryTaskSet
readList :: ReadS [UpdateServicePrimaryTaskSet]
$creadList :: ReadS [UpdateServicePrimaryTaskSet]
readsPrec :: Int -> ReadS UpdateServicePrimaryTaskSet
$creadsPrec :: Int -> ReadS UpdateServicePrimaryTaskSet
Prelude.Read, Int -> UpdateServicePrimaryTaskSet -> ShowS
[UpdateServicePrimaryTaskSet] -> ShowS
UpdateServicePrimaryTaskSet -> String
(Int -> UpdateServicePrimaryTaskSet -> ShowS)
-> (UpdateServicePrimaryTaskSet -> String)
-> ([UpdateServicePrimaryTaskSet] -> ShowS)
-> Show UpdateServicePrimaryTaskSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServicePrimaryTaskSet] -> ShowS
$cshowList :: [UpdateServicePrimaryTaskSet] -> ShowS
show :: UpdateServicePrimaryTaskSet -> String
$cshow :: UpdateServicePrimaryTaskSet -> String
showsPrec :: Int -> UpdateServicePrimaryTaskSet -> ShowS
$cshowsPrec :: Int -> UpdateServicePrimaryTaskSet -> ShowS
Prelude.Show, (forall x.
 UpdateServicePrimaryTaskSet -> Rep UpdateServicePrimaryTaskSet x)
-> (forall x.
    Rep UpdateServicePrimaryTaskSet x -> UpdateServicePrimaryTaskSet)
-> Generic UpdateServicePrimaryTaskSet
forall x.
Rep UpdateServicePrimaryTaskSet x -> UpdateServicePrimaryTaskSet
forall x.
UpdateServicePrimaryTaskSet -> Rep UpdateServicePrimaryTaskSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateServicePrimaryTaskSet x -> UpdateServicePrimaryTaskSet
$cfrom :: forall x.
UpdateServicePrimaryTaskSet -> Rep UpdateServicePrimaryTaskSet x
Prelude.Generic)

-- |
-- Create a value of 'UpdateServicePrimaryTaskSet' 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', 'updateServicePrimaryTaskSet_cluster' - The short name or full Amazon Resource Name (ARN) of the cluster that
-- hosts the service that the task set exists in.
--
-- 'service', 'updateServicePrimaryTaskSet_service' - The short name or full Amazon Resource Name (ARN) of the service that
-- the task set exists in.
--
-- 'primaryTaskSet', 'updateServicePrimaryTaskSet_primaryTaskSet' - The short name or full Amazon Resource Name (ARN) of the task set to set
-- as the primary task set in the deployment.
newUpdateServicePrimaryTaskSet ::
  -- | 'cluster'
  Prelude.Text ->
  -- | 'service'
  Prelude.Text ->
  -- | 'primaryTaskSet'
  Prelude.Text ->
  UpdateServicePrimaryTaskSet
newUpdateServicePrimaryTaskSet :: Text -> Text -> Text -> UpdateServicePrimaryTaskSet
newUpdateServicePrimaryTaskSet
  Text
pCluster_
  Text
pService_
  Text
pPrimaryTaskSet_ =
    UpdateServicePrimaryTaskSet' :: Text -> Text -> Text -> UpdateServicePrimaryTaskSet
UpdateServicePrimaryTaskSet'
      { $sel:cluster:UpdateServicePrimaryTaskSet' :: Text
cluster = Text
pCluster_,
        $sel:service:UpdateServicePrimaryTaskSet' :: Text
service = Text
pService_,
        $sel:primaryTaskSet:UpdateServicePrimaryTaskSet' :: Text
primaryTaskSet = Text
pPrimaryTaskSet_
      }

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

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

-- | The short name or full Amazon Resource Name (ARN) of the task set to set
-- as the primary task set in the deployment.
updateServicePrimaryTaskSet_primaryTaskSet :: Lens.Lens' UpdateServicePrimaryTaskSet Prelude.Text
updateServicePrimaryTaskSet_primaryTaskSet :: (Text -> f Text)
-> UpdateServicePrimaryTaskSet -> f UpdateServicePrimaryTaskSet
updateServicePrimaryTaskSet_primaryTaskSet = (UpdateServicePrimaryTaskSet -> Text)
-> (UpdateServicePrimaryTaskSet
    -> Text -> UpdateServicePrimaryTaskSet)
-> Lens
     UpdateServicePrimaryTaskSet UpdateServicePrimaryTaskSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServicePrimaryTaskSet' {Text
primaryTaskSet :: Text
$sel:primaryTaskSet:UpdateServicePrimaryTaskSet' :: UpdateServicePrimaryTaskSet -> Text
primaryTaskSet} -> Text
primaryTaskSet) (\s :: UpdateServicePrimaryTaskSet
s@UpdateServicePrimaryTaskSet' {} Text
a -> UpdateServicePrimaryTaskSet
s {$sel:primaryTaskSet:UpdateServicePrimaryTaskSet' :: Text
primaryTaskSet = Text
a} :: UpdateServicePrimaryTaskSet)

instance Core.AWSRequest UpdateServicePrimaryTaskSet where
  type
    AWSResponse UpdateServicePrimaryTaskSet =
      UpdateServicePrimaryTaskSetResponse
  request :: UpdateServicePrimaryTaskSet -> Request UpdateServicePrimaryTaskSet
request = Service
-> UpdateServicePrimaryTaskSet
-> Request UpdateServicePrimaryTaskSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateServicePrimaryTaskSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateServicePrimaryTaskSet)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateServicePrimaryTaskSet))
-> Logger
-> Service
-> Proxy UpdateServicePrimaryTaskSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateServicePrimaryTaskSet)))
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 -> Int -> UpdateServicePrimaryTaskSetResponse
UpdateServicePrimaryTaskSetResponse'
            (Maybe TaskSet -> Int -> UpdateServicePrimaryTaskSetResponse)
-> Either String (Maybe TaskSet)
-> Either String (Int -> UpdateServicePrimaryTaskSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe TaskSet)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"taskSet")
            Either String (Int -> UpdateServicePrimaryTaskSetResponse)
-> Either String Int
-> Either String UpdateServicePrimaryTaskSetResponse
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 UpdateServicePrimaryTaskSet

instance Prelude.NFData UpdateServicePrimaryTaskSet

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

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

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

-- | /See:/ 'newUpdateServicePrimaryTaskSetResponse' smart constructor.
data UpdateServicePrimaryTaskSetResponse = UpdateServicePrimaryTaskSetResponse'
  { -- | Details about the task set.
    UpdateServicePrimaryTaskSetResponse -> Maybe TaskSet
taskSet :: Prelude.Maybe TaskSet,
    -- | The response's http status code.
    UpdateServicePrimaryTaskSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateServicePrimaryTaskSetResponse
-> UpdateServicePrimaryTaskSetResponse -> Bool
(UpdateServicePrimaryTaskSetResponse
 -> UpdateServicePrimaryTaskSetResponse -> Bool)
-> (UpdateServicePrimaryTaskSetResponse
    -> UpdateServicePrimaryTaskSetResponse -> Bool)
-> Eq UpdateServicePrimaryTaskSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServicePrimaryTaskSetResponse
-> UpdateServicePrimaryTaskSetResponse -> Bool
$c/= :: UpdateServicePrimaryTaskSetResponse
-> UpdateServicePrimaryTaskSetResponse -> Bool
== :: UpdateServicePrimaryTaskSetResponse
-> UpdateServicePrimaryTaskSetResponse -> Bool
$c== :: UpdateServicePrimaryTaskSetResponse
-> UpdateServicePrimaryTaskSetResponse -> Bool
Prelude.Eq, ReadPrec [UpdateServicePrimaryTaskSetResponse]
ReadPrec UpdateServicePrimaryTaskSetResponse
Int -> ReadS UpdateServicePrimaryTaskSetResponse
ReadS [UpdateServicePrimaryTaskSetResponse]
(Int -> ReadS UpdateServicePrimaryTaskSetResponse)
-> ReadS [UpdateServicePrimaryTaskSetResponse]
-> ReadPrec UpdateServicePrimaryTaskSetResponse
-> ReadPrec [UpdateServicePrimaryTaskSetResponse]
-> Read UpdateServicePrimaryTaskSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateServicePrimaryTaskSetResponse]
$creadListPrec :: ReadPrec [UpdateServicePrimaryTaskSetResponse]
readPrec :: ReadPrec UpdateServicePrimaryTaskSetResponse
$creadPrec :: ReadPrec UpdateServicePrimaryTaskSetResponse
readList :: ReadS [UpdateServicePrimaryTaskSetResponse]
$creadList :: ReadS [UpdateServicePrimaryTaskSetResponse]
readsPrec :: Int -> ReadS UpdateServicePrimaryTaskSetResponse
$creadsPrec :: Int -> ReadS UpdateServicePrimaryTaskSetResponse
Prelude.Read, Int -> UpdateServicePrimaryTaskSetResponse -> ShowS
[UpdateServicePrimaryTaskSetResponse] -> ShowS
UpdateServicePrimaryTaskSetResponse -> String
(Int -> UpdateServicePrimaryTaskSetResponse -> ShowS)
-> (UpdateServicePrimaryTaskSetResponse -> String)
-> ([UpdateServicePrimaryTaskSetResponse] -> ShowS)
-> Show UpdateServicePrimaryTaskSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServicePrimaryTaskSetResponse] -> ShowS
$cshowList :: [UpdateServicePrimaryTaskSetResponse] -> ShowS
show :: UpdateServicePrimaryTaskSetResponse -> String
$cshow :: UpdateServicePrimaryTaskSetResponse -> String
showsPrec :: Int -> UpdateServicePrimaryTaskSetResponse -> ShowS
$cshowsPrec :: Int -> UpdateServicePrimaryTaskSetResponse -> ShowS
Prelude.Show, (forall x.
 UpdateServicePrimaryTaskSetResponse
 -> Rep UpdateServicePrimaryTaskSetResponse x)
-> (forall x.
    Rep UpdateServicePrimaryTaskSetResponse x
    -> UpdateServicePrimaryTaskSetResponse)
-> Generic UpdateServicePrimaryTaskSetResponse
forall x.
Rep UpdateServicePrimaryTaskSetResponse x
-> UpdateServicePrimaryTaskSetResponse
forall x.
UpdateServicePrimaryTaskSetResponse
-> Rep UpdateServicePrimaryTaskSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateServicePrimaryTaskSetResponse x
-> UpdateServicePrimaryTaskSetResponse
$cfrom :: forall x.
UpdateServicePrimaryTaskSetResponse
-> Rep UpdateServicePrimaryTaskSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateServicePrimaryTaskSetResponse' 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:
--
-- 'taskSet', 'updateServicePrimaryTaskSetResponse_taskSet' - Details about the task set.
--
-- 'httpStatus', 'updateServicePrimaryTaskSetResponse_httpStatus' - The response's http status code.
newUpdateServicePrimaryTaskSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateServicePrimaryTaskSetResponse
newUpdateServicePrimaryTaskSetResponse :: Int -> UpdateServicePrimaryTaskSetResponse
newUpdateServicePrimaryTaskSetResponse Int
pHttpStatus_ =
  UpdateServicePrimaryTaskSetResponse' :: Maybe TaskSet -> Int -> UpdateServicePrimaryTaskSetResponse
UpdateServicePrimaryTaskSetResponse'
    { $sel:taskSet:UpdateServicePrimaryTaskSetResponse' :: Maybe TaskSet
taskSet =
        Maybe TaskSet
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateServicePrimaryTaskSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Details about the task set.
updateServicePrimaryTaskSetResponse_taskSet :: Lens.Lens' UpdateServicePrimaryTaskSetResponse (Prelude.Maybe TaskSet)
updateServicePrimaryTaskSetResponse_taskSet :: (Maybe TaskSet -> f (Maybe TaskSet))
-> UpdateServicePrimaryTaskSetResponse
-> f UpdateServicePrimaryTaskSetResponse
updateServicePrimaryTaskSetResponse_taskSet = (UpdateServicePrimaryTaskSetResponse -> Maybe TaskSet)
-> (UpdateServicePrimaryTaskSetResponse
    -> Maybe TaskSet -> UpdateServicePrimaryTaskSetResponse)
-> Lens
     UpdateServicePrimaryTaskSetResponse
     UpdateServicePrimaryTaskSetResponse
     (Maybe TaskSet)
     (Maybe TaskSet)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServicePrimaryTaskSetResponse' {Maybe TaskSet
taskSet :: Maybe TaskSet
$sel:taskSet:UpdateServicePrimaryTaskSetResponse' :: UpdateServicePrimaryTaskSetResponse -> Maybe TaskSet
taskSet} -> Maybe TaskSet
taskSet) (\s :: UpdateServicePrimaryTaskSetResponse
s@UpdateServicePrimaryTaskSetResponse' {} Maybe TaskSet
a -> UpdateServicePrimaryTaskSetResponse
s {$sel:taskSet:UpdateServicePrimaryTaskSetResponse' :: Maybe TaskSet
taskSet = Maybe TaskSet
a} :: UpdateServicePrimaryTaskSetResponse)

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

instance
  Prelude.NFData
    UpdateServicePrimaryTaskSetResponse