stackit-dremio 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stackit/dremio/__init__.py +86 -0
- stackit/dremio/api/__init__.py +4 -0
- stackit/dremio/api/default_api.py +2642 -0
- stackit/dremio/api_client.py +649 -0
- stackit/dremio/api_response.py +22 -0
- stackit/dremio/configuration.py +163 -0
- stackit/dremio/exceptions.py +217 -0
- stackit/dremio/models/__init__.py +33 -0
- stackit/dremio/models/auth_parameters.py +83 -0
- stackit/dremio/models/authentication.py +106 -0
- stackit/dremio/models/azuread.py +101 -0
- stackit/dremio/models/create_dremio_instance_payload.py +113 -0
- stackit/dremio/models/create_dremio_user_payload.py +109 -0
- stackit/dremio/models/dremio_response.py +167 -0
- stackit/dremio/models/dremio_user_response.py +155 -0
- stackit/dremio/models/endpoints.py +88 -0
- stackit/dremio/models/error.py +83 -0
- stackit/dremio/models/list_dremio_users_response.py +103 -0
- stackit/dremio/models/list_dremios_response.py +103 -0
- stackit/dremio/models/oauth.py +141 -0
- stackit/dremio/models/oauth_jwt_claims.py +82 -0
- stackit/dremio/models/update_dremio_instance_payload.py +118 -0
- stackit/dremio/py.typed +0 -0
- stackit/dremio/rest.py +163 -0
- stackit_dremio-0.1.0.dist-info/METADATA +48 -0
- stackit_dremio-0.1.0.dist-info/RECORD +29 -0
- stackit_dremio-0.1.0.dist-info/WHEEL +4 -0
- stackit_dremio-0.1.0.dist-info/licenses/LICENSE.md +201 -0
- stackit_dremio-0.1.0.dist-info/licenses/NOTICE.txt +2 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Dremio API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Dremio instances and users.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Error(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Error
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
code: Optional[StrictInt] = Field(default=None, description="The http return code.")
|
|
31
|
+
message: Optional[StrictStr] = Field(default=None, description="The message explaining the error.")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["code", "message"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of Error from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of Error from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({"code": obj.get("code"), "message": obj.get("message")})
|
|
83
|
+
return _obj
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Dremio API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Dremio instances and users.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.dremio.models.dremio_user_response import DremioUserResponse
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ListDremioUsersResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ListDremioUsersResponse
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
dremio_users: List[DremioUserResponse] = Field(alias="dremioUsers")
|
|
33
|
+
next_page_token: Optional[StrictStr] = Field(
|
|
34
|
+
default=None, description="A token to retrieve the next page of results.", alias="nextPageToken"
|
|
35
|
+
)
|
|
36
|
+
__properties: ClassVar[List[str]] = ["dremioUsers", "nextPageToken"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
validate_by_name=True,
|
|
40
|
+
validate_by_alias=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of ListDremioUsersResponse from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in dremio_users (list)
|
|
76
|
+
_items = []
|
|
77
|
+
if self.dremio_users:
|
|
78
|
+
for _item_dremio_users in self.dremio_users:
|
|
79
|
+
if _item_dremio_users:
|
|
80
|
+
_items.append(_item_dremio_users.to_dict())
|
|
81
|
+
_dict["dremioUsers"] = _items
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of ListDremioUsersResponse from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate(
|
|
94
|
+
{
|
|
95
|
+
"dremioUsers": (
|
|
96
|
+
[DremioUserResponse.from_dict(_item) for _item in obj["dremioUsers"]]
|
|
97
|
+
if obj.get("dremioUsers") is not None
|
|
98
|
+
else None
|
|
99
|
+
),
|
|
100
|
+
"nextPageToken": obj.get("nextPageToken"),
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
return _obj
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Dremio API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Dremio instances and users.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.dremio.models.dremio_response import DremioResponse
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ListDremiosResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ListDremiosResponse
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
dremios: List[DremioResponse]
|
|
33
|
+
next_page_token: Optional[StrictStr] = Field(
|
|
34
|
+
default=None, description="A token to retrieve the next page of results.", alias="nextPageToken"
|
|
35
|
+
)
|
|
36
|
+
__properties: ClassVar[List[str]] = ["dremios", "nextPageToken"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
validate_by_name=True,
|
|
40
|
+
validate_by_alias=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of ListDremiosResponse from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in dremios (list)
|
|
76
|
+
_items = []
|
|
77
|
+
if self.dremios:
|
|
78
|
+
for _item_dremios in self.dremios:
|
|
79
|
+
if _item_dremios:
|
|
80
|
+
_items.append(_item_dremios.to_dict())
|
|
81
|
+
_dict["dremios"] = _items
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of ListDremiosResponse from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate(
|
|
94
|
+
{
|
|
95
|
+
"dremios": (
|
|
96
|
+
[DremioResponse.from_dict(_item) for _item in obj["dremios"]]
|
|
97
|
+
if obj.get("dremios") is not None
|
|
98
|
+
else None
|
|
99
|
+
),
|
|
100
|
+
"nextPageToken": obj.get("nextPageToken"),
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
return _obj
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Dremio API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Dremio instances and users.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.dremio.models.auth_parameters import AuthParameters
|
|
25
|
+
from stackit.dremio.models.oauth_jwt_claims import OauthJwtClaims
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Oauth(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
OIDC authentication configuration.
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
|
|
33
|
+
authority_url: StrictStr = Field(
|
|
34
|
+
description="The Issuer location URI, where the OIDC provider configuration can be found.", alias="authorityUrl"
|
|
35
|
+
)
|
|
36
|
+
client_id: StrictStr = Field(description="The client ID assigned by the Identity Provider.", alias="clientId")
|
|
37
|
+
client_secret: Optional[StrictStr] = Field(
|
|
38
|
+
default=None, description="The client secret generated by the Identity Provider.", alias="clientSecret"
|
|
39
|
+
)
|
|
40
|
+
jwt_claims: OauthJwtClaims = Field(alias="jwtClaims")
|
|
41
|
+
parameters: Optional[List[AuthParameters]] = Field(
|
|
42
|
+
default=None, description="Any additional parameters the Identity Provider requires."
|
|
43
|
+
)
|
|
44
|
+
redirect_url: Optional[StrictStr] = Field(
|
|
45
|
+
default=None,
|
|
46
|
+
description="The URL where the Dremio instance is hosted. The URL must match the redirect URL set in the Identity Provider.",
|
|
47
|
+
alias="redirectUrl",
|
|
48
|
+
)
|
|
49
|
+
scope: Optional[StrictStr] = Field(
|
|
50
|
+
default="openid profile",
|
|
51
|
+
description="A list of space-separated scopes. The `openid` scope is always required; other scopes can vary by provider.",
|
|
52
|
+
)
|
|
53
|
+
__properties: ClassVar[List[str]] = [
|
|
54
|
+
"authorityUrl",
|
|
55
|
+
"clientId",
|
|
56
|
+
"clientSecret",
|
|
57
|
+
"jwtClaims",
|
|
58
|
+
"parameters",
|
|
59
|
+
"redirectUrl",
|
|
60
|
+
"scope",
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
model_config = ConfigDict(
|
|
64
|
+
validate_by_name=True,
|
|
65
|
+
validate_by_alias=True,
|
|
66
|
+
validate_assignment=True,
|
|
67
|
+
protected_namespaces=(),
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
def to_str(self) -> str:
|
|
71
|
+
"""Returns the string representation of the model using alias"""
|
|
72
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
73
|
+
|
|
74
|
+
def to_json(self) -> str:
|
|
75
|
+
"""Returns the JSON representation of the model using alias"""
|
|
76
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of Oauth from a JSON string"""
|
|
81
|
+
return cls.from_dict(json.loads(json_str))
|
|
82
|
+
|
|
83
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
84
|
+
"""Return the dictionary representation of the model using alias.
|
|
85
|
+
|
|
86
|
+
This has the following differences from calling pydantic's
|
|
87
|
+
`self.model_dump(by_alias=True)`:
|
|
88
|
+
|
|
89
|
+
* `None` is only added to the output dict for nullable fields that
|
|
90
|
+
were set at model initialization. Other fields with value `None`
|
|
91
|
+
are ignored.
|
|
92
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
93
|
+
"""
|
|
94
|
+
excluded_fields: Set[str] = set(
|
|
95
|
+
[
|
|
96
|
+
"redirect_url",
|
|
97
|
+
]
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
_dict = self.model_dump(
|
|
101
|
+
by_alias=True,
|
|
102
|
+
exclude=excluded_fields,
|
|
103
|
+
exclude_none=True,
|
|
104
|
+
)
|
|
105
|
+
# override the default output from pydantic by calling `to_dict()` of jwt_claims
|
|
106
|
+
if self.jwt_claims:
|
|
107
|
+
_dict["jwtClaims"] = self.jwt_claims.to_dict()
|
|
108
|
+
# override the default output from pydantic by calling `to_dict()` of each item in parameters (list)
|
|
109
|
+
_items = []
|
|
110
|
+
if self.parameters:
|
|
111
|
+
for _item_parameters in self.parameters:
|
|
112
|
+
if _item_parameters:
|
|
113
|
+
_items.append(_item_parameters.to_dict())
|
|
114
|
+
_dict["parameters"] = _items
|
|
115
|
+
return _dict
|
|
116
|
+
|
|
117
|
+
@classmethod
|
|
118
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
119
|
+
"""Create an instance of Oauth from a dict"""
|
|
120
|
+
if obj is None:
|
|
121
|
+
return None
|
|
122
|
+
|
|
123
|
+
if not isinstance(obj, dict):
|
|
124
|
+
return cls.model_validate(obj)
|
|
125
|
+
|
|
126
|
+
_obj = cls.model_validate(
|
|
127
|
+
{
|
|
128
|
+
"authorityUrl": obj.get("authorityUrl"),
|
|
129
|
+
"clientId": obj.get("clientId"),
|
|
130
|
+
"clientSecret": obj.get("clientSecret"),
|
|
131
|
+
"jwtClaims": OauthJwtClaims.from_dict(obj["jwtClaims"]) if obj.get("jwtClaims") is not None else None,
|
|
132
|
+
"parameters": (
|
|
133
|
+
[AuthParameters.from_dict(_item) for _item in obj["parameters"]]
|
|
134
|
+
if obj.get("parameters") is not None
|
|
135
|
+
else None
|
|
136
|
+
),
|
|
137
|
+
"redirectUrl": obj.get("redirectUrl"),
|
|
138
|
+
"scope": obj.get("scope") if obj.get("scope") is not None else "openid profile",
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
return _obj
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Dremio API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Dremio instances and users.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from pydantic_core import to_jsonable_python
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class OauthJwtClaims(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Maps fields from the JWT token to fields Dremio requires.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
user_name: StrictStr = Field(alias="userName")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["userName"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
validate_by_name=True,
|
|
35
|
+
validate_by_alias=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of OauthJwtClaims from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([])
|
|
64
|
+
|
|
65
|
+
_dict = self.model_dump(
|
|
66
|
+
by_alias=True,
|
|
67
|
+
exclude=excluded_fields,
|
|
68
|
+
exclude_none=True,
|
|
69
|
+
)
|
|
70
|
+
return _dict
|
|
71
|
+
|
|
72
|
+
@classmethod
|
|
73
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
74
|
+
"""Create an instance of OauthJwtClaims from a dict"""
|
|
75
|
+
if obj is None:
|
|
76
|
+
return None
|
|
77
|
+
|
|
78
|
+
if not isinstance(obj, dict):
|
|
79
|
+
return cls.model_validate(obj)
|
|
80
|
+
|
|
81
|
+
_obj = cls.model_validate({"userName": obj.get("userName")})
|
|
82
|
+
return _obj
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Dremio API
|
|
5
|
+
|
|
6
|
+
This API provides endpoints for managing Dremio instances and users.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
|
22
|
+
from pydantic_core import to_jsonable_python
|
|
23
|
+
from typing_extensions import Annotated, Self
|
|
24
|
+
|
|
25
|
+
from stackit.dremio.models.authentication import Authentication
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class UpdateDremioInstancePayload(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
UpdateDremioInstancePayload
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
|
|
33
|
+
authentication: Optional[Authentication] = None
|
|
34
|
+
description: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(
|
|
35
|
+
default=None,
|
|
36
|
+
description="The description is a longer text chosen by the user to provide more context for the resource.",
|
|
37
|
+
)
|
|
38
|
+
display_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=32)]] = Field(
|
|
39
|
+
default=None,
|
|
40
|
+
description="The display name is a short name chosen by the user to identify the resource.",
|
|
41
|
+
alias="displayName",
|
|
42
|
+
)
|
|
43
|
+
__properties: ClassVar[List[str]] = ["authentication", "description", "displayName"]
|
|
44
|
+
|
|
45
|
+
@field_validator("display_name")
|
|
46
|
+
def display_name_validate_regular_expression(cls, value):
|
|
47
|
+
"""Validates the regular expression"""
|
|
48
|
+
if value is None:
|
|
49
|
+
return value
|
|
50
|
+
|
|
51
|
+
if not isinstance(value, str):
|
|
52
|
+
value = str(value)
|
|
53
|
+
|
|
54
|
+
if not re.match(r"^[a-zA-Z0-9 ]*$", value):
|
|
55
|
+
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9 ]*$/")
|
|
56
|
+
return value
|
|
57
|
+
|
|
58
|
+
model_config = ConfigDict(
|
|
59
|
+
validate_by_name=True,
|
|
60
|
+
validate_by_alias=True,
|
|
61
|
+
validate_assignment=True,
|
|
62
|
+
protected_namespaces=(),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
def to_str(self) -> str:
|
|
66
|
+
"""Returns the string representation of the model using alias"""
|
|
67
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
68
|
+
|
|
69
|
+
def to_json(self) -> str:
|
|
70
|
+
"""Returns the JSON representation of the model using alias"""
|
|
71
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of UpdateDremioInstancePayload from a JSON string"""
|
|
76
|
+
return cls.from_dict(json.loads(json_str))
|
|
77
|
+
|
|
78
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
79
|
+
"""Return the dictionary representation of the model using alias.
|
|
80
|
+
|
|
81
|
+
This has the following differences from calling pydantic's
|
|
82
|
+
`self.model_dump(by_alias=True)`:
|
|
83
|
+
|
|
84
|
+
* `None` is only added to the output dict for nullable fields that
|
|
85
|
+
were set at model initialization. Other fields with value `None`
|
|
86
|
+
are ignored.
|
|
87
|
+
"""
|
|
88
|
+
excluded_fields: Set[str] = set([])
|
|
89
|
+
|
|
90
|
+
_dict = self.model_dump(
|
|
91
|
+
by_alias=True,
|
|
92
|
+
exclude=excluded_fields,
|
|
93
|
+
exclude_none=True,
|
|
94
|
+
)
|
|
95
|
+
# override the default output from pydantic by calling `to_dict()` of authentication
|
|
96
|
+
if self.authentication:
|
|
97
|
+
_dict["authentication"] = self.authentication.to_dict()
|
|
98
|
+
return _dict
|
|
99
|
+
|
|
100
|
+
@classmethod
|
|
101
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
102
|
+
"""Create an instance of UpdateDremioInstancePayload from a dict"""
|
|
103
|
+
if obj is None:
|
|
104
|
+
return None
|
|
105
|
+
|
|
106
|
+
if not isinstance(obj, dict):
|
|
107
|
+
return cls.model_validate(obj)
|
|
108
|
+
|
|
109
|
+
_obj = cls.model_validate(
|
|
110
|
+
{
|
|
111
|
+
"authentication": (
|
|
112
|
+
Authentication.from_dict(obj["authentication"]) if obj.get("authentication") is not None else None
|
|
113
|
+
),
|
|
114
|
+
"description": obj.get("description"),
|
|
115
|
+
"displayName": obj.get("displayName"),
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
return _obj
|
stackit/dremio/py.typed
ADDED
|
File without changes
|