Map<String, dynamic> toJson() { final bytes = this.bytes; final s3Object = this.s3Object; return { if (bytes != null) 'Bytes': base64Encode(bytes), if (s3Object != null) 'S3Object': s3Object, }; }