toProtectedResourceType method

ProtectedResourceType toProtectedResourceType()

Implementation

ProtectedResourceType toProtectedResourceType() {
  switch (this) {
    case 'CLOUDFRONT_DISTRIBUTION':
      return ProtectedResourceType.cloudfrontDistribution;
    case 'ROUTE_53_HOSTED_ZONE':
      return ProtectedResourceType.route_53HostedZone;
    case 'ELASTIC_IP_ALLOCATION':
      return ProtectedResourceType.elasticIpAllocation;
    case 'CLASSIC_LOAD_BALANCER':
      return ProtectedResourceType.classicLoadBalancer;
    case 'APPLICATION_LOAD_BALANCER':
      return ProtectedResourceType.applicationLoadBalancer;
    case 'GLOBAL_ACCELERATOR':
      return ProtectedResourceType.globalAccelerator;
  }
  throw Exception('$this is not known in enum ProtectedResourceType');
}