updatePreset method

Future<UpdatePresetResponse> updatePreset({
  1. required String name,
  2. String? category,
  3. String? description,
  4. PresetSettings? settings,
})

Modify one of your existing presets.

May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw TooManyRequestsException. May throw ConflictException.

Parameter name : The name of the preset you are modifying.

Parameter category : The new category for the preset, if you are changing it.

Parameter description : The new description for the preset, if you are changing it.

Parameter settings : Settings for preset

Implementation

Future<UpdatePresetResponse> updatePreset({
  required String name,
  String? category,
  String? description,
  PresetSettings? settings,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  final $payload = <String, dynamic>{
    if (category != null) 'category': category,
    if (description != null) 'description': description,
    if (settings != null) 'settings': settings,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/2017-08-29/presets/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdatePresetResponse.fromJson(response);
}