| 235 | |
| 236 | # region info on metadata api |
| 237 | class Region(_DictMixin, BaseModel): |
| 238 | code: str |
| 239 | name: str |
| 240 | endpoint: str |
| 241 | |
| 242 | @property |
| 243 | def solver_api_endpoint(self) -> str: |
| 244 | return self.endpoint |
| 245 | |
| 246 | @property |
| 247 | def leap_api_endpoint(self) -> str: |
| 248 | # guess until metadata api includes leap endpoint in region data |
| 249 | from dwave.cloud.regions import _infer_leap_api_endpoint |
| 250 | return _infer_leap_api_endpoint(self.endpoint, self.code) |
| 251 | |
| 252 | |
| 253 | # LeapAPI types, provisional |
no outgoing calls