toObjectCannedACL method

ObjectCannedACL toObjectCannedACL()

Implementation

ObjectCannedACL toObjectCannedACL() {
  switch (this) {
    case 'private':
      return ObjectCannedACL.private;
    case 'public-read':
      return ObjectCannedACL.publicRead;
    case 'public-read-write':
      return ObjectCannedACL.publicReadWrite;
    case 'authenticated-read':
      return ObjectCannedACL.authenticatedRead;
    case 'aws-exec-read':
      return ObjectCannedACL.awsExecRead;
    case 'bucket-owner-read':
      return ObjectCannedACL.bucketOwnerRead;
    case 'bucket-owner-full-control':
      return ObjectCannedACL.bucketOwnerFullControl;
  }
  throw Exception('$this is not known in enum ObjectCannedACL');
}