updateRoleSetWithHttpInfo method

Future<Response> updateRoleSetWithHttpInfo(
  1. String roleSetKeyOrId,
  2. UpdateRoleSetRequest updateRoleSetRequest
)

Update a role set

Updates an existing role set. You can update the name, key, description, type, default role, or creator role. All parameters are optional - you can update only the fields you want to change.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<http.Response> updateRoleSetWithHttpInfo(
  String roleSetKeyOrId,
  UpdateRoleSetRequest updateRoleSetRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/role_sets/{role_set_key_or_id}'
      .replaceAll('{role_set_key_or_id}', roleSetKeyOrId);

  // ignore: prefer_final_locals
  Object? postBody = updateRoleSetRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'PATCH',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}