updateApplication method

Future<Application> updateApplication({
  1. required String applicationId,
  2. String? description,
  3. String? name,
})

Updates an application.

May throw BadRequestException. May throw ResourceNotFoundException. May throw InternalServerException.

Parameter applicationId : The application ID.

Parameter description : A description of the application.

Parameter name : The name of the application.

Implementation

Future<Application> updateApplication({
  required String applicationId,
  String? description,
  String? name,
}) async {
  ArgumentError.checkNotNull(applicationId, 'applicationId');
  _s.validateStringLength(
    'description',
    description,
    0,
    1024,
  );
  _s.validateStringLength(
    'name',
    name,
    1,
    64,
  );
  final $payload = <String, dynamic>{
    if (description != null) 'Description': description,
    if (name != null) 'Name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/applications/${Uri.encodeComponent(applicationId)}',
    exceptionFnMap: _exceptionFns,
  );
  return Application.fromJson(response);
}