Skip to content

Commit 18014a9

Browse files
committed
feat: update generated APIs
1 parent 39058d2 commit 18014a9

File tree

2 files changed

+94
-24
lines changed

2 files changed

+94
-24
lines changed

scaleway-async/scaleway_async/container/v1beta1/marshalling.py

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -839,8 +839,16 @@ def marshal_ContainerHealthCheckSpec(
839839
output.update(
840840
resolve_one_of(
841841
[
842-
OneOfPossibility("http", request.http),
843-
OneOfPossibility("tcp", request.tcp),
842+
OneOfPossibility(
843+
param="http",
844+
value=request.http,
845+
marshal_func=marshal_ContainerHealthCheckSpecHTTPProbe,
846+
),
847+
OneOfPossibility(
848+
param="tcp",
849+
value=request.tcp,
850+
marshal_func=marshal_ContainerHealthCheckSpecTCPProbe,
851+
),
844852
]
845853
),
846854
)
@@ -863,12 +871,19 @@ def marshal_ContainerScalingOption(
863871
resolve_one_of(
864872
[
865873
OneOfPossibility(
866-
"concurrent_requests_threshold",
867-
request.concurrent_requests_threshold,
874+
param="concurrent_requests_threshold",
875+
value=request.concurrent_requests_threshold,
876+
marshal_func=None,
868877
),
869-
OneOfPossibility("cpu_usage_threshold", request.cpu_usage_threshold),
870878
OneOfPossibility(
871-
"memory_usage_threshold", request.memory_usage_threshold
879+
param="cpu_usage_threshold",
880+
value=request.cpu_usage_threshold,
881+
marshal_func=None,
882+
),
883+
OneOfPossibility(
884+
param="memory_usage_threshold",
885+
value=request.memory_usage_threshold,
886+
marshal_func=None,
872887
),
873888
]
874889
),
@@ -1057,8 +1072,12 @@ def marshal_CreateTokenRequest(
10571072
output.update(
10581073
resolve_one_of(
10591074
[
1060-
OneOfPossibility("container_id", request.container_id),
1061-
OneOfPossibility("namespace_id", request.namespace_id),
1075+
OneOfPossibility(
1076+
param="container_id", value=request.container_id, marshal_func=None
1077+
),
1078+
OneOfPossibility(
1079+
param="namespace_id", value=request.namespace_id, marshal_func=None
1080+
),
10621081
]
10631082
),
10641083
)
@@ -1140,9 +1159,21 @@ def marshal_CreateTriggerRequest(
11401159
output.update(
11411160
resolve_one_of(
11421161
[
1143-
OneOfPossibility("scw_sqs_config", request.scw_sqs_config),
1144-
OneOfPossibility("scw_nats_config", request.scw_nats_config),
1145-
OneOfPossibility("sqs_config", request.sqs_config),
1162+
OneOfPossibility(
1163+
param="scw_sqs_config",
1164+
value=request.scw_sqs_config,
1165+
marshal_func=marshal_CreateTriggerRequestMnqSqsClientConfig,
1166+
),
1167+
OneOfPossibility(
1168+
param="scw_nats_config",
1169+
value=request.scw_nats_config,
1170+
marshal_func=marshal_CreateTriggerRequestMnqNatsClientConfig,
1171+
),
1172+
OneOfPossibility(
1173+
param="sqs_config",
1174+
value=request.sqs_config,
1175+
marshal_func=marshal_CreateTriggerRequestSqsClientConfig,
1176+
),
11461177
]
11471178
),
11481179
)
@@ -1312,7 +1343,11 @@ def marshal_UpdateTriggerRequest(
13121343
output.update(
13131344
resolve_one_of(
13141345
[
1315-
OneOfPossibility("sqs_config", request.sqs_config),
1346+
OneOfPossibility(
1347+
param="sqs_config",
1348+
value=request.sqs_config,
1349+
marshal_func=marshal_UpdateTriggerRequestSqsClientConfig,
1350+
),
13161351
]
13171352
),
13181353
)

scaleway/scaleway/container/v1beta1/marshalling.py

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -839,8 +839,16 @@ def marshal_ContainerHealthCheckSpec(
839839
output.update(
840840
resolve_one_of(
841841
[
842-
OneOfPossibility("http", request.http),
843-
OneOfPossibility("tcp", request.tcp),
842+
OneOfPossibility(
843+
param="http",
844+
value=request.http,
845+
marshal_func=marshal_ContainerHealthCheckSpecHTTPProbe,
846+
),
847+
OneOfPossibility(
848+
param="tcp",
849+
value=request.tcp,
850+
marshal_func=marshal_ContainerHealthCheckSpecTCPProbe,
851+
),
844852
]
845853
),
846854
)
@@ -863,12 +871,19 @@ def marshal_ContainerScalingOption(
863871
resolve_one_of(
864872
[
865873
OneOfPossibility(
866-
"concurrent_requests_threshold",
867-
request.concurrent_requests_threshold,
874+
param="concurrent_requests_threshold",
875+
value=request.concurrent_requests_threshold,
876+
marshal_func=None,
868877
),
869-
OneOfPossibility("cpu_usage_threshold", request.cpu_usage_threshold),
870878
OneOfPossibility(
871-
"memory_usage_threshold", request.memory_usage_threshold
879+
param="cpu_usage_threshold",
880+
value=request.cpu_usage_threshold,
881+
marshal_func=None,
882+
),
883+
OneOfPossibility(
884+
param="memory_usage_threshold",
885+
value=request.memory_usage_threshold,
886+
marshal_func=None,
872887
),
873888
]
874889
),
@@ -1057,8 +1072,12 @@ def marshal_CreateTokenRequest(
10571072
output.update(
10581073
resolve_one_of(
10591074
[
1060-
OneOfPossibility("container_id", request.container_id),
1061-
OneOfPossibility("namespace_id", request.namespace_id),
1075+
OneOfPossibility(
1076+
param="container_id", value=request.container_id, marshal_func=None
1077+
),
1078+
OneOfPossibility(
1079+
param="namespace_id", value=request.namespace_id, marshal_func=None
1080+
),
10621081
]
10631082
),
10641083
)
@@ -1140,9 +1159,21 @@ def marshal_CreateTriggerRequest(
11401159
output.update(
11411160
resolve_one_of(
11421161
[
1143-
OneOfPossibility("scw_sqs_config", request.scw_sqs_config),
1144-
OneOfPossibility("scw_nats_config", request.scw_nats_config),
1145-
OneOfPossibility("sqs_config", request.sqs_config),
1162+
OneOfPossibility(
1163+
param="scw_sqs_config",
1164+
value=request.scw_sqs_config,
1165+
marshal_func=marshal_CreateTriggerRequestMnqSqsClientConfig,
1166+
),
1167+
OneOfPossibility(
1168+
param="scw_nats_config",
1169+
value=request.scw_nats_config,
1170+
marshal_func=marshal_CreateTriggerRequestMnqNatsClientConfig,
1171+
),
1172+
OneOfPossibility(
1173+
param="sqs_config",
1174+
value=request.sqs_config,
1175+
marshal_func=marshal_CreateTriggerRequestSqsClientConfig,
1176+
),
11461177
]
11471178
),
11481179
)
@@ -1312,7 +1343,11 @@ def marshal_UpdateTriggerRequest(
13121343
output.update(
13131344
resolve_one_of(
13141345
[
1315-
OneOfPossibility("sqs_config", request.sqs_config),
1346+
OneOfPossibility(
1347+
param="sqs_config",
1348+
value=request.sqs_config,
1349+
marshal_func=marshal_UpdateTriggerRequestSqsClientConfig,
1350+
),
13161351
]
13171352
),
13181353
)

0 commit comments

Comments
 (0)