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,189 @@
|
|
|
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, StrictBool, StrictInt, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from unitycatalog.client.models.column_type_name import ColumnTypeName
|
|
23
|
+
from unitycatalog.client.models.dependency_list import DependencyList
|
|
24
|
+
from unitycatalog.client.models.function_parameter_infos import FunctionParameterInfos
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class FunctionInfo(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
FunctionInfo
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
name: Optional[StrictStr] = Field(default=None, description="Name of function, relative to parent schema.")
|
|
33
|
+
catalog_name: Optional[StrictStr] = Field(default=None, description="Name of parent catalog.")
|
|
34
|
+
schema_name: Optional[StrictStr] = Field(default=None, description="Name of parent schema relative to its parent catalog.")
|
|
35
|
+
input_params: Optional[FunctionParameterInfos] = None
|
|
36
|
+
data_type: Optional[ColumnTypeName] = None
|
|
37
|
+
full_data_type: Optional[StrictStr] = Field(default=None, description="Pretty printed function data type.")
|
|
38
|
+
return_params: Optional[FunctionParameterInfos] = None
|
|
39
|
+
routine_body: Optional[StrictStr] = Field(default=None, description="Function language. When **EXTERNAL** is used, the language of the routine function should be specified in the __external_language__ field, and the __return_params__ of the function cannot be used (as **TABLE** return type is not supported), and the __sql_data_access__ field must be **NO_SQL**. ")
|
|
40
|
+
routine_definition: Optional[StrictStr] = Field(default=None, description="Function body.")
|
|
41
|
+
routine_dependencies: Optional[DependencyList] = None
|
|
42
|
+
parameter_style: Optional[StrictStr] = Field(default=None, description="Function parameter style. **S** is the value for SQL.")
|
|
43
|
+
is_deterministic: Optional[StrictBool] = Field(default=None, description="Whether the function is deterministic.")
|
|
44
|
+
sql_data_access: Optional[StrictStr] = Field(default=None, description="Function SQL data access.")
|
|
45
|
+
is_null_call: Optional[StrictBool] = Field(default=None, description="Function null call.")
|
|
46
|
+
security_type: Optional[StrictStr] = Field(default=None, description="Function security type.")
|
|
47
|
+
specific_name: Optional[StrictStr] = Field(default=None, description="Specific name of the function; Reserved for future use.")
|
|
48
|
+
comment: Optional[StrictStr] = Field(default=None, description="User-provided free-form text description.")
|
|
49
|
+
properties: Optional[StrictStr] = Field(default=None, description="JSON-serialized key-value pair map, encoded (escaped) as a string.")
|
|
50
|
+
full_name: Optional[StrictStr] = Field(default=None, description="Full name of function, in form of __catalog_name__.__schema_name__.__function__name__")
|
|
51
|
+
owner: Optional[StrictStr] = Field(default=None, description="Username of current owner of function.")
|
|
52
|
+
created_at: Optional[StrictInt] = Field(default=None, description="Time at which this function was created, in epoch milliseconds.")
|
|
53
|
+
created_by: Optional[StrictStr] = Field(default=None, description="Username of function creator.")
|
|
54
|
+
updated_at: Optional[StrictInt] = Field(default=None, description="Time at which this function was last updated, in epoch milliseconds.")
|
|
55
|
+
updated_by: Optional[StrictStr] = Field(default=None, description="Username of user who last modified function.")
|
|
56
|
+
function_id: Optional[StrictStr] = Field(default=None, description="Id of Function, relative to parent schema.")
|
|
57
|
+
external_language: Optional[StrictStr] = Field(default=None, description="External language of the function.")
|
|
58
|
+
__properties: ClassVar[List[str]] = ["name", "catalog_name", "schema_name", "input_params", "data_type", "full_data_type", "return_params", "routine_body", "routine_definition", "routine_dependencies", "parameter_style", "is_deterministic", "sql_data_access", "is_null_call", "security_type", "specific_name", "comment", "properties", "full_name", "owner", "created_at", "created_by", "updated_at", "updated_by", "function_id", "external_language"]
|
|
59
|
+
|
|
60
|
+
@field_validator('routine_body')
|
|
61
|
+
def routine_body_validate_enum(cls, value):
|
|
62
|
+
"""Validates the enum"""
|
|
63
|
+
if value is None:
|
|
64
|
+
return value
|
|
65
|
+
|
|
66
|
+
if value not in set(['SQL', 'EXTERNAL']):
|
|
67
|
+
raise ValueError("must be one of enum values ('SQL', 'EXTERNAL')")
|
|
68
|
+
return value
|
|
69
|
+
|
|
70
|
+
@field_validator('parameter_style')
|
|
71
|
+
def parameter_style_validate_enum(cls, value):
|
|
72
|
+
"""Validates the enum"""
|
|
73
|
+
if value is None:
|
|
74
|
+
return value
|
|
75
|
+
|
|
76
|
+
if value not in set(['S']):
|
|
77
|
+
raise ValueError("must be one of enum values ('S')")
|
|
78
|
+
return value
|
|
79
|
+
|
|
80
|
+
@field_validator('sql_data_access')
|
|
81
|
+
def sql_data_access_validate_enum(cls, value):
|
|
82
|
+
"""Validates the enum"""
|
|
83
|
+
if value is None:
|
|
84
|
+
return value
|
|
85
|
+
|
|
86
|
+
if value not in set(['CONTAINS_SQL', 'READS_SQL_DATA', 'NO_SQL']):
|
|
87
|
+
raise ValueError("must be one of enum values ('CONTAINS_SQL', 'READS_SQL_DATA', 'NO_SQL')")
|
|
88
|
+
return value
|
|
89
|
+
|
|
90
|
+
@field_validator('security_type')
|
|
91
|
+
def security_type_validate_enum(cls, value):
|
|
92
|
+
"""Validates the enum"""
|
|
93
|
+
if value is None:
|
|
94
|
+
return value
|
|
95
|
+
|
|
96
|
+
if value not in set(['DEFINER']):
|
|
97
|
+
raise ValueError("must be one of enum values ('DEFINER')")
|
|
98
|
+
return value
|
|
99
|
+
|
|
100
|
+
model_config = ConfigDict(
|
|
101
|
+
populate_by_name=True,
|
|
102
|
+
validate_assignment=True,
|
|
103
|
+
protected_namespaces=(),
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def to_str(self) -> str:
|
|
108
|
+
"""Returns the string representation of the model using alias"""
|
|
109
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
110
|
+
|
|
111
|
+
def to_json(self) -> str:
|
|
112
|
+
"""Returns the JSON representation of the model using alias"""
|
|
113
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
114
|
+
return json.dumps(self.to_dict())
|
|
115
|
+
|
|
116
|
+
@classmethod
|
|
117
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
118
|
+
"""Create an instance of FunctionInfo from a JSON string"""
|
|
119
|
+
return cls.from_dict(json.loads(json_str))
|
|
120
|
+
|
|
121
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
122
|
+
"""Return the dictionary representation of the model using alias.
|
|
123
|
+
|
|
124
|
+
This has the following differences from calling pydantic's
|
|
125
|
+
`self.model_dump(by_alias=True)`:
|
|
126
|
+
|
|
127
|
+
* `None` is only added to the output dict for nullable fields that
|
|
128
|
+
were set at model initialization. Other fields with value `None`
|
|
129
|
+
are ignored.
|
|
130
|
+
"""
|
|
131
|
+
excluded_fields: Set[str] = set([
|
|
132
|
+
])
|
|
133
|
+
|
|
134
|
+
_dict = self.model_dump(
|
|
135
|
+
by_alias=True,
|
|
136
|
+
exclude=excluded_fields,
|
|
137
|
+
exclude_none=True,
|
|
138
|
+
)
|
|
139
|
+
# override the default output from pydantic by calling `to_dict()` of input_params
|
|
140
|
+
if self.input_params:
|
|
141
|
+
_dict['input_params'] = self.input_params.to_dict()
|
|
142
|
+
# override the default output from pydantic by calling `to_dict()` of return_params
|
|
143
|
+
if self.return_params:
|
|
144
|
+
_dict['return_params'] = self.return_params.to_dict()
|
|
145
|
+
# override the default output from pydantic by calling `to_dict()` of routine_dependencies
|
|
146
|
+
if self.routine_dependencies:
|
|
147
|
+
_dict['routine_dependencies'] = self.routine_dependencies.to_dict()
|
|
148
|
+
return _dict
|
|
149
|
+
|
|
150
|
+
@classmethod
|
|
151
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
152
|
+
"""Create an instance of FunctionInfo from a dict"""
|
|
153
|
+
if obj is None:
|
|
154
|
+
return None
|
|
155
|
+
|
|
156
|
+
if not isinstance(obj, dict):
|
|
157
|
+
return cls.model_validate(obj)
|
|
158
|
+
|
|
159
|
+
_obj = cls.model_validate({
|
|
160
|
+
"name": obj.get("name"),
|
|
161
|
+
"catalog_name": obj.get("catalog_name"),
|
|
162
|
+
"schema_name": obj.get("schema_name"),
|
|
163
|
+
"input_params": FunctionParameterInfos.from_dict(obj["input_params"]) if obj.get("input_params") is not None else None,
|
|
164
|
+
"data_type": obj.get("data_type"),
|
|
165
|
+
"full_data_type": obj.get("full_data_type"),
|
|
166
|
+
"return_params": FunctionParameterInfos.from_dict(obj["return_params"]) if obj.get("return_params") is not None else None,
|
|
167
|
+
"routine_body": obj.get("routine_body"),
|
|
168
|
+
"routine_definition": obj.get("routine_definition"),
|
|
169
|
+
"routine_dependencies": DependencyList.from_dict(obj["routine_dependencies"]) if obj.get("routine_dependencies") is not None else None,
|
|
170
|
+
"parameter_style": obj.get("parameter_style"),
|
|
171
|
+
"is_deterministic": obj.get("is_deterministic"),
|
|
172
|
+
"sql_data_access": obj.get("sql_data_access"),
|
|
173
|
+
"is_null_call": obj.get("is_null_call"),
|
|
174
|
+
"security_type": obj.get("security_type"),
|
|
175
|
+
"specific_name": obj.get("specific_name"),
|
|
176
|
+
"comment": obj.get("comment"),
|
|
177
|
+
"properties": obj.get("properties"),
|
|
178
|
+
"full_name": obj.get("full_name"),
|
|
179
|
+
"owner": obj.get("owner"),
|
|
180
|
+
"created_at": obj.get("created_at"),
|
|
181
|
+
"created_by": obj.get("created_by"),
|
|
182
|
+
"updated_at": obj.get("updated_at"),
|
|
183
|
+
"updated_by": obj.get("updated_by"),
|
|
184
|
+
"function_id": obj.get("function_id"),
|
|
185
|
+
"external_language": obj.get("external_language")
|
|
186
|
+
})
|
|
187
|
+
return _obj
|
|
188
|
+
|
|
189
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
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 unitycatalog.client.models.column_type_name import ColumnTypeName
|
|
23
|
+
from unitycatalog.client.models.function_parameter_mode import FunctionParameterMode
|
|
24
|
+
from unitycatalog.client.models.function_parameter_type import FunctionParameterType
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class FunctionParameterInfo(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
FunctionParameterInfo
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
name: StrictStr = Field(description="Name of parameter.")
|
|
33
|
+
type_text: StrictStr = Field(description="Full data type spec, SQL/catalogString text.")
|
|
34
|
+
type_json: StrictStr = Field(description="Full data type spec, JSON-serialized.")
|
|
35
|
+
type_name: ColumnTypeName
|
|
36
|
+
type_precision: Optional[StrictInt] = Field(default=None, description="Digits of precision; required on Create for DecimalTypes.")
|
|
37
|
+
type_scale: Optional[StrictInt] = Field(default=None, description="Digits to right of decimal; Required on Create for DecimalTypes.")
|
|
38
|
+
type_interval_type: Optional[StrictStr] = Field(default=None, description="Format of IntervalType.")
|
|
39
|
+
position: StrictInt = Field(description="Ordinal position of column (starting at position 0).")
|
|
40
|
+
parameter_mode: Optional[FunctionParameterMode] = None
|
|
41
|
+
parameter_type: Optional[FunctionParameterType] = None
|
|
42
|
+
parameter_default: Optional[StrictStr] = Field(default=None, description="Default value of the parameter.")
|
|
43
|
+
comment: Optional[StrictStr] = Field(default=None, description="User-provided free-form text description.")
|
|
44
|
+
__properties: ClassVar[List[str]] = ["name", "type_text", "type_json", "type_name", "type_precision", "type_scale", "type_interval_type", "position", "parameter_mode", "parameter_type", "parameter_default", "comment"]
|
|
45
|
+
|
|
46
|
+
model_config = ConfigDict(
|
|
47
|
+
populate_by_name=True,
|
|
48
|
+
validate_assignment=True,
|
|
49
|
+
protected_namespaces=(),
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
|
59
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
60
|
+
return json.dumps(self.to_dict())
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
64
|
+
"""Create an instance of FunctionParameterInfo from a JSON string"""
|
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
|
66
|
+
|
|
67
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
68
|
+
"""Return the dictionary representation of the model using alias.
|
|
69
|
+
|
|
70
|
+
This has the following differences from calling pydantic's
|
|
71
|
+
`self.model_dump(by_alias=True)`:
|
|
72
|
+
|
|
73
|
+
* `None` is only added to the output dict for nullable fields that
|
|
74
|
+
were set at model initialization. Other fields with value `None`
|
|
75
|
+
are ignored.
|
|
76
|
+
"""
|
|
77
|
+
excluded_fields: Set[str] = set([
|
|
78
|
+
])
|
|
79
|
+
|
|
80
|
+
_dict = self.model_dump(
|
|
81
|
+
by_alias=True,
|
|
82
|
+
exclude=excluded_fields,
|
|
83
|
+
exclude_none=True,
|
|
84
|
+
)
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of FunctionParameterInfo from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"name": obj.get("name"),
|
|
98
|
+
"type_text": obj.get("type_text"),
|
|
99
|
+
"type_json": obj.get("type_json"),
|
|
100
|
+
"type_name": obj.get("type_name"),
|
|
101
|
+
"type_precision": obj.get("type_precision"),
|
|
102
|
+
"type_scale": obj.get("type_scale"),
|
|
103
|
+
"type_interval_type": obj.get("type_interval_type"),
|
|
104
|
+
"position": obj.get("position"),
|
|
105
|
+
"parameter_mode": obj.get("parameter_mode"),
|
|
106
|
+
"parameter_type": obj.get("parameter_type"),
|
|
107
|
+
"parameter_default": obj.get("parameter_default"),
|
|
108
|
+
"comment": obj.get("comment")
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -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, Optional
|
|
22
|
+
from unitycatalog.client.models.function_parameter_info import FunctionParameterInfo
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class FunctionParameterInfos(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
FunctionParameterInfos
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
parameters: Optional[List[FunctionParameterInfo]] = Field(default=None, description="The array of __FunctionParameterInfo__ definitions of the function's parameters.")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["parameters"]
|
|
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 FunctionParameterInfos 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 parameters (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.parameters:
|
|
75
|
+
for _item in self.parameters:
|
|
76
|
+
if _item:
|
|
77
|
+
_items.append(_item.to_dict())
|
|
78
|
+
_dict['parameters'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of FunctionParameterInfos 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
|
+
"parameters": [FunctionParameterInfo.from_dict(_item) for _item in obj["parameters"]] if obj.get("parameters") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
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 FunctionParameterMode(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
The mode of the function parameter.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
IN = 'IN'
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def from_json(cls, json_str: str) -> Self:
|
|
33
|
+
"""Create an instance of FunctionParameterMode from a JSON string"""
|
|
34
|
+
return cls(json.loads(json_str))
|
|
35
|
+
|
|
36
|
+
|
|
@@ -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 FunctionParameterType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
The type of function parameter.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
PARAM = 'PARAM'
|
|
30
|
+
COLUMN = 'COLUMN'
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
|
34
|
+
"""Create an instance of FunctionParameterType from a JSON string"""
|
|
35
|
+
return cls(json.loads(json_str))
|
|
36
|
+
|
|
37
|
+
|
|
@@ -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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class GcpOauthToken(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
GcpOauthToken
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
oauth_token: Optional[StrictStr] = Field(default=None, description="Gcp Token")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["oauth_token"]
|
|
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 GcpOauthToken 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 GcpOauthToken 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
|
+
"oauth_token": obj.get("oauth_token")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
|
22
|
+
from unitycatalog.client.models.model_version_operation import ModelVersionOperation
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class GenerateTemporaryModelVersionCredential(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
GenerateTemporaryModelVersionCredential
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
catalog_name: StrictStr = Field(description="Catalog name for which temporary credentials are generated. Can be obtained from models/{full_name} (get model info) API. ")
|
|
31
|
+
schema_name: StrictStr = Field(description="Schema name for which temporary credentials are generated. Can be obtained from models/{full_name} (get model info) API. ")
|
|
32
|
+
model_name: StrictStr = Field(description="Model name for which temporary credentials are generated. Can be obtained from models/{full_name} (get model info) API. ")
|
|
33
|
+
version: StrictInt = Field(description="Model version for which temporary credentials are generated. ")
|
|
34
|
+
operation: ModelVersionOperation
|
|
35
|
+
__properties: ClassVar[List[str]] = ["catalog_name", "schema_name", "model_name", "version", "operation"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of GenerateTemporaryModelVersionCredential 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
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of GenerateTemporaryModelVersionCredential from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"catalog_name": obj.get("catalog_name"),
|
|
89
|
+
"schema_name": obj.get("schema_name"),
|
|
90
|
+
"model_name": obj.get("model_name"),
|
|
91
|
+
"version": obj.get("version"),
|
|
92
|
+
"operation": obj.get("operation")
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|