{-# 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.CognitoIdentityProvider.UpdateResourceServer
-- 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 the name and scopes of resource server. All other fields are
-- read-only.
--
-- If you don\'t provide a value for an attribute, it will be set to the
-- default value.
module Amazonka.CognitoIdentityProvider.UpdateResourceServer
  ( -- * Creating a Request
    UpdateResourceServer (..),
    newUpdateResourceServer,

    -- * Request Lenses
    updateResourceServer_scopes,
    updateResourceServer_userPoolId,
    updateResourceServer_identifier,
    updateResourceServer_name,

    -- * Destructuring the Response
    UpdateResourceServerResponse (..),
    newUpdateResourceServerResponse,

    -- * Response Lenses
    updateResourceServerResponse_httpStatus,
    updateResourceServerResponse_resourceServer,
  )
where

import Amazonka.CognitoIdentityProvider.Types
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

-- | /See:/ 'newUpdateResourceServer' smart constructor.
data UpdateResourceServer = UpdateResourceServer'
  { -- | The scope values to be set for the resource server.
    UpdateResourceServer -> Maybe [ResourceServerScopeType]
scopes :: Prelude.Maybe [ResourceServerScopeType],
    -- | The user pool ID for the user pool.
    UpdateResourceServer -> Text
userPoolId :: Prelude.Text,
    -- | The identifier for the resource server.
    UpdateResourceServer -> Text
identifier :: Prelude.Text,
    -- | The name of the resource server.
    UpdateResourceServer -> Text
name :: Prelude.Text
  }
  deriving (UpdateResourceServer -> UpdateResourceServer -> Bool
(UpdateResourceServer -> UpdateResourceServer -> Bool)
-> (UpdateResourceServer -> UpdateResourceServer -> Bool)
-> Eq UpdateResourceServer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateResourceServer -> UpdateResourceServer -> Bool
$c/= :: UpdateResourceServer -> UpdateResourceServer -> Bool
== :: UpdateResourceServer -> UpdateResourceServer -> Bool
$c== :: UpdateResourceServer -> UpdateResourceServer -> Bool
Prelude.Eq, ReadPrec [UpdateResourceServer]
ReadPrec UpdateResourceServer
Int -> ReadS UpdateResourceServer
ReadS [UpdateResourceServer]
(Int -> ReadS UpdateResourceServer)
-> ReadS [UpdateResourceServer]
-> ReadPrec UpdateResourceServer
-> ReadPrec [UpdateResourceServer]
-> Read UpdateResourceServer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateResourceServer]
$creadListPrec :: ReadPrec [UpdateResourceServer]
readPrec :: ReadPrec UpdateResourceServer
$creadPrec :: ReadPrec UpdateResourceServer
readList :: ReadS [UpdateResourceServer]
$creadList :: ReadS [UpdateResourceServer]
readsPrec :: Int -> ReadS UpdateResourceServer
$creadsPrec :: Int -> ReadS UpdateResourceServer
Prelude.Read, Int -> UpdateResourceServer -> ShowS
[UpdateResourceServer] -> ShowS
UpdateResourceServer -> String
(Int -> UpdateResourceServer -> ShowS)
-> (UpdateResourceServer -> String)
-> ([UpdateResourceServer] -> ShowS)
-> Show UpdateResourceServer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateResourceServer] -> ShowS
$cshowList :: [UpdateResourceServer] -> ShowS
show :: UpdateResourceServer -> String
$cshow :: UpdateResourceServer -> String
showsPrec :: Int -> UpdateResourceServer -> ShowS
$cshowsPrec :: Int -> UpdateResourceServer -> ShowS
Prelude.Show, (forall x. UpdateResourceServer -> Rep UpdateResourceServer x)
-> (forall x. Rep UpdateResourceServer x -> UpdateResourceServer)
-> Generic UpdateResourceServer
forall x. Rep UpdateResourceServer x -> UpdateResourceServer
forall x. UpdateResourceServer -> Rep UpdateResourceServer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateResourceServer x -> UpdateResourceServer
$cfrom :: forall x. UpdateResourceServer -> Rep UpdateResourceServer x
Prelude.Generic)

-- |
-- Create a value of 'UpdateResourceServer' 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:
--
-- 'scopes', 'updateResourceServer_scopes' - The scope values to be set for the resource server.
--
-- 'userPoolId', 'updateResourceServer_userPoolId' - The user pool ID for the user pool.
--
-- 'identifier', 'updateResourceServer_identifier' - The identifier for the resource server.
--
-- 'name', 'updateResourceServer_name' - The name of the resource server.
newUpdateResourceServer ::
  -- | 'userPoolId'
  Prelude.Text ->
  -- | 'identifier'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  UpdateResourceServer
newUpdateResourceServer :: Text -> Text -> Text -> UpdateResourceServer
newUpdateResourceServer
  Text
pUserPoolId_
  Text
pIdentifier_
  Text
pName_ =
    UpdateResourceServer' :: Maybe [ResourceServerScopeType]
-> Text -> Text -> Text -> UpdateResourceServer
UpdateResourceServer'
      { $sel:scopes:UpdateResourceServer' :: Maybe [ResourceServerScopeType]
scopes = Maybe [ResourceServerScopeType]
forall a. Maybe a
Prelude.Nothing,
        $sel:userPoolId:UpdateResourceServer' :: Text
userPoolId = Text
pUserPoolId_,
        $sel:identifier:UpdateResourceServer' :: Text
identifier = Text
pIdentifier_,
        $sel:name:UpdateResourceServer' :: Text
name = Text
pName_
      }

-- | The scope values to be set for the resource server.
updateResourceServer_scopes :: Lens.Lens' UpdateResourceServer (Prelude.Maybe [ResourceServerScopeType])
updateResourceServer_scopes :: (Maybe [ResourceServerScopeType]
 -> f (Maybe [ResourceServerScopeType]))
-> UpdateResourceServer -> f UpdateResourceServer
updateResourceServer_scopes = (UpdateResourceServer -> Maybe [ResourceServerScopeType])
-> (UpdateResourceServer
    -> Maybe [ResourceServerScopeType] -> UpdateResourceServer)
-> Lens
     UpdateResourceServer
     UpdateResourceServer
     (Maybe [ResourceServerScopeType])
     (Maybe [ResourceServerScopeType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceServer' {Maybe [ResourceServerScopeType]
scopes :: Maybe [ResourceServerScopeType]
$sel:scopes:UpdateResourceServer' :: UpdateResourceServer -> Maybe [ResourceServerScopeType]
scopes} -> Maybe [ResourceServerScopeType]
scopes) (\s :: UpdateResourceServer
s@UpdateResourceServer' {} Maybe [ResourceServerScopeType]
a -> UpdateResourceServer
s {$sel:scopes:UpdateResourceServer' :: Maybe [ResourceServerScopeType]
scopes = Maybe [ResourceServerScopeType]
a} :: UpdateResourceServer) ((Maybe [ResourceServerScopeType]
  -> f (Maybe [ResourceServerScopeType]))
 -> UpdateResourceServer -> f UpdateResourceServer)
-> ((Maybe [ResourceServerScopeType]
     -> f (Maybe [ResourceServerScopeType]))
    -> Maybe [ResourceServerScopeType]
    -> f (Maybe [ResourceServerScopeType]))
-> (Maybe [ResourceServerScopeType]
    -> f (Maybe [ResourceServerScopeType]))
-> UpdateResourceServer
-> f UpdateResourceServer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ResourceServerScopeType]
  [ResourceServerScopeType]
  [ResourceServerScopeType]
  [ResourceServerScopeType]
-> Iso
     (Maybe [ResourceServerScopeType])
     (Maybe [ResourceServerScopeType])
     (Maybe [ResourceServerScopeType])
     (Maybe [ResourceServerScopeType])
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
  [ResourceServerScopeType]
  [ResourceServerScopeType]
  [ResourceServerScopeType]
  [ResourceServerScopeType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The user pool ID for the user pool.
updateResourceServer_userPoolId :: Lens.Lens' UpdateResourceServer Prelude.Text
updateResourceServer_userPoolId :: (Text -> f Text) -> UpdateResourceServer -> f UpdateResourceServer
updateResourceServer_userPoolId = (UpdateResourceServer -> Text)
-> (UpdateResourceServer -> Text -> UpdateResourceServer)
-> Lens UpdateResourceServer UpdateResourceServer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceServer' {Text
userPoolId :: Text
$sel:userPoolId:UpdateResourceServer' :: UpdateResourceServer -> Text
userPoolId} -> Text
userPoolId) (\s :: UpdateResourceServer
s@UpdateResourceServer' {} Text
a -> UpdateResourceServer
s {$sel:userPoolId:UpdateResourceServer' :: Text
userPoolId = Text
a} :: UpdateResourceServer)

-- | The identifier for the resource server.
updateResourceServer_identifier :: Lens.Lens' UpdateResourceServer Prelude.Text
updateResourceServer_identifier :: (Text -> f Text) -> UpdateResourceServer -> f UpdateResourceServer
updateResourceServer_identifier = (UpdateResourceServer -> Text)
-> (UpdateResourceServer -> Text -> UpdateResourceServer)
-> Lens UpdateResourceServer UpdateResourceServer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceServer' {Text
identifier :: Text
$sel:identifier:UpdateResourceServer' :: UpdateResourceServer -> Text
identifier} -> Text
identifier) (\s :: UpdateResourceServer
s@UpdateResourceServer' {} Text
a -> UpdateResourceServer
s {$sel:identifier:UpdateResourceServer' :: Text
identifier = Text
a} :: UpdateResourceServer)

-- | The name of the resource server.
updateResourceServer_name :: Lens.Lens' UpdateResourceServer Prelude.Text
updateResourceServer_name :: (Text -> f Text) -> UpdateResourceServer -> f UpdateResourceServer
updateResourceServer_name = (UpdateResourceServer -> Text)
-> (UpdateResourceServer -> Text -> UpdateResourceServer)
-> Lens UpdateResourceServer UpdateResourceServer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceServer' {Text
name :: Text
$sel:name:UpdateResourceServer' :: UpdateResourceServer -> Text
name} -> Text
name) (\s :: UpdateResourceServer
s@UpdateResourceServer' {} Text
a -> UpdateResourceServer
s {$sel:name:UpdateResourceServer' :: Text
name = Text
a} :: UpdateResourceServer)

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

instance Prelude.Hashable UpdateResourceServer

instance Prelude.NFData UpdateResourceServer

instance Core.ToHeaders UpdateResourceServer where
  toHeaders :: UpdateResourceServer -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateResourceServer -> 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
"AWSCognitoIdentityProviderService.UpdateResourceServer" ::
                          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 UpdateResourceServer where
  toJSON :: UpdateResourceServer -> Value
toJSON UpdateResourceServer' {Maybe [ResourceServerScopeType]
Text
name :: Text
identifier :: Text
userPoolId :: Text
scopes :: Maybe [ResourceServerScopeType]
$sel:name:UpdateResourceServer' :: UpdateResourceServer -> Text
$sel:identifier:UpdateResourceServer' :: UpdateResourceServer -> Text
$sel:userPoolId:UpdateResourceServer' :: UpdateResourceServer -> Text
$sel:scopes:UpdateResourceServer' :: UpdateResourceServer -> Maybe [ResourceServerScopeType]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Scopes" Text -> [ResourceServerScopeType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ResourceServerScopeType] -> Pair)
-> Maybe [ResourceServerScopeType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceServerScopeType]
scopes,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"UserPoolId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
userPoolId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Identifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
identifier),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateResourceServerResponse' 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', 'updateResourceServerResponse_httpStatus' - The response's http status code.
--
-- 'resourceServer', 'updateResourceServerResponse_resourceServer' - The resource server.
newUpdateResourceServerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'resourceServer'
  ResourceServerType ->
  UpdateResourceServerResponse
newUpdateResourceServerResponse :: Int -> ResourceServerType -> UpdateResourceServerResponse
newUpdateResourceServerResponse
  Int
pHttpStatus_
  ResourceServerType
pResourceServer_ =
    UpdateResourceServerResponse' :: Int -> ResourceServerType -> UpdateResourceServerResponse
UpdateResourceServerResponse'
      { $sel:httpStatus:UpdateResourceServerResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:resourceServer:UpdateResourceServerResponse' :: ResourceServerType
resourceServer = ResourceServerType
pResourceServer_
      }

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

-- | The resource server.
updateResourceServerResponse_resourceServer :: Lens.Lens' UpdateResourceServerResponse ResourceServerType
updateResourceServerResponse_resourceServer :: (ResourceServerType -> f ResourceServerType)
-> UpdateResourceServerResponse -> f UpdateResourceServerResponse
updateResourceServerResponse_resourceServer = (UpdateResourceServerResponse -> ResourceServerType)
-> (UpdateResourceServerResponse
    -> ResourceServerType -> UpdateResourceServerResponse)
-> Lens
     UpdateResourceServerResponse
     UpdateResourceServerResponse
     ResourceServerType
     ResourceServerType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceServerResponse' {ResourceServerType
resourceServer :: ResourceServerType
$sel:resourceServer:UpdateResourceServerResponse' :: UpdateResourceServerResponse -> ResourceServerType
resourceServer} -> ResourceServerType
resourceServer) (\s :: UpdateResourceServerResponse
s@UpdateResourceServerResponse' {} ResourceServerType
a -> UpdateResourceServerResponse
s {$sel:resourceServer:UpdateResourceServerResponse' :: ResourceServerType
resourceServer = ResourceServerType
a} :: UpdateResourceServerResponse)

instance Prelude.NFData UpdateResourceServerResponse