updateDecoderManifest method

Future<UpdateDecoderManifestResponse> updateDecoderManifest({
  1. required String name,
  2. DefaultForUnmappedSignalsType? defaultForUnmappedSignals,
  3. String? description,
  4. List<NetworkInterface>? networkInterfacesToAdd,
  5. List<String>? networkInterfacesToRemove,
  6. List<NetworkInterface>? networkInterfacesToUpdate,
  7. List<SignalDecoder>? signalDecodersToAdd,
  8. List<String>? signalDecodersToRemove,
  9. List<SignalDecoder>? signalDecodersToUpdate,
  10. ManifestStatus? status,
})

Updates a decoder manifest.

A decoder manifest can only be updated when the status is DRAFT. Only ACTIVE decoder manifests can be associated with vehicles.

May throw AccessDeniedException. May throw ConflictException. May throw DecoderManifestValidationException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter name : The name of the decoder manifest to update.

Parameter defaultForUnmappedSignals : Use default decoders for all unmapped signals in the model. You don't need to provide any detailed decoding information.

Parameter description : A brief description of the decoder manifest to update.

Parameter networkInterfacesToAdd : A list of information about the network interfaces to add to the decoder manifest.

Parameter networkInterfacesToRemove : A list of network interfaces to remove from the decoder manifest.

Parameter networkInterfacesToUpdate : A list of information about the network interfaces to update in the decoder manifest.

Parameter signalDecodersToAdd : A list of information about decoding additional signals to add to the decoder manifest.

Parameter signalDecodersToRemove : A list of signal decoders to remove from the decoder manifest.

Parameter signalDecodersToUpdate : A list of updated information about decoding signals to update in the decoder manifest.

Parameter status : The state of the decoder manifest. If the status is ACTIVE, the decoder manifest can't be edited. If the status is DRAFT, you can edit the decoder manifest.

Implementation

Future<UpdateDecoderManifestResponse> updateDecoderManifest({
  required String name,
  DefaultForUnmappedSignalsType? defaultForUnmappedSignals,
  String? description,
  List<NetworkInterface>? networkInterfacesToAdd,
  List<String>? networkInterfacesToRemove,
  List<NetworkInterface>? networkInterfacesToUpdate,
  List<SignalDecoder>? signalDecodersToAdd,
  List<String>? signalDecodersToRemove,
  List<SignalDecoder>? signalDecodersToUpdate,
  ManifestStatus? status,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'IoTAutobahnControlPlane.UpdateDecoderManifest'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'name': name,
      if (defaultForUnmappedSignals != null)
        'defaultForUnmappedSignals': defaultForUnmappedSignals.value,
      if (description != null) 'description': description,
      if (networkInterfacesToAdd != null)
        'networkInterfacesToAdd': networkInterfacesToAdd,
      if (networkInterfacesToRemove != null)
        'networkInterfacesToRemove': networkInterfacesToRemove,
      if (networkInterfacesToUpdate != null)
        'networkInterfacesToUpdate': networkInterfacesToUpdate,
      if (signalDecodersToAdd != null)
        'signalDecodersToAdd': signalDecodersToAdd,
      if (signalDecodersToRemove != null)
        'signalDecodersToRemove': signalDecodersToRemove,
      if (signalDecodersToUpdate != null)
        'signalDecodersToUpdate': signalDecodersToUpdate,
      if (status != null) 'status': status.value,
    },
  );

  return UpdateDecoderManifestResponse.fromJson(jsonResponse.body);
}