factory S3Resource.fromJson(Map<String, dynamic> json) { return S3Resource( bucketName: json['bucketName'] as String, prefix: json['prefix'] as String?, ); }