updateNetworkSettings method

Future<UpdateNetworkSettingsResponse> updateNetworkSettings({
  1. required String networkId,
  2. required NetworkSettings settings,
})

Updates network-level settings for a Wickr network. You can modify settings such as client metrics, data retention, and other network-wide options.

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

Parameter networkId : The ID of the Wickr network whose settings will be updated.

Parameter settings : A map of setting names to their new values. Each setting should be provided with its appropriate type (boolean, string, number, etc.).

Implementation

Future<UpdateNetworkSettingsResponse> updateNetworkSettings({
  required String networkId,
  required NetworkSettings settings,
}) async {
  final $payload = <String, dynamic>{
    'settings': settings,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/networks/${Uri.encodeComponent(networkId)}/settings',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateNetworkSettingsResponse.fromJson(response);
}