Serializes this instance to a JSON object.
Map<String, dynamic> toJson() => { 'operationType': type.name, 'partitionKey': jsonEncode(partitionKey?.values), };