toPolicySourceType method

PolicySourceType toPolicySourceType()

Implementation

PolicySourceType toPolicySourceType() {
  switch (this) {
    case 'user':
      return PolicySourceType.user;
    case 'group':
      return PolicySourceType.group;
    case 'role':
      return PolicySourceType.role;
    case 'aws-managed':
      return PolicySourceType.awsManaged;
    case 'user-managed':
      return PolicySourceType.userManaged;
    case 'resource':
      return PolicySourceType.resource;
    case 'none':
      return PolicySourceType.none;
  }
  throw Exception('$this is not known in enum PolicySourceType');
}