modifyOptionGroup method

Future<ModifyOptionGroupResult> modifyOptionGroup({
  1. required String optionGroupName,
  2. bool? applyImmediately,
  3. List<OptionConfiguration>? optionsToInclude,
  4. List<String>? optionsToRemove,
})

Implementation

Future<ModifyOptionGroupResult> modifyOptionGroup({
  required String optionGroupName,
  bool? applyImmediately,
  List<OptionConfiguration>? optionsToInclude,
  List<String>? optionsToRemove,
}) async {
  ArgumentError.checkNotNull(optionGroupName, 'optionGroupName');
  final $request = <String, dynamic>{};
  $request['OptionGroupName'] = optionGroupName;
  applyImmediately?.also((arg) => $request['ApplyImmediately'] = arg);
  optionsToInclude?.also((arg) => $request['OptionsToInclude'] = arg);
  optionsToRemove?.also((arg) => $request['OptionsToRemove'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'ModifyOptionGroup',
    version: '2013-02-12',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ModifyOptionGroupMessage'],
    shapes: shapes,
    resultWrapper: 'ModifyOptionGroupResult',
  );
  return ModifyOptionGroupResult.fromXml($result);
}