S3Location.fromJson constructor
S3Location.fromJson(
- Map<String, dynamic> json
)
Implementation
factory S3Location.fromJson(Map<String, dynamic> json) {
return S3Location(
accessControlList: (json['AccessControlList'] as List?)
?.whereNotNull()
.map((e) => Grant.fromJson(e as Map<String, dynamic>))
.toList(),
bucketName: json['BucketName'] as String?,
cannedACL: (json['CannedACL'] as String?)?.toCannedACL(),
encryption: json['Encryption'] != null
? Encryption.fromJson(json['Encryption'] as Map<String, dynamic>)
: null,
prefix: json['Prefix'] as String?,
storageClass: (json['StorageClass'] as String?)?.toStorageClass(),
tagging: (json['Tagging'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
userMetadata: (json['UserMetadata'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
);
}