From 4f457155a794fe8742f9f9701008368aaa460507 Mon Sep 17 00:00:00 2001 From: Cam Date: Fri, 8 Dec 2023 14:14:20 -0600 Subject: [PATCH] Moved defaultable params further down struct and capitlaized model params --- sdk/python/sdk/zrok/zrok/model.py | 4 ++-- sdk/python/sdk/zrok/zrok/share.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/python/sdk/zrok/zrok/model.py b/sdk/python/sdk/zrok/zrok/model.py index 63e19c79..a21924df 100644 --- a/sdk/python/sdk/zrok/zrok/model.py +++ b/sdk/python/sdk/zrok/zrok/model.py @@ -15,8 +15,6 @@ PUBLIC_SHARE_MODE: ShareMode = "public" @dataclass class ShareRequest: - Reserved: bool = false - UniqueName: str = "" BackendMode: BackendMode ShareMode: ShareMode Target: str @@ -25,6 +23,8 @@ class ShareRequest: OauthProvider: str = "" OauthEmailDomains: list[str] = field(default_factory=list[str]) OauthAuthorizationCheckInterval: str = "" + Reserved: bool = False + UniqueName: str = "" @dataclass class Share: diff --git a/sdk/python/sdk/zrok/zrok/share.py b/sdk/python/sdk/zrok/zrok/share.py index 73639fc8..876c453b 100644 --- a/sdk/python/sdk/zrok/zrok/share.py +++ b/sdk/python/sdk/zrok/zrok/share.py @@ -14,9 +14,9 @@ def CreateShare(root: Root, request: model.ShareRequest) -> model.Share: out = __newPublicShare(root, request) case _: raise Exception("unknown share mode " + request.ShareMode) - out.reserved = request.reserved - if request.reserved: - out.unique_name = request.unique_name + out.reserved = request.Reserved + if request.Reserved: + out.unique_name = request.UniqueName if len(request.BasicAuth) > 0: out.auth_scheme = model.AUTH_SCHEME_BASIC