writeStorageObject method

  1. @override
Future<void> writeStorageObject({
  1. required Session session,
  2. String? collection,
  3. String? key,
  4. String? value,
  5. String? version,
  6. StorageWritePermission? writePermission,
  7. StorageReadPermission? readPermission,
})
override

Implementation

@override
Future<void> writeStorageObject({
  required model.Session session,
  String? collection,
  String? key,
  String? value,
  String? version,
  StorageWritePermission? writePermission,
  StorageReadPermission? readPermission,
}) async {
  await _client.writeStorageObjects(
    WriteStorageObjectsRequest(
      objects: [
        WriteStorageObject(
          collection: collection,
          key: key,
          value: value,
          version: version,
          permissionWrite: writePermission != null
              ? Int32Value(value: writePermission.index)
              : null,
          permissionRead: readPermission != null
              ? Int32Value(value: readPermission.index)
              : null,
        ),
      ],
    ),
    options: _getSessionCallOptions(session),
  );
}