         self.useTLS = true
     }
     
+    /// encodes the name (see RegionName, does not support custom hosts)
     public func encode(to encoder: Encoder) throws {
         var container = encoder.singleValueContainer()
         try container.encode(self.name.rawValue)

        self.init(name: name)
    }
    
    static var usEast1: Region { return Region(name: RegionName.usEast1) }
    static var usEast2: Region { return Region(name: RegionName.usEast2) }
    static var usWest1: Region { return Region(name: RegionName.usWest1) }
    static var usWest2: Region { return Region(name: RegionName.usWest2) }
    static var caCentral1: Region { return Region(name: RegionName.caCentral1) }
    static var euCentral1: Region { return Region(name: RegionName.euCentral1) }
    static var euWest1: Region { return Region(name: RegionName.euWest1) }
    static var euWest2: Region { return Region(name: RegionName.euWest2) }
    static var euWest3: Region { return Region(name: RegionName.euWest3) }
    static var apNortheast1: Region { return Region(name: RegionName.apNortheast1) }
    static var apNortheast2: Region { return Region(name: RegionName.apNortheast2) }
    static var apNortheast3: Region { return Region(name: RegionName.apNortheast3) }
    static var apSoutheast1: Region { return Region(name: RegionName.apSoutheast1) }
    static var apSoutheast2: Region { return Region(name: RegionName.apSoutheast2) }
    static var apSouth1: Region { return Region(name: RegionName.apSouth1) }
    static var saEast1: Region { return Region(name: RegionName.saEast1) }
}

extension Region: Codable {
    public init(from decoder: Decoder) throws {
        let container = try decoder.singleValueContainer()
        

    }
}

extension Region {
    public init?(rawValue: String) {
        guard let name = RegionName(rawValue: rawValue) else {
            return nil
        }
