{-# 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.SageMaker.UpdateWorkteam
-- 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)
--
-- Updates an existing work team with new member definitions or
-- description.
module Amazonka.SageMaker.UpdateWorkteam
  ( -- * Creating a Request
    UpdateWorkteam (..),
    newUpdateWorkteam,

    -- * Request Lenses
    updateWorkteam_notificationConfiguration,
    updateWorkteam_memberDefinitions,
    updateWorkteam_description,
    updateWorkteam_workteamName,

    -- * Destructuring the Response
    UpdateWorkteamResponse (..),
    newUpdateWorkteamResponse,

    -- * Response Lenses
    updateWorkteamResponse_httpStatus,
    updateWorkteamResponse_workteam,
  )
where

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

-- | /See:/ 'newUpdateWorkteam' smart constructor.
data UpdateWorkteam = UpdateWorkteam'
  { -- | Configures SNS topic notifications for available or expiring work items
    UpdateWorkteam -> Maybe NotificationConfiguration
notificationConfiguration :: Prelude.Maybe NotificationConfiguration,
    -- | A list of @MemberDefinition@ objects that contains objects that identify
    -- the workers that make up the work team.
    --
    -- Workforces can be created using Amazon Cognito or your own OIDC Identity
    -- Provider (IdP). For private workforces created using Amazon Cognito use
    -- @CognitoMemberDefinition@. For workforces created using your own OIDC
    -- identity provider (IdP) use @OidcMemberDefinition@. You should not
    -- provide input for both of these parameters in a single request.
    --
    -- For workforces created using Amazon Cognito, private work teams
    -- correspond to Amazon Cognito /user groups/ within the user pool used to
    -- create a workforce. All of the @CognitoMemberDefinition@ objects that
    -- make up the member definition must have the same @ClientId@ and
    -- @UserPool@ values. To add a Amazon Cognito user group to an existing
    -- worker pool, see < Adding groups to a User Pool>. For more information
    -- about user pools, see
    -- <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html Amazon Cognito User Pools>.
    --
    -- For workforces created using your own OIDC IdP, specify the user groups
    -- that you want to include in your private work team in
    -- @OidcMemberDefinition@ by listing those groups in @Groups@. Be aware
    -- that user groups that are already in the work team must also be listed
    -- in @Groups@ when you make this request to remain on the work team. If
    -- you do not include these user groups, they will no longer be associated
    -- with the work team you update.
    UpdateWorkteam -> Maybe (NonEmpty MemberDefinition)
memberDefinitions :: Prelude.Maybe (Prelude.NonEmpty MemberDefinition),
    -- | An updated description for the work team.
    UpdateWorkteam -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name of the work team to update.
    UpdateWorkteam -> Text
workteamName :: Prelude.Text
  }
  deriving (UpdateWorkteam -> UpdateWorkteam -> Bool
(UpdateWorkteam -> UpdateWorkteam -> Bool)
-> (UpdateWorkteam -> UpdateWorkteam -> Bool) -> Eq UpdateWorkteam
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateWorkteam -> UpdateWorkteam -> Bool
$c/= :: UpdateWorkteam -> UpdateWorkteam -> Bool
== :: UpdateWorkteam -> UpdateWorkteam -> Bool
$c== :: UpdateWorkteam -> UpdateWorkteam -> Bool
Prelude.Eq, ReadPrec [UpdateWorkteam]
ReadPrec UpdateWorkteam
Int -> ReadS UpdateWorkteam
ReadS [UpdateWorkteam]
(Int -> ReadS UpdateWorkteam)
-> ReadS [UpdateWorkteam]
-> ReadPrec UpdateWorkteam
-> ReadPrec [UpdateWorkteam]
-> Read UpdateWorkteam
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateWorkteam]
$creadListPrec :: ReadPrec [UpdateWorkteam]
readPrec :: ReadPrec UpdateWorkteam
$creadPrec :: ReadPrec UpdateWorkteam
readList :: ReadS [UpdateWorkteam]
$creadList :: ReadS [UpdateWorkteam]
readsPrec :: Int -> ReadS UpdateWorkteam
$creadsPrec :: Int -> ReadS UpdateWorkteam
Prelude.Read, Int -> UpdateWorkteam -> ShowS
[UpdateWorkteam] -> ShowS
UpdateWorkteam -> String
(Int -> UpdateWorkteam -> ShowS)
-> (UpdateWorkteam -> String)
-> ([UpdateWorkteam] -> ShowS)
-> Show UpdateWorkteam
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateWorkteam] -> ShowS
$cshowList :: [UpdateWorkteam] -> ShowS
show :: UpdateWorkteam -> String
$cshow :: UpdateWorkteam -> String
showsPrec :: Int -> UpdateWorkteam -> ShowS
$cshowsPrec :: Int -> UpdateWorkteam -> ShowS
Prelude.Show, (forall x. UpdateWorkteam -> Rep UpdateWorkteam x)
-> (forall x. Rep UpdateWorkteam x -> UpdateWorkteam)
-> Generic UpdateWorkteam
forall x. Rep UpdateWorkteam x -> UpdateWorkteam
forall x. UpdateWorkteam -> Rep UpdateWorkteam x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateWorkteam x -> UpdateWorkteam
$cfrom :: forall x. UpdateWorkteam -> Rep UpdateWorkteam x
Prelude.Generic)

-- |
-- Create a value of 'UpdateWorkteam' 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:
--
-- 'notificationConfiguration', 'updateWorkteam_notificationConfiguration' - Configures SNS topic notifications for available or expiring work items
--
-- 'memberDefinitions', 'updateWorkteam_memberDefinitions' - A list of @MemberDefinition@ objects that contains objects that identify
-- the workers that make up the work team.
--
-- Workforces can be created using Amazon Cognito or your own OIDC Identity
-- Provider (IdP). For private workforces created using Amazon Cognito use
-- @CognitoMemberDefinition@. For workforces created using your own OIDC
-- identity provider (IdP) use @OidcMemberDefinition@. You should not
-- provide input for both of these parameters in a single request.
--
-- For workforces created using Amazon Cognito, private work teams
-- correspond to Amazon Cognito /user groups/ within the user pool used to
-- create a workforce. All of the @CognitoMemberDefinition@ objects that
-- make up the member definition must have the same @ClientId@ and
-- @UserPool@ values. To add a Amazon Cognito user group to an existing
-- worker pool, see < Adding groups to a User Pool>. For more information
-- about user pools, see
-- <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html Amazon Cognito User Pools>.
--
-- For workforces created using your own OIDC IdP, specify the user groups
-- that you want to include in your private work team in
-- @OidcMemberDefinition@ by listing those groups in @Groups@. Be aware
-- that user groups that are already in the work team must also be listed
-- in @Groups@ when you make this request to remain on the work team. If
-- you do not include these user groups, they will no longer be associated
-- with the work team you update.
--
-- 'description', 'updateWorkteam_description' - An updated description for the work team.
--
-- 'workteamName', 'updateWorkteam_workteamName' - The name of the work team to update.
newUpdateWorkteam ::
  -- | 'workteamName'
  Prelude.Text ->
  UpdateWorkteam
newUpdateWorkteam :: Text -> UpdateWorkteam
newUpdateWorkteam Text
pWorkteamName_ =
  UpdateWorkteam' :: Maybe NotificationConfiguration
-> Maybe (NonEmpty MemberDefinition)
-> Maybe Text
-> Text
-> UpdateWorkteam
UpdateWorkteam'
    { $sel:notificationConfiguration:UpdateWorkteam' :: Maybe NotificationConfiguration
notificationConfiguration =
        Maybe NotificationConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:memberDefinitions:UpdateWorkteam' :: Maybe (NonEmpty MemberDefinition)
memberDefinitions = Maybe (NonEmpty MemberDefinition)
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateWorkteam' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:workteamName:UpdateWorkteam' :: Text
workteamName = Text
pWorkteamName_
    }

-- | Configures SNS topic notifications for available or expiring work items
updateWorkteam_notificationConfiguration :: Lens.Lens' UpdateWorkteam (Prelude.Maybe NotificationConfiguration)
updateWorkteam_notificationConfiguration :: (Maybe NotificationConfiguration
 -> f (Maybe NotificationConfiguration))
-> UpdateWorkteam -> f UpdateWorkteam
updateWorkteam_notificationConfiguration = (UpdateWorkteam -> Maybe NotificationConfiguration)
-> (UpdateWorkteam
    -> Maybe NotificationConfiguration -> UpdateWorkteam)
-> Lens
     UpdateWorkteam
     UpdateWorkteam
     (Maybe NotificationConfiguration)
     (Maybe NotificationConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkteam' {Maybe NotificationConfiguration
notificationConfiguration :: Maybe NotificationConfiguration
$sel:notificationConfiguration:UpdateWorkteam' :: UpdateWorkteam -> Maybe NotificationConfiguration
notificationConfiguration} -> Maybe NotificationConfiguration
notificationConfiguration) (\s :: UpdateWorkteam
s@UpdateWorkteam' {} Maybe NotificationConfiguration
a -> UpdateWorkteam
s {$sel:notificationConfiguration:UpdateWorkteam' :: Maybe NotificationConfiguration
notificationConfiguration = Maybe NotificationConfiguration
a} :: UpdateWorkteam)

-- | A list of @MemberDefinition@ objects that contains objects that identify
-- the workers that make up the work team.
--
-- Workforces can be created using Amazon Cognito or your own OIDC Identity
-- Provider (IdP). For private workforces created using Amazon Cognito use
-- @CognitoMemberDefinition@. For workforces created using your own OIDC
-- identity provider (IdP) use @OidcMemberDefinition@. You should not
-- provide input for both of these parameters in a single request.
--
-- For workforces created using Amazon Cognito, private work teams
-- correspond to Amazon Cognito /user groups/ within the user pool used to
-- create a workforce. All of the @CognitoMemberDefinition@ objects that
-- make up the member definition must have the same @ClientId@ and
-- @UserPool@ values. To add a Amazon Cognito user group to an existing
-- worker pool, see < Adding groups to a User Pool>. For more information
-- about user pools, see
-- <https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html Amazon Cognito User Pools>.
--
-- For workforces created using your own OIDC IdP, specify the user groups
-- that you want to include in your private work team in
-- @OidcMemberDefinition@ by listing those groups in @Groups@. Be aware
-- that user groups that are already in the work team must also be listed
-- in @Groups@ when you make this request to remain on the work team. If
-- you do not include these user groups, they will no longer be associated
-- with the work team you update.
updateWorkteam_memberDefinitions :: Lens.Lens' UpdateWorkteam (Prelude.Maybe (Prelude.NonEmpty MemberDefinition))
updateWorkteam_memberDefinitions :: (Maybe (NonEmpty MemberDefinition)
 -> f (Maybe (NonEmpty MemberDefinition)))
-> UpdateWorkteam -> f UpdateWorkteam
updateWorkteam_memberDefinitions = (UpdateWorkteam -> Maybe (NonEmpty MemberDefinition))
-> (UpdateWorkteam
    -> Maybe (NonEmpty MemberDefinition) -> UpdateWorkteam)
-> Lens
     UpdateWorkteam
     UpdateWorkteam
     (Maybe (NonEmpty MemberDefinition))
     (Maybe (NonEmpty MemberDefinition))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkteam' {Maybe (NonEmpty MemberDefinition)
memberDefinitions :: Maybe (NonEmpty MemberDefinition)
$sel:memberDefinitions:UpdateWorkteam' :: UpdateWorkteam -> Maybe (NonEmpty MemberDefinition)
memberDefinitions} -> Maybe (NonEmpty MemberDefinition)
memberDefinitions) (\s :: UpdateWorkteam
s@UpdateWorkteam' {} Maybe (NonEmpty MemberDefinition)
a -> UpdateWorkteam
s {$sel:memberDefinitions:UpdateWorkteam' :: Maybe (NonEmpty MemberDefinition)
memberDefinitions = Maybe (NonEmpty MemberDefinition)
a} :: UpdateWorkteam) ((Maybe (NonEmpty MemberDefinition)
  -> f (Maybe (NonEmpty MemberDefinition)))
 -> UpdateWorkteam -> f UpdateWorkteam)
-> ((Maybe (NonEmpty MemberDefinition)
     -> f (Maybe (NonEmpty MemberDefinition)))
    -> Maybe (NonEmpty MemberDefinition)
    -> f (Maybe (NonEmpty MemberDefinition)))
-> (Maybe (NonEmpty MemberDefinition)
    -> f (Maybe (NonEmpty MemberDefinition)))
-> UpdateWorkteam
-> f UpdateWorkteam
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty MemberDefinition)
  (NonEmpty MemberDefinition)
  (NonEmpty MemberDefinition)
  (NonEmpty MemberDefinition)
-> Iso
     (Maybe (NonEmpty MemberDefinition))
     (Maybe (NonEmpty MemberDefinition))
     (Maybe (NonEmpty MemberDefinition))
     (Maybe (NonEmpty MemberDefinition))
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
  (NonEmpty MemberDefinition)
  (NonEmpty MemberDefinition)
  (NonEmpty MemberDefinition)
  (NonEmpty MemberDefinition)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An updated description for the work team.
updateWorkteam_description :: Lens.Lens' UpdateWorkteam (Prelude.Maybe Prelude.Text)
updateWorkteam_description :: (Maybe Text -> f (Maybe Text))
-> UpdateWorkteam -> f UpdateWorkteam
updateWorkteam_description = (UpdateWorkteam -> Maybe Text)
-> (UpdateWorkteam -> Maybe Text -> UpdateWorkteam)
-> Lens UpdateWorkteam UpdateWorkteam (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkteam' {Maybe Text
description :: Maybe Text
$sel:description:UpdateWorkteam' :: UpdateWorkteam -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateWorkteam
s@UpdateWorkteam' {} Maybe Text
a -> UpdateWorkteam
s {$sel:description:UpdateWorkteam' :: Maybe Text
description = Maybe Text
a} :: UpdateWorkteam)

-- | The name of the work team to update.
updateWorkteam_workteamName :: Lens.Lens' UpdateWorkteam Prelude.Text
updateWorkteam_workteamName :: (Text -> f Text) -> UpdateWorkteam -> f UpdateWorkteam
updateWorkteam_workteamName = (UpdateWorkteam -> Text)
-> (UpdateWorkteam -> Text -> UpdateWorkteam)
-> Lens UpdateWorkteam UpdateWorkteam Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkteam' {Text
workteamName :: Text
$sel:workteamName:UpdateWorkteam' :: UpdateWorkteam -> Text
workteamName} -> Text
workteamName) (\s :: UpdateWorkteam
s@UpdateWorkteam' {} Text
a -> UpdateWorkteam
s {$sel:workteamName:UpdateWorkteam' :: Text
workteamName = Text
a} :: UpdateWorkteam)

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

instance Prelude.Hashable UpdateWorkteam

instance Prelude.NFData UpdateWorkteam

instance Core.ToHeaders UpdateWorkteam where
  toHeaders :: UpdateWorkteam -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateWorkteam -> 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
"SageMaker.UpdateWorkteam" :: 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 UpdateWorkteam where
  toJSON :: UpdateWorkteam -> Value
toJSON UpdateWorkteam' {Maybe (NonEmpty MemberDefinition)
Maybe Text
Maybe NotificationConfiguration
Text
workteamName :: Text
description :: Maybe Text
memberDefinitions :: Maybe (NonEmpty MemberDefinition)
notificationConfiguration :: Maybe NotificationConfiguration
$sel:workteamName:UpdateWorkteam' :: UpdateWorkteam -> Text
$sel:description:UpdateWorkteam' :: UpdateWorkteam -> Maybe Text
$sel:memberDefinitions:UpdateWorkteam' :: UpdateWorkteam -> Maybe (NonEmpty MemberDefinition)
$sel:notificationConfiguration:UpdateWorkteam' :: UpdateWorkteam -> Maybe NotificationConfiguration
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NotificationConfiguration" Text -> NotificationConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NotificationConfiguration -> Pair)
-> Maybe NotificationConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotificationConfiguration
notificationConfiguration,
            (Text
"MemberDefinitions" Text -> NonEmpty MemberDefinition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty MemberDefinition -> Pair)
-> Maybe (NonEmpty MemberDefinition) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty MemberDefinition)
memberDefinitions,
            (Text
"Description" 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
description,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"WorkteamName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
workteamName)
          ]
      )

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

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

-- | /See:/ 'newUpdateWorkteamResponse' smart constructor.
data UpdateWorkteamResponse = UpdateWorkteamResponse'
  { -- | The response's http status code.
    UpdateWorkteamResponse -> Int
httpStatus :: Prelude.Int,
    -- | A @Workteam@ object that describes the updated work team.
    UpdateWorkteamResponse -> Workteam
workteam :: Workteam
  }
  deriving (UpdateWorkteamResponse -> UpdateWorkteamResponse -> Bool
(UpdateWorkteamResponse -> UpdateWorkteamResponse -> Bool)
-> (UpdateWorkteamResponse -> UpdateWorkteamResponse -> Bool)
-> Eq UpdateWorkteamResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateWorkteamResponse -> UpdateWorkteamResponse -> Bool
$c/= :: UpdateWorkteamResponse -> UpdateWorkteamResponse -> Bool
== :: UpdateWorkteamResponse -> UpdateWorkteamResponse -> Bool
$c== :: UpdateWorkteamResponse -> UpdateWorkteamResponse -> Bool
Prelude.Eq, ReadPrec [UpdateWorkteamResponse]
ReadPrec UpdateWorkteamResponse
Int -> ReadS UpdateWorkteamResponse
ReadS [UpdateWorkteamResponse]
(Int -> ReadS UpdateWorkteamResponse)
-> ReadS [UpdateWorkteamResponse]
-> ReadPrec UpdateWorkteamResponse
-> ReadPrec [UpdateWorkteamResponse]
-> Read UpdateWorkteamResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateWorkteamResponse]
$creadListPrec :: ReadPrec [UpdateWorkteamResponse]
readPrec :: ReadPrec UpdateWorkteamResponse
$creadPrec :: ReadPrec UpdateWorkteamResponse
readList :: ReadS [UpdateWorkteamResponse]
$creadList :: ReadS [UpdateWorkteamResponse]
readsPrec :: Int -> ReadS UpdateWorkteamResponse
$creadsPrec :: Int -> ReadS UpdateWorkteamResponse
Prelude.Read, Int -> UpdateWorkteamResponse -> ShowS
[UpdateWorkteamResponse] -> ShowS
UpdateWorkteamResponse -> String
(Int -> UpdateWorkteamResponse -> ShowS)
-> (UpdateWorkteamResponse -> String)
-> ([UpdateWorkteamResponse] -> ShowS)
-> Show UpdateWorkteamResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateWorkteamResponse] -> ShowS
$cshowList :: [UpdateWorkteamResponse] -> ShowS
show :: UpdateWorkteamResponse -> String
$cshow :: UpdateWorkteamResponse -> String
showsPrec :: Int -> UpdateWorkteamResponse -> ShowS
$cshowsPrec :: Int -> UpdateWorkteamResponse -> ShowS
Prelude.Show, (forall x. UpdateWorkteamResponse -> Rep UpdateWorkteamResponse x)
-> (forall x.
    Rep UpdateWorkteamResponse x -> UpdateWorkteamResponse)
-> Generic UpdateWorkteamResponse
forall x. Rep UpdateWorkteamResponse x -> UpdateWorkteamResponse
forall x. UpdateWorkteamResponse -> Rep UpdateWorkteamResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateWorkteamResponse x -> UpdateWorkteamResponse
$cfrom :: forall x. UpdateWorkteamResponse -> Rep UpdateWorkteamResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateWorkteamResponse' 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:
--
-- 'httpStatus', 'updateWorkteamResponse_httpStatus' - The response's http status code.
--
-- 'workteam', 'updateWorkteamResponse_workteam' - A @Workteam@ object that describes the updated work team.
newUpdateWorkteamResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'workteam'
  Workteam ->
  UpdateWorkteamResponse
newUpdateWorkteamResponse :: Int -> Workteam -> UpdateWorkteamResponse
newUpdateWorkteamResponse Int
pHttpStatus_ Workteam
pWorkteam_ =
  UpdateWorkteamResponse' :: Int -> Workteam -> UpdateWorkteamResponse
UpdateWorkteamResponse'
    { $sel:httpStatus:UpdateWorkteamResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:workteam:UpdateWorkteamResponse' :: Workteam
workteam = Workteam
pWorkteam_
    }

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

-- | A @Workteam@ object that describes the updated work team.
updateWorkteamResponse_workteam :: Lens.Lens' UpdateWorkteamResponse Workteam
updateWorkteamResponse_workteam :: (Workteam -> f Workteam)
-> UpdateWorkteamResponse -> f UpdateWorkteamResponse
updateWorkteamResponse_workteam = (UpdateWorkteamResponse -> Workteam)
-> (UpdateWorkteamResponse -> Workteam -> UpdateWorkteamResponse)
-> Lens
     UpdateWorkteamResponse UpdateWorkteamResponse Workteam Workteam
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkteamResponse' {Workteam
workteam :: Workteam
$sel:workteam:UpdateWorkteamResponse' :: UpdateWorkteamResponse -> Workteam
workteam} -> Workteam
workteam) (\s :: UpdateWorkteamResponse
s@UpdateWorkteamResponse' {} Workteam
a -> UpdateWorkteamResponse
s {$sel:workteam:UpdateWorkteamResponse' :: Workteam
workteam = Workteam
a} :: UpdateWorkteamResponse)

instance Prelude.NFData UpdateWorkteamResponse