20 #include "awsregion.h" 
   21 #include "awsregion_p.h" 
  110     return (
region() != AwsRegion::InvalidRegion);
 
  123     return name(static_cast<AwsRegion::Region>(d->region));
 
  136         case AP_Northeast_1: 
return QLatin1String(
"ap-northeast-1");
 
  137         case AP_Southeast_1: 
return QLatin1String(
"ap-southeast-1");
 
  138         case AP_Southeast_2: 
return QLatin1String(
"ap-southeast-2");
 
  139         case EU_West_1:      
return QLatin1String(
"eu-west-1");
 
  140         case SA_East_1:      
return QLatin1String(
"sa-east-1");
 
  141         case US_East_1:      
return QLatin1String(
"us-east-1");
 
  142         case US_Gov_West_1:  
return QLatin1String(
"us-gov-west-1");
 
  143         case US_West_1:      
return QLatin1String(
"us-west-1");
 
  144         case US_West_2:      
return QLatin1String(
"us-west-2");
 
  146             Q_ASSERT_X(
false, Q_FUNC_INFO, qPrintable(QString::fromLatin1(
"invalid region: %1").arg(region)));
 
  193         case AP_Northeast_1: 
return QLatin1String(
"Asia Pacific (Tokyo) Region");
 
  194         case AP_Southeast_1: 
return QLatin1String(
"Asia Pacific (Singapore) Region");
 
  195         case AP_Southeast_2: 
return QLatin1String(
"Asia Pacific (Sydney) Region");
 
  196         case EU_West_1:      
return QLatin1String(
"EU (Ireland) Region");
 
  197         case SA_East_1:      
return QLatin1String(
"São Paulo Region");
 
  198         case US_East_1:      
return QLatin1String(
"US East (Northern Virginia) Region");
 
  199         case US_Gov_West_1:  
return QLatin1String(
"AWS GovCloud (US) Region");
 
  200         case US_West_1:      
return QLatin1String(
"US West (Northern California) Region");
 
  201         case US_West_2:      
return QLatin1String(
"US West (Oregon) Region");
 
  203             Q_ASSERT_X(
false, Q_FUNC_INFO, qPrintable(QString::fromLatin1(
"invalid region: %1").arg(region)));
 
  262     const QString lowerName(regionName.toLower());
 
  263     if (lowerName == QLatin1String(
"ap-northeast-1")) 
return AP_Northeast_1;
 
  264     if (lowerName == QLatin1String(
"ap-southeast-1")) 
return AP_Southeast_1;
 
  265     if (lowerName == QLatin1String(
"ap-southeast-2")) 
return AP_Southeast_2;
 
  266     if (lowerName == QLatin1String(
"eu-west-1"))      
return EU_West_1;
 
  267     if (lowerName == QLatin1String(
"sa-east-1"))      
return SA_East_1;
 
  268     if (lowerName == QLatin1String(
"us-east-1"))      
return US_East_1;
 
  269     if (lowerName == QLatin1String(
"us-gov-west-1"))  
return US_Gov_West_1;
 
  270     if (lowerName == QLatin1String(
"us-west-1"))      
return US_West_1;
 
  271     if (lowerName == QLatin1String(
"us-west-2"))      
return US_West_2;
 
  272     Q_ASSERT_X(
false, Q_FUNC_INFO, qPrintable(QString::fromLatin1(
"invalid region name: %1").arg(regionName)));
 
  273     return InvalidRegion;
 
Private implementation for AwsRegion. 
QString hostName(const QString &serviceName) const 
Get name of the host the supports a given service for this region. 
QStringList supportedServices(const AwsEndpoint::Transports transports=AwsEndpoint::AnyTransport) const 
Get a list of services supported by this region. 
bool isSupported(const QString &serviceName, const AwsEndpoint::Transports transports=AwsEndpoint::AnyTransport) const 
Is a given service supported for this region? 
static QStringList supportedServices(const QString ®ionName, const Transports transport=AnyTransport)
Get a list of services that support a given region. 
QString name() const 
Get the canonical AWS name for this region. 
QString fullName() const 
Get the full name for this region. 
Region region() const 
Get the region this object represents. 
Provides AWS region information. 
static bool isSupported(const QString ®ionName, const QString &serviceName, const Transports transport=AnyTransport)
Is a region / service / transport combination supported by Amazon? 
~AwsRegion()
AwsRegion destructor. 
static QUrl getEndpoint(const QString ®ionName, const QString &serviceName, const Transports transport=AnyTransport)
Get a QUrl for an AWS endpoint. 
bool isValid() const 
Is this AWS region object valid? 
AwsRegion(const Region region)
Constructs a new AwsRegion object. 
AwsRegionPrivate(AwsRegion *const q)
Constructs a new AwsRegionPrivate object. 
AwsRegionPrivate *const d_ptr
Internal d-pointer. 
static Region fromName(const QString ®ionName)
Get an AwsRegion::Region enumeration value from a region name.