toBucketLocationConstraint method

BucketLocationConstraint toBucketLocationConstraint()

Implementation

BucketLocationConstraint toBucketLocationConstraint() {
  switch (this) {
    case 'EU':
      return BucketLocationConstraint.eu;
    case 'eu-west-1':
      return BucketLocationConstraint.euWest_1;
    case 'us-west-1':
      return BucketLocationConstraint.usWest_1;
    case 'us-west-2':
      return BucketLocationConstraint.usWest_2;
    case 'ap-south-1':
      return BucketLocationConstraint.apSouth_1;
    case 'ap-southeast-1':
      return BucketLocationConstraint.apSoutheast_1;
    case 'ap-southeast-2':
      return BucketLocationConstraint.apSoutheast_2;
    case 'ap-northeast-1':
      return BucketLocationConstraint.apNortheast_1;
    case 'sa-east-1':
      return BucketLocationConstraint.saEast_1;
    case 'cn-north-1':
      return BucketLocationConstraint.cnNorth_1;
    case 'eu-central-1':
      return BucketLocationConstraint.euCentral_1;
  }
  throw Exception('$this is not known in enum BucketLocationConstraint');
}