S3CopyObjectOperation.fromXml constructor

S3CopyObjectOperation.fromXml(
  1. XmlElement elem
)

Implementation

factory S3CopyObjectOperation.fromXml(_s.XmlElement elem) {
  return S3CopyObjectOperation(
    accessControlGrants: _s.extractXmlChild(elem, 'AccessControlGrants')?.let(
        (elem) => elem
            .findElements('member')
            .map((c) => S3Grant.fromXml(c))
            .toList()),
    cannedAccessControlList: _s
        .extractXmlStringValue(elem, 'CannedAccessControlList')
        ?.toS3CannedAccessControlList(),
    metadataDirective: _s
        .extractXmlStringValue(elem, 'MetadataDirective')
        ?.toS3MetadataDirective(),
    modifiedSinceConstraint:
        _s.extractXmlDateTimeValue(elem, 'ModifiedSinceConstraint'),
    newObjectMetadata: _s
        .extractXmlChild(elem, 'NewObjectMetadata')
        ?.let((e) => S3ObjectMetadata.fromXml(e)),
    newObjectTagging: _s.extractXmlChild(elem, 'NewObjectTagging')?.let(
        (elem) => elem
            .findElements('member')
            .map((c) => S3Tag.fromXml(c))
            .toList()),
    objectLockLegalHoldStatus: _s
        .extractXmlStringValue(elem, 'ObjectLockLegalHoldStatus')
        ?.toS3ObjectLockLegalHoldStatus(),
    objectLockMode: _s
        .extractXmlStringValue(elem, 'ObjectLockMode')
        ?.toS3ObjectLockMode(),
    objectLockRetainUntilDate:
        _s.extractXmlDateTimeValue(elem, 'ObjectLockRetainUntilDate'),
    redirectLocation: _s.extractXmlStringValue(elem, 'RedirectLocation'),
    requesterPays: _s.extractXmlBoolValue(elem, 'RequesterPays'),
    sSEAwsKmsKeyId: _s.extractXmlStringValue(elem, 'SSEAwsKmsKeyId'),
    storageClass:
        _s.extractXmlStringValue(elem, 'StorageClass')?.toS3StorageClass(),
    targetKeyPrefix: _s.extractXmlStringValue(elem, 'TargetKeyPrefix'),
    targetResource: _s.extractXmlStringValue(elem, 'TargetResource'),
    unModifiedSinceConstraint:
        _s.extractXmlDateTimeValue(elem, 'UnModifiedSinceConstraint'),
  );
}