File tree Expand file tree Collapse file tree 4 files changed +47
-6
lines changed
scaleway-async/scaleway_async/webhosting/v1alpha1
scaleway/scaleway/webhosting/v1alpha1 Expand file tree Collapse file tree 4 files changed +47
-6
lines changed Original file line number Diff line number Diff line change 1717 HostingStatus ,
1818 ListHostingsRequestOrderBy ,
1919 ListOffersRequestOrderBy ,
20+ CheckUserOwnsDomainRequest ,
2021 CheckUserOwnsDomainResponse ,
2122 ControlPanel ,
2223 CreateHostingRequest ,
4243 unmarshal_ListOffersResponse ,
4344 unmarshal_ResetHostingPasswordResponse ,
4445 unmarshal_Session ,
46+ marshal_CheckUserOwnsDomainRequest ,
4547 marshal_CreateHostingRequest ,
4648 marshal_UpdateHostingRequest ,
4749)
@@ -489,9 +491,14 @@ async def check_user_owns_domain(
489491 res = self ._request (
490492 "POST" ,
491493 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+ ),
495502 )
496503
497504 self ._throw_on_error (res )
Original file line number Diff line number Diff line change 2525 ListOffersResponse ,
2626 ResetHostingPasswordResponse ,
2727 Session ,
28+ CheckUserOwnsDomainRequest ,
2829 CreateHostingRequestDomainConfiguration ,
2930 CreateHostingRequest ,
3031 UpdateHostingRequest ,
@@ -509,6 +510,18 @@ def unmarshal_Session(data: Any) -> Session:
509510 return Session (** args )
510511
511512
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+
512525def marshal_CreateHostingRequestDomainConfiguration (
513526 request : CreateHostingRequestDomainConfiguration ,
514527 defaults : ProfileDefaults ,
Original file line number Diff line number Diff line change 1717 HostingStatus ,
1818 ListHostingsRequestOrderBy ,
1919 ListOffersRequestOrderBy ,
20+ CheckUserOwnsDomainRequest ,
2021 CheckUserOwnsDomainResponse ,
2122 ControlPanel ,
2223 CreateHostingRequest ,
4243 unmarshal_ListOffersResponse ,
4344 unmarshal_ResetHostingPasswordResponse ,
4445 unmarshal_Session ,
46+ marshal_CheckUserOwnsDomainRequest ,
4547 marshal_CreateHostingRequest ,
4648 marshal_UpdateHostingRequest ,
4749)
@@ -489,9 +491,15 @@ def check_user_owns_domain(
489491 res = self ._request (
490492 "POST" ,
491493 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+
495503 )
496504
497505 self ._throw_on_error (res )
Original file line number Diff line number Diff line change 2525 ListOffersResponse ,
2626 ResetHostingPasswordResponse ,
2727 Session ,
28+ CheckUserOwnsDomainRequest ,
2829 CreateHostingRequestDomainConfiguration ,
2930 CreateHostingRequest ,
3031 UpdateHostingRequest ,
@@ -509,6 +510,18 @@ def unmarshal_Session(data: Any) -> Session:
509510 return Session (** args )
510511
511512
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+
512525def marshal_CreateHostingRequestDomainConfiguration (
513526 request : CreateHostingRequestDomainConfiguration ,
514527 defaults : ProfileDefaults ,
You can’t perform that action at this time.
0 commit comments