unitycatalog-client 0.2.1__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.
- unitycatalog/client/__init__.py +102 -0
- unitycatalog/client/api/__init__.py +13 -0
- unitycatalog/client/api/catalogs_api.py +1404 -0
- unitycatalog/client/api/functions_api.py +1135 -0
- unitycatalog/client/api/grants_api.py +630 -0
- unitycatalog/client/api/model_versions_api.py +1748 -0
- unitycatalog/client/api/registered_models_api.py +1438 -0
- unitycatalog/client/api/schemas_api.py +1421 -0
- unitycatalog/client/api/tables_api.py +1135 -0
- unitycatalog/client/api/temporary_credentials_api.py +1109 -0
- unitycatalog/client/api/volumes_api.py +1421 -0
- unitycatalog/client/api_client.py +773 -0
- unitycatalog/client/api_response.py +21 -0
- unitycatalog/client/configuration.py +432 -0
- unitycatalog/client/exceptions.py +199 -0
- unitycatalog/client/models/__init__.py +77 -0
- unitycatalog/client/models/aws_credentials.py +91 -0
- unitycatalog/client/models/azure_user_delegation_sas.py +87 -0
- unitycatalog/client/models/catalog_info.py +103 -0
- unitycatalog/client/models/column_info.py +108 -0
- unitycatalog/client/models/column_type_name.py +56 -0
- unitycatalog/client/models/create_catalog.py +91 -0
- unitycatalog/client/models/create_function.py +163 -0
- unitycatalog/client/models/create_function_request.py +91 -0
- unitycatalog/client/models/create_model_version.py +97 -0
- unitycatalog/client/models/create_registered_model.py +93 -0
- unitycatalog/client/models/create_schema.py +93 -0
- unitycatalog/client/models/create_table.py +113 -0
- unitycatalog/client/models/create_volume_request_content.py +99 -0
- unitycatalog/client/models/data_source_format.py +42 -0
- unitycatalog/client/models/dependency.py +97 -0
- unitycatalog/client/models/dependency_list.py +95 -0
- unitycatalog/client/models/finalize_model_version.py +89 -0
- unitycatalog/client/models/function_dependency.py +87 -0
- unitycatalog/client/models/function_info.py +189 -0
- unitycatalog/client/models/function_parameter_info.py +112 -0
- unitycatalog/client/models/function_parameter_infos.py +95 -0
- unitycatalog/client/models/function_parameter_mode.py +36 -0
- unitycatalog/client/models/function_parameter_type.py +37 -0
- unitycatalog/client/models/gcp_oauth_token.py +87 -0
- unitycatalog/client/models/generate_temporary_model_version_credential.py +96 -0
- unitycatalog/client/models/generate_temporary_path_credential.py +90 -0
- unitycatalog/client/models/generate_temporary_table_credential.py +90 -0
- unitycatalog/client/models/generate_temporary_volume_credential.py +90 -0
- unitycatalog/client/models/list_catalogs_response.py +97 -0
- unitycatalog/client/models/list_functions_response.py +97 -0
- unitycatalog/client/models/list_model_versions_response.py +97 -0
- unitycatalog/client/models/list_registered_models_response.py +97 -0
- unitycatalog/client/models/list_schemas_response.py +97 -0
- unitycatalog/client/models/list_tables_response.py +97 -0
- unitycatalog/client/models/list_volumes_response_content.py +97 -0
- unitycatalog/client/models/model_version_info.py +114 -0
- unitycatalog/client/models/model_version_operation.py +38 -0
- unitycatalog/client/models/model_version_status.py +39 -0
- unitycatalog/client/models/path_operation.py +39 -0
- unitycatalog/client/models/permissions_change.py +92 -0
- unitycatalog/client/models/permissions_list.py +95 -0
- unitycatalog/client/models/principal_type.py +37 -0
- unitycatalog/client/models/privilege.py +47 -0
- unitycatalog/client/models/privilege_assignment.py +90 -0
- unitycatalog/client/models/registered_model_info.py +109 -0
- unitycatalog/client/models/schema_info.py +107 -0
- unitycatalog/client/models/securable_type.py +42 -0
- unitycatalog/client/models/table_dependency.py +87 -0
- unitycatalog/client/models/table_info.py +125 -0
- unitycatalog/client/models/table_operation.py +38 -0
- unitycatalog/client/models/table_type.py +37 -0
- unitycatalog/client/models/temporary_credentials.py +105 -0
- unitycatalog/client/models/update_catalog.py +91 -0
- unitycatalog/client/models/update_model_version.py +87 -0
- unitycatalog/client/models/update_permissions.py +95 -0
- unitycatalog/client/models/update_registered_model.py +89 -0
- unitycatalog/client/models/update_schema.py +91 -0
- unitycatalog/client/models/update_volume_request_content.py +90 -0
- unitycatalog/client/models/volume_info.py +113 -0
- unitycatalog/client/models/volume_operation.py +38 -0
- unitycatalog/client/models/volume_type.py +37 -0
- unitycatalog/client/py.typed +0 -0
- unitycatalog/client/rest.py +215 -0
- unitycatalog_client-0.2.1.dist-info/METADATA +199 -0
- unitycatalog_client-0.2.1.dist-info/RECORD +82 -0
- unitycatalog_client-0.2.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Unity Catalog API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from unitycatalog.client.models.privilege_assignment import PrivilegeAssignment
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class PermissionsList(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PermissionsList
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
privilege_assignments: List[PrivilegeAssignment] = Field(description="The privileges assigned to each principal.")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["privilege_assignments"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
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
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of PermissionsList 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
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in privilege_assignments (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.privilege_assignments:
|
|
75
|
+
for _item in self.privilege_assignments:
|
|
76
|
+
if _item:
|
|
77
|
+
_items.append(_item.to_dict())
|
|
78
|
+
_dict['privilege_assignments'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of PermissionsList from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"privilege_assignments": [PrivilegeAssignment.from_dict(_item) for _item in obj["privilege_assignments"]] if obj.get("privilege_assignments") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Unity Catalog API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class PrincipalType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
The type of the principal.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
USER = 'USER'
|
|
30
|
+
GROUP = 'GROUP'
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
|
34
|
+
"""Create an instance of PrincipalType from a JSON string"""
|
|
35
|
+
return cls(json.loads(json_str))
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Unity Catalog API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Privilege(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
The privilege to grant.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
CREATE_CATALOG = 'CREATE CATALOG'
|
|
30
|
+
USE_CATALOG = 'USE CATALOG'
|
|
31
|
+
CREATE_SCHEMA = 'CREATE SCHEMA'
|
|
32
|
+
USE_SCHEMA = 'USE SCHEMA'
|
|
33
|
+
CREATE_TABLE = 'CREATE TABLE'
|
|
34
|
+
SELECT = 'SELECT'
|
|
35
|
+
MODIFY = 'MODIFY'
|
|
36
|
+
CREATE_FUNCTION = 'CREATE FUNCTION'
|
|
37
|
+
EXECUTE = 'EXECUTE'
|
|
38
|
+
CREATE_VOLUME = 'CREATE VOLUME'
|
|
39
|
+
READ_VOLUME = 'READ VOLUME'
|
|
40
|
+
CREATE_MODEL = 'CREATE MODEL'
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_json(cls, json_str: str) -> Self:
|
|
44
|
+
"""Create an instance of Privilege from a JSON string"""
|
|
45
|
+
return cls(json.loads(json_str))
|
|
46
|
+
|
|
47
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Unity Catalog API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from unitycatalog.client.models.privilege import Privilege
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class PrivilegeAssignment(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PrivilegeAssignment
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
principal: StrictStr = Field(description="The principal (user email address or group name).")
|
|
31
|
+
privileges: List[Privilege] = Field(description="The privileges assigned to the principal.")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["principal", "privileges"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
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
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of PrivilegeAssignment from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of PrivilegeAssignment from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"principal": obj.get("principal"),
|
|
86
|
+
"privileges": obj.get("privileges")
|
|
87
|
+
})
|
|
88
|
+
return _obj
|
|
89
|
+
|
|
90
|
+
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Unity Catalog API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class RegisteredModelInfo(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
RegisteredModelInfo
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
name: Optional[StrictStr] = Field(default=None, description="The name of the registered model")
|
|
30
|
+
catalog_name: Optional[StrictStr] = Field(default=None, description="The name of the catalog where the schema and the registered model reside")
|
|
31
|
+
schema_name: Optional[StrictStr] = Field(default=None, description="The name of the schema where the registered model resides")
|
|
32
|
+
storage_location: Optional[StrictStr] = Field(default=None, description="The storage location on the cloud under which model version data files are stored")
|
|
33
|
+
full_name: Optional[StrictStr] = Field(default=None, description="The three-level (fully qualified) name of the registered model")
|
|
34
|
+
comment: Optional[StrictStr] = Field(default=None, description="The comment attached to the registered model")
|
|
35
|
+
owner: Optional[StrictStr] = Field(default=None, description="The identifier of the user who owns the registered model")
|
|
36
|
+
created_at: Optional[StrictInt] = Field(default=None, description="Creation timestamp of the registered model in milliseconds since the Unix epoch")
|
|
37
|
+
created_by: Optional[StrictStr] = Field(default=None, description="The identifier of the user who created the registered model")
|
|
38
|
+
updated_at: Optional[StrictInt] = Field(default=None, description="Last-update timestamp of the registered model in milliseconds since the Unix epoch")
|
|
39
|
+
updated_by: Optional[StrictStr] = Field(default=None, description="The identifier of the user who updated the registered model last time")
|
|
40
|
+
id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the registered model.")
|
|
41
|
+
__properties: ClassVar[List[str]] = ["name", "catalog_name", "schema_name", "storage_location", "full_name", "comment", "owner", "created_at", "created_by", "updated_at", "updated_by", "id"]
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
populate_by_name=True,
|
|
45
|
+
validate_assignment=True,
|
|
46
|
+
protected_namespaces=(),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
+
"""Create an instance of RegisteredModelInfo from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
|
66
|
+
|
|
67
|
+
This has the following differences from calling pydantic's
|
|
68
|
+
`self.model_dump(by_alias=True)`:
|
|
69
|
+
|
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
|
71
|
+
were set at model initialization. Other fields with value `None`
|
|
72
|
+
are ignored.
|
|
73
|
+
"""
|
|
74
|
+
excluded_fields: Set[str] = set([
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of RegisteredModelInfo 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
|
+
"name": obj.get("name"),
|
|
95
|
+
"catalog_name": obj.get("catalog_name"),
|
|
96
|
+
"schema_name": obj.get("schema_name"),
|
|
97
|
+
"storage_location": obj.get("storage_location"),
|
|
98
|
+
"full_name": obj.get("full_name"),
|
|
99
|
+
"comment": obj.get("comment"),
|
|
100
|
+
"owner": obj.get("owner"),
|
|
101
|
+
"created_at": obj.get("created_at"),
|
|
102
|
+
"created_by": obj.get("created_by"),
|
|
103
|
+
"updated_at": obj.get("updated_at"),
|
|
104
|
+
"updated_by": obj.get("updated_by"),
|
|
105
|
+
"id": obj.get("id")
|
|
106
|
+
})
|
|
107
|
+
return _obj
|
|
108
|
+
|
|
109
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Unity Catalog API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class SchemaInfo(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
SchemaInfo
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
name: Optional[StrictStr] = Field(default=None, description="Name of schema, relative to parent catalog.")
|
|
30
|
+
catalog_name: Optional[StrictStr] = Field(default=None, description="Name of parent catalog.")
|
|
31
|
+
comment: Optional[StrictStr] = Field(default=None, description="User-provided free-form text description.")
|
|
32
|
+
properties: Optional[Dict[str, StrictStr]] = Field(default=None, description="A map of key-value properties attached to the securable.")
|
|
33
|
+
full_name: Optional[StrictStr] = Field(default=None, description="Full name of schema, in form of __catalog_name__.__schema_name__.")
|
|
34
|
+
owner: Optional[StrictStr] = Field(default=None, description="Username of current owner of schema.")
|
|
35
|
+
created_at: Optional[StrictInt] = Field(default=None, description="Time at which this schema was created, in epoch milliseconds.")
|
|
36
|
+
created_by: Optional[StrictStr] = Field(default=None, description="Username of schema creator.")
|
|
37
|
+
updated_at: Optional[StrictInt] = Field(default=None, description="Time at which this schema was last modified, in epoch milliseconds.")
|
|
38
|
+
updated_by: Optional[StrictStr] = Field(default=None, description="Username of user who last modified schema.")
|
|
39
|
+
schema_id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the schema.")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["name", "catalog_name", "comment", "properties", "full_name", "owner", "created_at", "created_by", "updated_at", "updated_by", "schema_id"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of SchemaInfo from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of SchemaInfo from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"name": obj.get("name"),
|
|
94
|
+
"catalog_name": obj.get("catalog_name"),
|
|
95
|
+
"comment": obj.get("comment"),
|
|
96
|
+
"properties": obj.get("properties"),
|
|
97
|
+
"full_name": obj.get("full_name"),
|
|
98
|
+
"owner": obj.get("owner"),
|
|
99
|
+
"created_at": obj.get("created_at"),
|
|
100
|
+
"created_by": obj.get("created_by"),
|
|
101
|
+
"updated_at": obj.get("updated_at"),
|
|
102
|
+
"updated_by": obj.get("updated_by"),
|
|
103
|
+
"schema_id": obj.get("schema_id")
|
|
104
|
+
})
|
|
105
|
+
return _obj
|
|
106
|
+
|
|
107
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Unity Catalog API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class SecurableType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
The type of the resource.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
METASTORE = 'metastore'
|
|
30
|
+
CATALOG = 'catalog'
|
|
31
|
+
SCHEMA = 'schema'
|
|
32
|
+
TABLE = 'table'
|
|
33
|
+
FUNCTION = 'function'
|
|
34
|
+
VOLUME = 'volume'
|
|
35
|
+
REGISTERED_MODEL = 'registered_model'
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def from_json(cls, json_str: str) -> Self:
|
|
39
|
+
"""Create an instance of SecurableType from a JSON string"""
|
|
40
|
+
return cls(json.loads(json_str))
|
|
41
|
+
|
|
42
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Unity Catalog API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class TableDependency(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
A table that is dependent on a SQL object.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
table_full_name: StrictStr = Field(description="Full name of the dependent table, in the form of __catalog_name__.__schema_name__.__table_name__.")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["table_full_name"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of TableDependency 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
|
+
|
|
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 TableDependency 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({
|
|
83
|
+
"table_full_name": obj.get("table_full_name")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|