Skip to content

Commit 3abbc79

Browse files
feat: update generated APIs (#274)
Co-authored-by: Nathanael DEMACON <[email protected]>
1 parent 4e57d87 commit 3abbc79

File tree

57 files changed

+738
-540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+738
-540
lines changed

scaleway-async/scaleway_async/account/v2/types.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
from enum import Enum
88
from typing import List, Optional
99

10+
from scaleway_core.utils import (
11+
StrEnumMeta,
12+
)
1013

11-
class ListProjectsRequestOrderBy(str, Enum):
14+
15+
class ListProjectsRequestOrderBy(Enum, metaclass=StrEnumMeta):
1216
CREATED_AT_ASC = "created_at_asc"
1317
CREATED_AT_DESC = "created_at_desc"
1418
NAME_ASC = "name_asc"

scaleway-async/scaleway_async/account/v3/types.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
from enum import Enum
88
from typing import List, Optional
99

10+
from scaleway_core.utils import (
11+
StrEnumMeta,
12+
)
1013

11-
class ListProjectsRequestOrderBy(str, Enum):
14+
15+
class ListProjectsRequestOrderBy(Enum, metaclass=StrEnumMeta):
1216
CREATED_AT_ASC = "created_at_asc"
1317
CREATED_AT_DESC = "created_at_desc"
1418
NAME_ASC = "name_asc"

scaleway-async/scaleway_async/applesilicon/v1alpha1/types.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,20 @@
1010
from scaleway_core.bridge import (
1111
Zone,
1212
)
13+
from scaleway_core.utils import (
14+
StrEnumMeta,
15+
)
1316

1417

15-
class ListServersRequestOrderBy(str, Enum):
18+
class ListServersRequestOrderBy(Enum, metaclass=StrEnumMeta):
1619
CREATED_AT_ASC = "created_at_asc"
1720
CREATED_AT_DESC = "created_at_desc"
1821

1922
def __str__(self) -> str:
2023
return str(self.value)
2124

2225

23-
class ServerStatus(str, Enum):
26+
class ServerStatus(Enum, metaclass=StrEnumMeta):
2427
UNKNOWN_STATUS = "unknown_status"
2528
STARTING = "starting"
2629
READY = "ready"
@@ -36,7 +39,7 @@ def __str__(self) -> str:
3639
return str(self.value)
3740

3841

39-
class ServerTypeStock(str, Enum):
42+
class ServerTypeStock(Enum, metaclass=StrEnumMeta):
4043
UNKNOWN_STOCK = "unknown_stock"
4144
NO_STOCK = "no_stock"
4245
LOW_STOCK = "low_stock"

scaleway-async/scaleway_async/baremetal/v1/types.py

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@
1212
TimeSeries,
1313
Zone,
1414
)
15+
from scaleway_core.utils import (
16+
StrEnumMeta,
17+
)
1518

1619

17-
class IPReverseStatus(str, Enum):
20+
class IPReverseStatus(Enum, metaclass=StrEnumMeta):
1821
UNKNOWN = "unknown"
1922
PENDING = "pending"
2023
ACTIVE = "active"
@@ -24,23 +27,23 @@ def __str__(self) -> str:
2427
return str(self.value)
2528

2629

27-
class IPVersion(str, Enum):
30+
class IPVersion(Enum, metaclass=StrEnumMeta):
2831
IPV4 = "IPv4"
2932
IPV6 = "IPv6"
3033

3134
def __str__(self) -> str:
3235
return str(self.value)
3336

3437

35-
class ListServerEventsRequestOrderBy(str, Enum):
38+
class ListServerEventsRequestOrderBy(Enum, metaclass=StrEnumMeta):
3639
CREATED_AT_ASC = "created_at_asc"
3740
CREATED_AT_DESC = "created_at_desc"
3841

3942
def __str__(self) -> str:
4043
return str(self.value)
4144

4245

43-
class ListServerPrivateNetworksRequestOrderBy(str, Enum):
46+
class ListServerPrivateNetworksRequestOrderBy(Enum, metaclass=StrEnumMeta):
4447
CREATED_AT_ASC = "created_at_asc"
4548
CREATED_AT_DESC = "created_at_desc"
4649
UPDATED_AT_ASC = "updated_at_asc"
@@ -50,23 +53,23 @@ def __str__(self) -> str:
5053
return str(self.value)
5154

5255

53-
class ListServersRequestOrderBy(str, Enum):
56+
class ListServersRequestOrderBy(Enum, metaclass=StrEnumMeta):
5457
CREATED_AT_ASC = "created_at_asc"
5558
CREATED_AT_DESC = "created_at_desc"
5659

5760
def __str__(self) -> str:
5861
return str(self.value)
5962

6063

61-
class ListSettingsRequestOrderBy(str, Enum):
64+
class ListSettingsRequestOrderBy(Enum, metaclass=StrEnumMeta):
6265
CREATED_AT_ASC = "created_at_asc"
6366
CREATED_AT_DESC = "created_at_desc"
6467

6568
def __str__(self) -> str:
6669
return str(self.value)
6770

6871

69-
class OfferStock(str, Enum):
72+
class OfferStock(Enum, metaclass=StrEnumMeta):
7073
EMPTY = "empty"
7174
LOW = "low"
7275
AVAILABLE = "available"
@@ -75,7 +78,7 @@ def __str__(self) -> str:
7578
return str(self.value)
7679

7780

78-
class OfferSubscriptionPeriod(str, Enum):
81+
class OfferSubscriptionPeriod(Enum, metaclass=StrEnumMeta):
7982
UNKNOWN_SUBSCRIPTION_PERIOD = "unknown_subscription_period"
8083
HOURLY = "hourly"
8184
MONTHLY = "monthly"
@@ -84,7 +87,7 @@ def __str__(self) -> str:
8487
return str(self.value)
8588

8689

87-
class ServerBootType(str, Enum):
90+
class ServerBootType(Enum, metaclass=StrEnumMeta):
8891
UNKNOWN_BOOT_TYPE = "unknown_boot_type"
8992
NORMAL = "normal"
9093
RESCUE = "rescue"
@@ -93,7 +96,7 @@ def __str__(self) -> str:
9396
return str(self.value)
9497

9598

96-
class ServerInstallStatus(str, Enum):
99+
class ServerInstallStatus(Enum, metaclass=StrEnumMeta):
97100
UNKNOWN = "unknown"
98101
TO_INSTALL = "to_install"
99102
INSTALLING = "installing"
@@ -104,7 +107,7 @@ def __str__(self) -> str:
104107
return str(self.value)
105108

106109

107-
class ServerOptionOptionStatus(str, Enum):
110+
class ServerOptionOptionStatus(Enum, metaclass=StrEnumMeta):
108111
OPTION_STATUS_UNKNOWN = "option_status_unknown"
109112
OPTION_STATUS_ENABLE = "option_status_enable"
110113
OPTION_STATUS_ENABLING = "option_status_enabling"
@@ -115,7 +118,7 @@ def __str__(self) -> str:
115118
return str(self.value)
116119

117120

118-
class ServerPingStatus(str, Enum):
121+
class ServerPingStatus(Enum, metaclass=StrEnumMeta):
119122
PING_STATUS_UNKNOWN = "ping_status_unknown"
120123
PING_STATUS_UP = "ping_status_up"
121124
PING_STATUS_DOWN = "ping_status_down"
@@ -124,7 +127,7 @@ def __str__(self) -> str:
124127
return str(self.value)
125128

126129

127-
class ServerPrivateNetworkStatus(str, Enum):
130+
class ServerPrivateNetworkStatus(Enum, metaclass=StrEnumMeta):
128131
UNKNOWN = "unknown"
129132
ATTACHING = "attaching"
130133
ATTACHED = "attached"
@@ -136,7 +139,7 @@ def __str__(self) -> str:
136139
return str(self.value)
137140

138141

139-
class ServerStatus(str, Enum):
142+
class ServerStatus(Enum, metaclass=StrEnumMeta):
140143
UNKNOWN = "unknown"
141144
DELIVERING = "delivering"
142145
READY = "ready"
@@ -154,7 +157,7 @@ def __str__(self) -> str:
154157
return str(self.value)
155158

156159

157-
class SettingType(str, Enum):
160+
class SettingType(Enum, metaclass=StrEnumMeta):
158161
UNKNOWN = "unknown"
159162
SMTP = "smtp"
160163

scaleway-async/scaleway_async/billing/v2alpha1/types.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@
1010
from scaleway_core.bridge import (
1111
Money,
1212
)
13+
from scaleway_core.utils import (
14+
StrEnumMeta,
15+
)
1316

1417

15-
class DownloadInvoiceRequestFileType(str, Enum):
18+
class DownloadInvoiceRequestFileType(Enum, metaclass=StrEnumMeta):
1619
PDF = "pdf"
1720

1821
def __str__(self) -> str:
1922
return str(self.value)
2023

2124

22-
class InvoiceType(str, Enum):
25+
class InvoiceType(Enum, metaclass=StrEnumMeta):
2326
UNKNOWN_TYPE = "unknown_type"
2427
PERIODIC = "periodic"
2528
PURCHASE = "purchase"
@@ -28,7 +31,7 @@ def __str__(self) -> str:
2831
return str(self.value)
2932

3033

31-
class ListInvoicesRequestOrderBy(str, Enum):
34+
class ListInvoicesRequestOrderBy(Enum, metaclass=StrEnumMeta):
3235
INVOICE_NUMBER_DESC = "invoice_number_desc"
3336
INVOICE_NUMBER_ASC = "invoice_number_asc"
3437
START_DATE_DESC = "start_date_desc"

scaleway-async/scaleway_async/cockpit/v1beta1/types.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
from scaleway_core.bridge import (
1111
TimeSeries,
1212
)
13+
from scaleway_core.utils import (
14+
StrEnumMeta,
15+
)
1316

1417

15-
class CockpitStatus(str, Enum):
18+
class CockpitStatus(Enum, metaclass=StrEnumMeta):
1619
UNKNOWN_STATUS = "unknown_status"
1720
CREATING = "creating"
1821
READY = "ready"
@@ -24,7 +27,7 @@ def __str__(self) -> str:
2427
return str(self.value)
2528

2629

27-
class GrafanaUserRole(str, Enum):
30+
class GrafanaUserRole(Enum, metaclass=StrEnumMeta):
2831
UNKNOWN_ROLE = "unknown_role"
2932
EDITOR = "editor"
3033
VIEWER = "viewer"
@@ -33,23 +36,23 @@ def __str__(self) -> str:
3336
return str(self.value)
3437

3538

36-
class ListGrafanaUsersRequestOrderBy(str, Enum):
39+
class ListGrafanaUsersRequestOrderBy(Enum, metaclass=StrEnumMeta):
3740
LOGIN_ASC = "login_asc"
3841
LOGIN_DESC = "login_desc"
3942

4043
def __str__(self) -> str:
4144
return str(self.value)
4245

4346

44-
class ListPlansRequestOrderBy(str, Enum):
47+
class ListPlansRequestOrderBy(Enum, metaclass=StrEnumMeta):
4548
NAME_ASC = "name_asc"
4649
NAME_DESC = "name_desc"
4750

4851
def __str__(self) -> str:
4952
return str(self.value)
5053

5154

52-
class ListTokensRequestOrderBy(str, Enum):
55+
class ListTokensRequestOrderBy(Enum, metaclass=StrEnumMeta):
5356
CREATED_AT_ASC = "created_at_asc"
5457
CREATED_AT_DESC = "created_at_desc"
5558
NAME_ASC = "name_asc"
@@ -59,7 +62,7 @@ def __str__(self) -> str:
5962
return str(self.value)
6063

6164

62-
class PlanName(str, Enum):
65+
class PlanName(Enum, metaclass=StrEnumMeta):
6366
UNKNOWN_NAME = "unknown_name"
6467
FREE = "free"
6568
PREMIUM = "premium"

0 commit comments

Comments
 (0)