updateDataRetention method

Future<UpdateDataRetentionResponse> updateDataRetention({
  1. required DataRetentionActionType actionType,
  2. required String networkId,
})

Updates the data retention bot settings, allowing you to enable or disable the data retention service, or acknowledge the public key message.

May throw BadRequestError. May throw ForbiddenError. May throw InternalServerError. May throw RateLimitError. May throw ResourceNotFoundError. May throw UnauthorizedError. May throw ValidationError.

Parameter actionType : The action to perform. Valid values are 'ENABLE' (to enable the data retention service), 'DISABLE' (to disable the service), or 'PUBKEY_MSG_ACK' (to acknowledge the public key message).

Parameter networkId : The ID of the Wickr network containing the data retention bot.

Implementation

Future<UpdateDataRetentionResponse> updateDataRetention({
  required DataRetentionActionType actionType,
  required String networkId,
}) async {
  final $payload = <String, dynamic>{
    'actionType': actionType.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/networks/${Uri.encodeComponent(networkId)}/data-retention-bots',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateDataRetentionResponse.fromJson(response);
}