{-# 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.Nimble.UpdateLaunchProfileMember
-- 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)
--
-- Update a user persona in launch profile membership.
module Amazonka.Nimble.UpdateLaunchProfileMember
  ( -- * Creating a Request
    UpdateLaunchProfileMember (..),
    newUpdateLaunchProfileMember,

    -- * Request Lenses
    updateLaunchProfileMember_clientToken,
    updateLaunchProfileMember_studioId,
    updateLaunchProfileMember_persona,
    updateLaunchProfileMember_principalId,
    updateLaunchProfileMember_launchProfileId,

    -- * Destructuring the Response
    UpdateLaunchProfileMemberResponse (..),
    newUpdateLaunchProfileMemberResponse,

    -- * Response Lenses
    updateLaunchProfileMemberResponse_member,
    updateLaunchProfileMemberResponse_httpStatus,
  )
where

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

-- | The principal ID.
--
-- /See:/ 'newUpdateLaunchProfileMember' smart constructor.
data UpdateLaunchProfileMember = UpdateLaunchProfileMember'
  { -- | To make an idempotent API request using one of these actions, specify a
    -- client token in the request. You should not reuse the same client token
    -- for other API requests. If you retry a request that completed
    -- successfully using the same client token and the same parameters, the
    -- retry succeeds without performing any further actions. If you retry a
    -- successful request using the same client token, but one or more of the
    -- parameters are different, the retry fails with a ValidationException
    -- error.
    UpdateLaunchProfileMember -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The studio ID.
    UpdateLaunchProfileMember -> Text
studioId :: Prelude.Text,
    -- | The persona.
    UpdateLaunchProfileMember -> LaunchProfilePersona
persona :: LaunchProfilePersona,
    -- | The principal ID.
    UpdateLaunchProfileMember -> Text
principalId :: Prelude.Text,
    -- | The launch profile ID.
    UpdateLaunchProfileMember -> Text
launchProfileId :: Prelude.Text
  }
  deriving (UpdateLaunchProfileMember -> UpdateLaunchProfileMember -> Bool
(UpdateLaunchProfileMember -> UpdateLaunchProfileMember -> Bool)
-> (UpdateLaunchProfileMember -> UpdateLaunchProfileMember -> Bool)
-> Eq UpdateLaunchProfileMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLaunchProfileMember -> UpdateLaunchProfileMember -> Bool
$c/= :: UpdateLaunchProfileMember -> UpdateLaunchProfileMember -> Bool
== :: UpdateLaunchProfileMember -> UpdateLaunchProfileMember -> Bool
$c== :: UpdateLaunchProfileMember -> UpdateLaunchProfileMember -> Bool
Prelude.Eq, ReadPrec [UpdateLaunchProfileMember]
ReadPrec UpdateLaunchProfileMember
Int -> ReadS UpdateLaunchProfileMember
ReadS [UpdateLaunchProfileMember]
(Int -> ReadS UpdateLaunchProfileMember)
-> ReadS [UpdateLaunchProfileMember]
-> ReadPrec UpdateLaunchProfileMember
-> ReadPrec [UpdateLaunchProfileMember]
-> Read UpdateLaunchProfileMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLaunchProfileMember]
$creadListPrec :: ReadPrec [UpdateLaunchProfileMember]
readPrec :: ReadPrec UpdateLaunchProfileMember
$creadPrec :: ReadPrec UpdateLaunchProfileMember
readList :: ReadS [UpdateLaunchProfileMember]
$creadList :: ReadS [UpdateLaunchProfileMember]
readsPrec :: Int -> ReadS UpdateLaunchProfileMember
$creadsPrec :: Int -> ReadS UpdateLaunchProfileMember
Prelude.Read, Int -> UpdateLaunchProfileMember -> ShowS
[UpdateLaunchProfileMember] -> ShowS
UpdateLaunchProfileMember -> String
(Int -> UpdateLaunchProfileMember -> ShowS)
-> (UpdateLaunchProfileMember -> String)
-> ([UpdateLaunchProfileMember] -> ShowS)
-> Show UpdateLaunchProfileMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLaunchProfileMember] -> ShowS
$cshowList :: [UpdateLaunchProfileMember] -> ShowS
show :: UpdateLaunchProfileMember -> String
$cshow :: UpdateLaunchProfileMember -> String
showsPrec :: Int -> UpdateLaunchProfileMember -> ShowS
$cshowsPrec :: Int -> UpdateLaunchProfileMember -> ShowS
Prelude.Show, (forall x.
 UpdateLaunchProfileMember -> Rep UpdateLaunchProfileMember x)
-> (forall x.
    Rep UpdateLaunchProfileMember x -> UpdateLaunchProfileMember)
-> Generic UpdateLaunchProfileMember
forall x.
Rep UpdateLaunchProfileMember x -> UpdateLaunchProfileMember
forall x.
UpdateLaunchProfileMember -> Rep UpdateLaunchProfileMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateLaunchProfileMember x -> UpdateLaunchProfileMember
$cfrom :: forall x.
UpdateLaunchProfileMember -> Rep UpdateLaunchProfileMember x
Prelude.Generic)

-- |
-- Create a value of 'UpdateLaunchProfileMember' 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:
--
-- 'clientToken', 'updateLaunchProfileMember_clientToken' - To make an idempotent API request using one of these actions, specify a
-- client token in the request. You should not reuse the same client token
-- for other API requests. If you retry a request that completed
-- successfully using the same client token and the same parameters, the
-- retry succeeds without performing any further actions. If you retry a
-- successful request using the same client token, but one or more of the
-- parameters are different, the retry fails with a ValidationException
-- error.
--
-- 'studioId', 'updateLaunchProfileMember_studioId' - The studio ID.
--
-- 'persona', 'updateLaunchProfileMember_persona' - The persona.
--
-- 'principalId', 'updateLaunchProfileMember_principalId' - The principal ID.
--
-- 'launchProfileId', 'updateLaunchProfileMember_launchProfileId' - The launch profile ID.
newUpdateLaunchProfileMember ::
  -- | 'studioId'
  Prelude.Text ->
  -- | 'persona'
  LaunchProfilePersona ->
  -- | 'principalId'
  Prelude.Text ->
  -- | 'launchProfileId'
  Prelude.Text ->
  UpdateLaunchProfileMember
newUpdateLaunchProfileMember :: Text
-> LaunchProfilePersona
-> Text
-> Text
-> UpdateLaunchProfileMember
newUpdateLaunchProfileMember
  Text
pStudioId_
  LaunchProfilePersona
pPersona_
  Text
pPrincipalId_
  Text
pLaunchProfileId_ =
    UpdateLaunchProfileMember' :: Maybe Text
-> Text
-> LaunchProfilePersona
-> Text
-> Text
-> UpdateLaunchProfileMember
UpdateLaunchProfileMember'
      { $sel:clientToken:UpdateLaunchProfileMember' :: Maybe Text
clientToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:studioId:UpdateLaunchProfileMember' :: Text
studioId = Text
pStudioId_,
        $sel:persona:UpdateLaunchProfileMember' :: LaunchProfilePersona
persona = LaunchProfilePersona
pPersona_,
        $sel:principalId:UpdateLaunchProfileMember' :: Text
principalId = Text
pPrincipalId_,
        $sel:launchProfileId:UpdateLaunchProfileMember' :: Text
launchProfileId = Text
pLaunchProfileId_
      }

-- | To make an idempotent API request using one of these actions, specify a
-- client token in the request. You should not reuse the same client token
-- for other API requests. If you retry a request that completed
-- successfully using the same client token and the same parameters, the
-- retry succeeds without performing any further actions. If you retry a
-- successful request using the same client token, but one or more of the
-- parameters are different, the retry fails with a ValidationException
-- error.
updateLaunchProfileMember_clientToken :: Lens.Lens' UpdateLaunchProfileMember (Prelude.Maybe Prelude.Text)
updateLaunchProfileMember_clientToken :: (Maybe Text -> f (Maybe Text))
-> UpdateLaunchProfileMember -> f UpdateLaunchProfileMember
updateLaunchProfileMember_clientToken = (UpdateLaunchProfileMember -> Maybe Text)
-> (UpdateLaunchProfileMember
    -> Maybe Text -> UpdateLaunchProfileMember)
-> Lens
     UpdateLaunchProfileMember
     UpdateLaunchProfileMember
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLaunchProfileMember' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateLaunchProfileMember
s@UpdateLaunchProfileMember' {} Maybe Text
a -> UpdateLaunchProfileMember
s {$sel:clientToken:UpdateLaunchProfileMember' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateLaunchProfileMember)

-- | The studio ID.
updateLaunchProfileMember_studioId :: Lens.Lens' UpdateLaunchProfileMember Prelude.Text
updateLaunchProfileMember_studioId :: (Text -> f Text)
-> UpdateLaunchProfileMember -> f UpdateLaunchProfileMember
updateLaunchProfileMember_studioId = (UpdateLaunchProfileMember -> Text)
-> (UpdateLaunchProfileMember -> Text -> UpdateLaunchProfileMember)
-> Lens
     UpdateLaunchProfileMember UpdateLaunchProfileMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLaunchProfileMember' {Text
studioId :: Text
$sel:studioId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
studioId} -> Text
studioId) (\s :: UpdateLaunchProfileMember
s@UpdateLaunchProfileMember' {} Text
a -> UpdateLaunchProfileMember
s {$sel:studioId:UpdateLaunchProfileMember' :: Text
studioId = Text
a} :: UpdateLaunchProfileMember)

-- | The persona.
updateLaunchProfileMember_persona :: Lens.Lens' UpdateLaunchProfileMember LaunchProfilePersona
updateLaunchProfileMember_persona :: (LaunchProfilePersona -> f LaunchProfilePersona)
-> UpdateLaunchProfileMember -> f UpdateLaunchProfileMember
updateLaunchProfileMember_persona = (UpdateLaunchProfileMember -> LaunchProfilePersona)
-> (UpdateLaunchProfileMember
    -> LaunchProfilePersona -> UpdateLaunchProfileMember)
-> Lens
     UpdateLaunchProfileMember
     UpdateLaunchProfileMember
     LaunchProfilePersona
     LaunchProfilePersona
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLaunchProfileMember' {LaunchProfilePersona
persona :: LaunchProfilePersona
$sel:persona:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> LaunchProfilePersona
persona} -> LaunchProfilePersona
persona) (\s :: UpdateLaunchProfileMember
s@UpdateLaunchProfileMember' {} LaunchProfilePersona
a -> UpdateLaunchProfileMember
s {$sel:persona:UpdateLaunchProfileMember' :: LaunchProfilePersona
persona = LaunchProfilePersona
a} :: UpdateLaunchProfileMember)

-- | The principal ID.
updateLaunchProfileMember_principalId :: Lens.Lens' UpdateLaunchProfileMember Prelude.Text
updateLaunchProfileMember_principalId :: (Text -> f Text)
-> UpdateLaunchProfileMember -> f UpdateLaunchProfileMember
updateLaunchProfileMember_principalId = (UpdateLaunchProfileMember -> Text)
-> (UpdateLaunchProfileMember -> Text -> UpdateLaunchProfileMember)
-> Lens
     UpdateLaunchProfileMember UpdateLaunchProfileMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLaunchProfileMember' {Text
principalId :: Text
$sel:principalId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
principalId} -> Text
principalId) (\s :: UpdateLaunchProfileMember
s@UpdateLaunchProfileMember' {} Text
a -> UpdateLaunchProfileMember
s {$sel:principalId:UpdateLaunchProfileMember' :: Text
principalId = Text
a} :: UpdateLaunchProfileMember)

-- | The launch profile ID.
updateLaunchProfileMember_launchProfileId :: Lens.Lens' UpdateLaunchProfileMember Prelude.Text
updateLaunchProfileMember_launchProfileId :: (Text -> f Text)
-> UpdateLaunchProfileMember -> f UpdateLaunchProfileMember
updateLaunchProfileMember_launchProfileId = (UpdateLaunchProfileMember -> Text)
-> (UpdateLaunchProfileMember -> Text -> UpdateLaunchProfileMember)
-> Lens
     UpdateLaunchProfileMember UpdateLaunchProfileMember Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLaunchProfileMember' {Text
launchProfileId :: Text
$sel:launchProfileId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
launchProfileId} -> Text
launchProfileId) (\s :: UpdateLaunchProfileMember
s@UpdateLaunchProfileMember' {} Text
a -> UpdateLaunchProfileMember
s {$sel:launchProfileId:UpdateLaunchProfileMember' :: Text
launchProfileId = Text
a} :: UpdateLaunchProfileMember)

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

instance Prelude.NFData UpdateLaunchProfileMember

instance Core.ToHeaders UpdateLaunchProfileMember where
  toHeaders :: UpdateLaunchProfileMember -> ResponseHeaders
toHeaders UpdateLaunchProfileMember' {Maybe Text
Text
LaunchProfilePersona
launchProfileId :: Text
principalId :: Text
persona :: LaunchProfilePersona
studioId :: Text
clientToken :: Maybe Text
$sel:launchProfileId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
$sel:principalId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
$sel:persona:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> LaunchProfilePersona
$sel:studioId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
$sel:clientToken:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Maybe Text
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"X-Amz-Client-Token" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
clientToken,
        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 UpdateLaunchProfileMember where
  toJSON :: UpdateLaunchProfileMember -> Value
toJSON UpdateLaunchProfileMember' {Maybe Text
Text
LaunchProfilePersona
launchProfileId :: Text
principalId :: Text
persona :: LaunchProfilePersona
studioId :: Text
clientToken :: Maybe Text
$sel:launchProfileId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
$sel:principalId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
$sel:persona:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> LaunchProfilePersona
$sel:studioId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
$sel:clientToken:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Maybe 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
"persona" Text -> LaunchProfilePersona -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LaunchProfilePersona
persona)]
      )

instance Core.ToPath UpdateLaunchProfileMember where
  toPath :: UpdateLaunchProfileMember -> ByteString
toPath UpdateLaunchProfileMember' {Maybe Text
Text
LaunchProfilePersona
launchProfileId :: Text
principalId :: Text
persona :: LaunchProfilePersona
studioId :: Text
clientToken :: Maybe Text
$sel:launchProfileId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
$sel:principalId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
$sel:persona:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> LaunchProfilePersona
$sel:studioId:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Text
$sel:clientToken:UpdateLaunchProfileMember' :: UpdateLaunchProfileMember -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-08-01/studios/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
studioId,
        ByteString
"/launch-profiles/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
launchProfileId,
        ByteString
"/membership/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
principalId
      ]

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

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

-- |
-- Create a value of 'UpdateLaunchProfileMemberResponse' 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:
--
-- 'member', 'updateLaunchProfileMemberResponse_member' - The member.
--
-- 'httpStatus', 'updateLaunchProfileMemberResponse_httpStatus' - The response's http status code.
newUpdateLaunchProfileMemberResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateLaunchProfileMemberResponse
newUpdateLaunchProfileMemberResponse :: Int -> UpdateLaunchProfileMemberResponse
newUpdateLaunchProfileMemberResponse Int
pHttpStatus_ =
  UpdateLaunchProfileMemberResponse' :: Maybe LaunchProfileMembership
-> Int -> UpdateLaunchProfileMemberResponse
UpdateLaunchProfileMemberResponse'
    { $sel:member:UpdateLaunchProfileMemberResponse' :: Maybe LaunchProfileMembership
member =
        Maybe LaunchProfileMembership
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateLaunchProfileMemberResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The member.
updateLaunchProfileMemberResponse_member :: Lens.Lens' UpdateLaunchProfileMemberResponse (Prelude.Maybe LaunchProfileMembership)
updateLaunchProfileMemberResponse_member :: (Maybe LaunchProfileMembership
 -> f (Maybe LaunchProfileMembership))
-> UpdateLaunchProfileMemberResponse
-> f UpdateLaunchProfileMemberResponse
updateLaunchProfileMemberResponse_member = (UpdateLaunchProfileMemberResponse
 -> Maybe LaunchProfileMembership)
-> (UpdateLaunchProfileMemberResponse
    -> Maybe LaunchProfileMembership
    -> UpdateLaunchProfileMemberResponse)
-> Lens
     UpdateLaunchProfileMemberResponse
     UpdateLaunchProfileMemberResponse
     (Maybe LaunchProfileMembership)
     (Maybe LaunchProfileMembership)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLaunchProfileMemberResponse' {Maybe LaunchProfileMembership
member :: Maybe LaunchProfileMembership
$sel:member:UpdateLaunchProfileMemberResponse' :: UpdateLaunchProfileMemberResponse -> Maybe LaunchProfileMembership
member} -> Maybe LaunchProfileMembership
member) (\s :: UpdateLaunchProfileMemberResponse
s@UpdateLaunchProfileMemberResponse' {} Maybe LaunchProfileMembership
a -> UpdateLaunchProfileMemberResponse
s {$sel:member:UpdateLaunchProfileMemberResponse' :: Maybe LaunchProfileMembership
member = Maybe LaunchProfileMembership
a} :: UpdateLaunchProfileMemberResponse)

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

instance
  Prelude.NFData
    UpdateLaunchProfileMemberResponse