{-# 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.ChimeSDKIdentity.UpdateAppInstanceUserEndpoint
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the details of an @AppInstanceUserEndpoint@. You can update the
-- name and @AllowMessage@ values.
module Amazonka.ChimeSDKIdentity.UpdateAppInstanceUserEndpoint
  ( -- * Creating a Request
    UpdateAppInstanceUserEndpoint (..),
    newUpdateAppInstanceUserEndpoint,

    -- * Request Lenses
    updateAppInstanceUserEndpoint_allowMessages,
    updateAppInstanceUserEndpoint_name,
    updateAppInstanceUserEndpoint_appInstanceUserArn,
    updateAppInstanceUserEndpoint_endpointId,

    -- * Destructuring the Response
    UpdateAppInstanceUserEndpointResponse (..),
    newUpdateAppInstanceUserEndpointResponse,

    -- * Response Lenses
    updateAppInstanceUserEndpointResponse_appInstanceUserArn,
    updateAppInstanceUserEndpointResponse_endpointId,
    updateAppInstanceUserEndpointResponse_httpStatus,
  )
where

import Amazonka.ChimeSDKIdentity.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateAppInstanceUserEndpoint' smart constructor.
data UpdateAppInstanceUserEndpoint = UpdateAppInstanceUserEndpoint'
  { -- | Boolean that controls whether the @AppInstanceUserEndpoint@ is opted in
    -- to receive messages. @ALL@ indicates the endpoint will receive all
    -- messages. @NONE@ indicates the endpoint will receive no messages.
    UpdateAppInstanceUserEndpoint -> Maybe AllowMessages
allowMessages :: Prelude.Maybe AllowMessages,
    -- | The name of the @AppInstanceUserEndpoint@.
    UpdateAppInstanceUserEndpoint -> Maybe (Sensitive Text)
name :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The ARN of the @AppInstanceUser@.
    UpdateAppInstanceUserEndpoint -> Sensitive Text
appInstanceUserArn :: Data.Sensitive Prelude.Text,
    -- | The unique identifier of the @AppInstanceUserEndpoint@.
    UpdateAppInstanceUserEndpoint -> Sensitive Text
endpointId :: Data.Sensitive Prelude.Text
  }
  deriving (UpdateAppInstanceUserEndpoint
-> UpdateAppInstanceUserEndpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAppInstanceUserEndpoint
-> UpdateAppInstanceUserEndpoint -> Bool
$c/= :: UpdateAppInstanceUserEndpoint
-> UpdateAppInstanceUserEndpoint -> Bool
== :: UpdateAppInstanceUserEndpoint
-> UpdateAppInstanceUserEndpoint -> Bool
$c== :: UpdateAppInstanceUserEndpoint
-> UpdateAppInstanceUserEndpoint -> Bool
Prelude.Eq, Int -> UpdateAppInstanceUserEndpoint -> ShowS
[UpdateAppInstanceUserEndpoint] -> ShowS
UpdateAppInstanceUserEndpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAppInstanceUserEndpoint] -> ShowS
$cshowList :: [UpdateAppInstanceUserEndpoint] -> ShowS
show :: UpdateAppInstanceUserEndpoint -> String
$cshow :: UpdateAppInstanceUserEndpoint -> String
showsPrec :: Int -> UpdateAppInstanceUserEndpoint -> ShowS
$cshowsPrec :: Int -> UpdateAppInstanceUserEndpoint -> ShowS
Prelude.Show, forall x.
Rep UpdateAppInstanceUserEndpoint x
-> UpdateAppInstanceUserEndpoint
forall x.
UpdateAppInstanceUserEndpoint
-> Rep UpdateAppInstanceUserEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateAppInstanceUserEndpoint x
-> UpdateAppInstanceUserEndpoint
$cfrom :: forall x.
UpdateAppInstanceUserEndpoint
-> Rep UpdateAppInstanceUserEndpoint x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAppInstanceUserEndpoint' 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:
--
-- 'allowMessages', 'updateAppInstanceUserEndpoint_allowMessages' - Boolean that controls whether the @AppInstanceUserEndpoint@ is opted in
-- to receive messages. @ALL@ indicates the endpoint will receive all
-- messages. @NONE@ indicates the endpoint will receive no messages.
--
-- 'name', 'updateAppInstanceUserEndpoint_name' - The name of the @AppInstanceUserEndpoint@.
--
-- 'appInstanceUserArn', 'updateAppInstanceUserEndpoint_appInstanceUserArn' - The ARN of the @AppInstanceUser@.
--
-- 'endpointId', 'updateAppInstanceUserEndpoint_endpointId' - The unique identifier of the @AppInstanceUserEndpoint@.
newUpdateAppInstanceUserEndpoint ::
  -- | 'appInstanceUserArn'
  Prelude.Text ->
  -- | 'endpointId'
  Prelude.Text ->
  UpdateAppInstanceUserEndpoint
newUpdateAppInstanceUserEndpoint :: Text -> Text -> UpdateAppInstanceUserEndpoint
newUpdateAppInstanceUserEndpoint
  Text
pAppInstanceUserArn_
  Text
pEndpointId_ =
    UpdateAppInstanceUserEndpoint'
      { $sel:allowMessages:UpdateAppInstanceUserEndpoint' :: Maybe AllowMessages
allowMessages =
          forall a. Maybe a
Prelude.Nothing,
        $sel:name:UpdateAppInstanceUserEndpoint' :: Maybe (Sensitive Text)
name = forall a. Maybe a
Prelude.Nothing,
        $sel:appInstanceUserArn:UpdateAppInstanceUserEndpoint' :: Sensitive Text
appInstanceUserArn =
          forall a. Iso' (Sensitive a) a
Data._Sensitive
            forall t b. AReview t b -> b -> t
Lens.# Text
pAppInstanceUserArn_,
        $sel:endpointId:UpdateAppInstanceUserEndpoint' :: Sensitive Text
endpointId =
          forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pEndpointId_
      }

-- | Boolean that controls whether the @AppInstanceUserEndpoint@ is opted in
-- to receive messages. @ALL@ indicates the endpoint will receive all
-- messages. @NONE@ indicates the endpoint will receive no messages.
updateAppInstanceUserEndpoint_allowMessages :: Lens.Lens' UpdateAppInstanceUserEndpoint (Prelude.Maybe AllowMessages)
updateAppInstanceUserEndpoint_allowMessages :: Lens' UpdateAppInstanceUserEndpoint (Maybe AllowMessages)
updateAppInstanceUserEndpoint_allowMessages = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAppInstanceUserEndpoint' {Maybe AllowMessages
allowMessages :: Maybe AllowMessages
$sel:allowMessages:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Maybe AllowMessages
allowMessages} -> Maybe AllowMessages
allowMessages) (\s :: UpdateAppInstanceUserEndpoint
s@UpdateAppInstanceUserEndpoint' {} Maybe AllowMessages
a -> UpdateAppInstanceUserEndpoint
s {$sel:allowMessages:UpdateAppInstanceUserEndpoint' :: Maybe AllowMessages
allowMessages = Maybe AllowMessages
a} :: UpdateAppInstanceUserEndpoint)

-- | The name of the @AppInstanceUserEndpoint@.
updateAppInstanceUserEndpoint_name :: Lens.Lens' UpdateAppInstanceUserEndpoint (Prelude.Maybe Prelude.Text)
updateAppInstanceUserEndpoint_name :: Lens' UpdateAppInstanceUserEndpoint (Maybe Text)
updateAppInstanceUserEndpoint_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAppInstanceUserEndpoint' {Maybe (Sensitive Text)
name :: Maybe (Sensitive Text)
$sel:name:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Maybe (Sensitive Text)
name} -> Maybe (Sensitive Text)
name) (\s :: UpdateAppInstanceUserEndpoint
s@UpdateAppInstanceUserEndpoint' {} Maybe (Sensitive Text)
a -> UpdateAppInstanceUserEndpoint
s {$sel:name:UpdateAppInstanceUserEndpoint' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
a} :: UpdateAppInstanceUserEndpoint) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The ARN of the @AppInstanceUser@.
updateAppInstanceUserEndpoint_appInstanceUserArn :: Lens.Lens' UpdateAppInstanceUserEndpoint Prelude.Text
updateAppInstanceUserEndpoint_appInstanceUserArn :: Lens' UpdateAppInstanceUserEndpoint Text
updateAppInstanceUserEndpoint_appInstanceUserArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAppInstanceUserEndpoint' {Sensitive Text
appInstanceUserArn :: Sensitive Text
$sel:appInstanceUserArn:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Sensitive Text
appInstanceUserArn} -> Sensitive Text
appInstanceUserArn) (\s :: UpdateAppInstanceUserEndpoint
s@UpdateAppInstanceUserEndpoint' {} Sensitive Text
a -> UpdateAppInstanceUserEndpoint
s {$sel:appInstanceUserArn:UpdateAppInstanceUserEndpoint' :: Sensitive Text
appInstanceUserArn = Sensitive Text
a} :: UpdateAppInstanceUserEndpoint) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The unique identifier of the @AppInstanceUserEndpoint@.
updateAppInstanceUserEndpoint_endpointId :: Lens.Lens' UpdateAppInstanceUserEndpoint Prelude.Text
updateAppInstanceUserEndpoint_endpointId :: Lens' UpdateAppInstanceUserEndpoint Text
updateAppInstanceUserEndpoint_endpointId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAppInstanceUserEndpoint' {Sensitive Text
endpointId :: Sensitive Text
$sel:endpointId:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Sensitive Text
endpointId} -> Sensitive Text
endpointId) (\s :: UpdateAppInstanceUserEndpoint
s@UpdateAppInstanceUserEndpoint' {} Sensitive Text
a -> UpdateAppInstanceUserEndpoint
s {$sel:endpointId:UpdateAppInstanceUserEndpoint' :: Sensitive Text
endpointId = Sensitive Text
a} :: UpdateAppInstanceUserEndpoint) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive

instance
  Core.AWSRequest
    UpdateAppInstanceUserEndpoint
  where
  type
    AWSResponse UpdateAppInstanceUserEndpoint =
      UpdateAppInstanceUserEndpointResponse
  request :: (Service -> Service)
-> UpdateAppInstanceUserEndpoint
-> Request UpdateAppInstanceUserEndpoint
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateAppInstanceUserEndpoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateAppInstanceUserEndpoint)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Int
-> UpdateAppInstanceUserEndpointResponse
UpdateAppInstanceUserEndpointResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"AppInstanceUserArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"EndpointId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    UpdateAppInstanceUserEndpoint
  where
  hashWithSalt :: Int -> UpdateAppInstanceUserEndpoint -> Int
hashWithSalt Int
_salt UpdateAppInstanceUserEndpoint' {Maybe (Sensitive Text)
Maybe AllowMessages
Sensitive Text
endpointId :: Sensitive Text
appInstanceUserArn :: Sensitive Text
name :: Maybe (Sensitive Text)
allowMessages :: Maybe AllowMessages
$sel:endpointId:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Sensitive Text
$sel:appInstanceUserArn:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Sensitive Text
$sel:name:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Maybe (Sensitive Text)
$sel:allowMessages:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Maybe AllowMessages
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AllowMessages
allowMessages
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
appInstanceUserArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
endpointId

instance Prelude.NFData UpdateAppInstanceUserEndpoint where
  rnf :: UpdateAppInstanceUserEndpoint -> ()
rnf UpdateAppInstanceUserEndpoint' {Maybe (Sensitive Text)
Maybe AllowMessages
Sensitive Text
endpointId :: Sensitive Text
appInstanceUserArn :: Sensitive Text
name :: Maybe (Sensitive Text)
allowMessages :: Maybe AllowMessages
$sel:endpointId:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Sensitive Text
$sel:appInstanceUserArn:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Sensitive Text
$sel:name:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Maybe (Sensitive Text)
$sel:allowMessages:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Maybe AllowMessages
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AllowMessages
allowMessages
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
appInstanceUserArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
endpointId

instance Data.ToHeaders UpdateAppInstanceUserEndpoint where
  toHeaders :: UpdateAppInstanceUserEndpoint -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToJSON UpdateAppInstanceUserEndpoint where
  toJSON :: UpdateAppInstanceUserEndpoint -> Value
toJSON UpdateAppInstanceUserEndpoint' {Maybe (Sensitive Text)
Maybe AllowMessages
Sensitive Text
endpointId :: Sensitive Text
appInstanceUserArn :: Sensitive Text
name :: Maybe (Sensitive Text)
allowMessages :: Maybe AllowMessages
$sel:endpointId:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Sensitive Text
$sel:appInstanceUserArn:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Sensitive Text
$sel:name:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Maybe (Sensitive Text)
$sel:allowMessages:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Maybe AllowMessages
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AllowMessages" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AllowMessages
allowMessages,
            (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
name
          ]
      )

instance Data.ToPath UpdateAppInstanceUserEndpoint where
  toPath :: UpdateAppInstanceUserEndpoint -> ByteString
toPath UpdateAppInstanceUserEndpoint' {Maybe (Sensitive Text)
Maybe AllowMessages
Sensitive Text
endpointId :: Sensitive Text
appInstanceUserArn :: Sensitive Text
name :: Maybe (Sensitive Text)
allowMessages :: Maybe AllowMessages
$sel:endpointId:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Sensitive Text
$sel:appInstanceUserArn:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Sensitive Text
$sel:name:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Maybe (Sensitive Text)
$sel:allowMessages:UpdateAppInstanceUserEndpoint' :: UpdateAppInstanceUserEndpoint -> Maybe AllowMessages
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/app-instance-users/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Sensitive Text
appInstanceUserArn,
        ByteString
"/endpoints/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Sensitive Text
endpointId
      ]

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

-- | /See:/ 'newUpdateAppInstanceUserEndpointResponse' smart constructor.
data UpdateAppInstanceUserEndpointResponse = UpdateAppInstanceUserEndpointResponse'
  { -- | The ARN of the @AppInstanceUser@.
    UpdateAppInstanceUserEndpointResponse -> Maybe (Sensitive Text)
appInstanceUserArn :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The unique identifier of the @AppInstanceUserEndpoint@.
    UpdateAppInstanceUserEndpointResponse -> Maybe (Sensitive Text)
endpointId :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The response's http status code.
    UpdateAppInstanceUserEndpointResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateAppInstanceUserEndpointResponse
-> UpdateAppInstanceUserEndpointResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAppInstanceUserEndpointResponse
-> UpdateAppInstanceUserEndpointResponse -> Bool
$c/= :: UpdateAppInstanceUserEndpointResponse
-> UpdateAppInstanceUserEndpointResponse -> Bool
== :: UpdateAppInstanceUserEndpointResponse
-> UpdateAppInstanceUserEndpointResponse -> Bool
$c== :: UpdateAppInstanceUserEndpointResponse
-> UpdateAppInstanceUserEndpointResponse -> Bool
Prelude.Eq, Int -> UpdateAppInstanceUserEndpointResponse -> ShowS
[UpdateAppInstanceUserEndpointResponse] -> ShowS
UpdateAppInstanceUserEndpointResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAppInstanceUserEndpointResponse] -> ShowS
$cshowList :: [UpdateAppInstanceUserEndpointResponse] -> ShowS
show :: UpdateAppInstanceUserEndpointResponse -> String
$cshow :: UpdateAppInstanceUserEndpointResponse -> String
showsPrec :: Int -> UpdateAppInstanceUserEndpointResponse -> ShowS
$cshowsPrec :: Int -> UpdateAppInstanceUserEndpointResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateAppInstanceUserEndpointResponse x
-> UpdateAppInstanceUserEndpointResponse
forall x.
UpdateAppInstanceUserEndpointResponse
-> Rep UpdateAppInstanceUserEndpointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateAppInstanceUserEndpointResponse x
-> UpdateAppInstanceUserEndpointResponse
$cfrom :: forall x.
UpdateAppInstanceUserEndpointResponse
-> Rep UpdateAppInstanceUserEndpointResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAppInstanceUserEndpointResponse' 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:
--
-- 'appInstanceUserArn', 'updateAppInstanceUserEndpointResponse_appInstanceUserArn' - The ARN of the @AppInstanceUser@.
--
-- 'endpointId', 'updateAppInstanceUserEndpointResponse_endpointId' - The unique identifier of the @AppInstanceUserEndpoint@.
--
-- 'httpStatus', 'updateAppInstanceUserEndpointResponse_httpStatus' - The response's http status code.
newUpdateAppInstanceUserEndpointResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateAppInstanceUserEndpointResponse
newUpdateAppInstanceUserEndpointResponse :: Int -> UpdateAppInstanceUserEndpointResponse
newUpdateAppInstanceUserEndpointResponse Int
pHttpStatus_ =
  UpdateAppInstanceUserEndpointResponse'
    { $sel:appInstanceUserArn:UpdateAppInstanceUserEndpointResponse' :: Maybe (Sensitive Text)
appInstanceUserArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:endpointId:UpdateAppInstanceUserEndpointResponse' :: Maybe (Sensitive Text)
endpointId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateAppInstanceUserEndpointResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the @AppInstanceUser@.
updateAppInstanceUserEndpointResponse_appInstanceUserArn :: Lens.Lens' UpdateAppInstanceUserEndpointResponse (Prelude.Maybe Prelude.Text)
updateAppInstanceUserEndpointResponse_appInstanceUserArn :: Lens' UpdateAppInstanceUserEndpointResponse (Maybe Text)
updateAppInstanceUserEndpointResponse_appInstanceUserArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAppInstanceUserEndpointResponse' {Maybe (Sensitive Text)
appInstanceUserArn :: Maybe (Sensitive Text)
$sel:appInstanceUserArn:UpdateAppInstanceUserEndpointResponse' :: UpdateAppInstanceUserEndpointResponse -> Maybe (Sensitive Text)
appInstanceUserArn} -> Maybe (Sensitive Text)
appInstanceUserArn) (\s :: UpdateAppInstanceUserEndpointResponse
s@UpdateAppInstanceUserEndpointResponse' {} Maybe (Sensitive Text)
a -> UpdateAppInstanceUserEndpointResponse
s {$sel:appInstanceUserArn:UpdateAppInstanceUserEndpointResponse' :: Maybe (Sensitive Text)
appInstanceUserArn = Maybe (Sensitive Text)
a} :: UpdateAppInstanceUserEndpointResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The unique identifier of the @AppInstanceUserEndpoint@.
updateAppInstanceUserEndpointResponse_endpointId :: Lens.Lens' UpdateAppInstanceUserEndpointResponse (Prelude.Maybe Prelude.Text)
updateAppInstanceUserEndpointResponse_endpointId :: Lens' UpdateAppInstanceUserEndpointResponse (Maybe Text)
updateAppInstanceUserEndpointResponse_endpointId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAppInstanceUserEndpointResponse' {Maybe (Sensitive Text)
endpointId :: Maybe (Sensitive Text)
$sel:endpointId:UpdateAppInstanceUserEndpointResponse' :: UpdateAppInstanceUserEndpointResponse -> Maybe (Sensitive Text)
endpointId} -> Maybe (Sensitive Text)
endpointId) (\s :: UpdateAppInstanceUserEndpointResponse
s@UpdateAppInstanceUserEndpointResponse' {} Maybe (Sensitive Text)
a -> UpdateAppInstanceUserEndpointResponse
s {$sel:endpointId:UpdateAppInstanceUserEndpointResponse' :: Maybe (Sensitive Text)
endpointId = Maybe (Sensitive Text)
a} :: UpdateAppInstanceUserEndpointResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive

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

instance
  Prelude.NFData
    UpdateAppInstanceUserEndpointResponse
  where
  rnf :: UpdateAppInstanceUserEndpointResponse -> ()
rnf UpdateAppInstanceUserEndpointResponse' {Int
Maybe (Sensitive Text)
httpStatus :: Int
endpointId :: Maybe (Sensitive Text)
appInstanceUserArn :: Maybe (Sensitive Text)
$sel:httpStatus:UpdateAppInstanceUserEndpointResponse' :: UpdateAppInstanceUserEndpointResponse -> Int
$sel:endpointId:UpdateAppInstanceUserEndpointResponse' :: UpdateAppInstanceUserEndpointResponse -> Maybe (Sensitive Text)
$sel:appInstanceUserArn:UpdateAppInstanceUserEndpointResponse' :: UpdateAppInstanceUserEndpointResponse -> Maybe (Sensitive Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
appInstanceUserArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
endpointId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus