File tree 4 files changed +47
-6
lines changed
scaleway/scaleway/webhosting/v1alpha1
scaleway-async/scaleway_async/webhosting/v1alpha1 4 files changed +47
-6
lines changed Original file line number Diff line number Diff line change 17
17
HostingStatus ,
18
18
ListHostingsRequestOrderBy ,
19
19
ListOffersRequestOrderBy ,
20
+ CheckUserOwnsDomainRequest ,
20
21
CheckUserOwnsDomainResponse ,
21
22
ControlPanel ,
22
23
CreateHostingRequest ,
42
43
unmarshal_ListOffersResponse ,
43
44
unmarshal_ResetHostingPasswordResponse ,
44
45
unmarshal_Session ,
46
+ marshal_CheckUserOwnsDomainRequest ,
45
47
marshal_CreateHostingRequest ,
46
48
marshal_UpdateHostingRequest ,
47
49
)
@@ -489,9 +491,14 @@ async def check_user_owns_domain(
489
491
res = self ._request (
490
492
"POST" ,
491
493
f"/webhosting/v1/regions/{ param_region } /domains/{ param_domain } /check-ownership" ,
492
- params = {
493
- "project_id" : project_id or self .client .default_project_id ,
494
- },
494
+ body = marshal_CheckUserOwnsDomainRequest (
495
+ CheckUserOwnsDomainRequest (
496
+ domain = domain ,
497
+ region = region ,
498
+ project_id = project_id ,
499
+ ),
500
+ self .client ,
501
+ ),
495
502
)
496
503
497
504
self ._throw_on_error (res )
Original file line number Diff line number Diff line change 25
25
ListOffersResponse ,
26
26
ResetHostingPasswordResponse ,
27
27
Session ,
28
+ CheckUserOwnsDomainRequest ,
28
29
CreateHostingRequestDomainConfiguration ,
29
30
CreateHostingRequest ,
30
31
UpdateHostingRequest ,
@@ -509,6 +510,18 @@ def unmarshal_Session(data: Any) -> Session:
509
510
return Session (** args )
510
511
511
512
513
+ def marshal_CheckUserOwnsDomainRequest (
514
+ request : CheckUserOwnsDomainRequest ,
515
+ defaults : ProfileDefaults ,
516
+ ) -> Dict [str , Any ]:
517
+ output : Dict [str , Any ] = {}
518
+
519
+ if request .project_id is not None :
520
+ output ["project_id" ] = request .project_id or defaults .default_project_id
521
+
522
+ return output
523
+
524
+
512
525
def marshal_CreateHostingRequestDomainConfiguration (
513
526
request : CreateHostingRequestDomainConfiguration ,
514
527
defaults : ProfileDefaults ,
Original file line number Diff line number Diff line change 17
17
HostingStatus ,
18
18
ListHostingsRequestOrderBy ,
19
19
ListOffersRequestOrderBy ,
20
+ CheckUserOwnsDomainRequest ,
20
21
CheckUserOwnsDomainResponse ,
21
22
ControlPanel ,
22
23
CreateHostingRequest ,
42
43
unmarshal_ListOffersResponse ,
43
44
unmarshal_ResetHostingPasswordResponse ,
44
45
unmarshal_Session ,
46
+ marshal_CheckUserOwnsDomainRequest ,
45
47
marshal_CreateHostingRequest ,
46
48
marshal_UpdateHostingRequest ,
47
49
)
@@ -489,9 +491,15 @@ def check_user_owns_domain(
489
491
res = self ._request (
490
492
"POST" ,
491
493
f"/webhosting/v1/regions/{ param_region } /domains/{ param_domain } /check-ownership" ,
492
- params = {
493
- "project_id" : project_id or self .client .default_project_id ,
494
- },
494
+ body = marshal_CheckUserOwnsDomainRequest (
495
+ CheckUserOwnsDomainRequest (
496
+ domain = domain ,
497
+ region = region ,
498
+ project_id = project_id ,
499
+ ),
500
+ self .client ,
501
+ ),
502
+
495
503
)
496
504
497
505
self ._throw_on_error (res )
Original file line number Diff line number Diff line change 25
25
ListOffersResponse ,
26
26
ResetHostingPasswordResponse ,
27
27
Session ,
28
+ CheckUserOwnsDomainRequest ,
28
29
CreateHostingRequestDomainConfiguration ,
29
30
CreateHostingRequest ,
30
31
UpdateHostingRequest ,
@@ -509,6 +510,18 @@ def unmarshal_Session(data: Any) -> Session:
509
510
return Session (** args )
510
511
511
512
513
+ def marshal_CheckUserOwnsDomainRequest (
514
+ request : CheckUserOwnsDomainRequest ,
515
+ defaults : ProfileDefaults ,
516
+ ) -> Dict [str , Any ]:
517
+ output : Dict [str , Any ] = {}
518
+
519
+ if request .project_id is not None :
520
+ output ["project_id" ] = request .project_id or defaults .default_project_id
521
+
522
+ return output
523
+
524
+
512
525
def marshal_CreateHostingRequestDomainConfiguration (
513
526
request : CreateHostingRequestDomainConfiguration ,
514
527
defaults : ProfileDefaults ,
You can’t perform that action at this time.
0 commit comments