databricks-sdk 0.38.0__py3-none-any.whl → 0.39.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.
Potentially problematic release.
This version of databricks-sdk might be problematic. Click here for more details.
- databricks/sdk/__init__.py +21 -0
- databricks/sdk/mixins/open_ai_client.py +2 -2
- databricks/sdk/service/apps.py +175 -0
- databricks/sdk/service/billing.py +247 -0
- databricks/sdk/service/catalog.py +1794 -61
- databricks/sdk/service/cleanrooms.py +1281 -0
- databricks/sdk/service/compute.py +1486 -8
- databricks/sdk/service/dashboards.py +326 -1
- databricks/sdk/service/files.py +162 -2
- databricks/sdk/service/iam.py +351 -0
- databricks/sdk/service/jobs.py +1264 -8
- databricks/sdk/service/marketplace.py +688 -0
- databricks/sdk/service/ml.py +1038 -2
- databricks/sdk/service/oauth2.py +175 -0
- databricks/sdk/service/pipelines.py +520 -0
- databricks/sdk/service/provisioning.py +387 -0
- databricks/sdk/service/serving.py +615 -0
- databricks/sdk/service/settings.py +1186 -1
- databricks/sdk/service/sharing.py +326 -2
- databricks/sdk/service/sql.py +1186 -2
- databricks/sdk/service/vectorsearch.py +290 -0
- databricks/sdk/service/workspace.py +451 -0
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/METADATA +26 -26
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/RECORD +29 -28
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/WHEEL +1 -1
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.39.0.dist-info}/top_level.txt +0 -0
|
@@ -29,6 +29,12 @@ class ColumnInfo:
|
|
|
29
29
|
if self.name is not None: body['name'] = self.name
|
|
30
30
|
return body
|
|
31
31
|
|
|
32
|
+
def as_shallow_dict(self) -> dict:
|
|
33
|
+
"""Serializes the ColumnInfo into a shallow dictionary of its immediate attributes."""
|
|
34
|
+
body = {}
|
|
35
|
+
if self.name is not None: body['name'] = self.name
|
|
36
|
+
return body
|
|
37
|
+
|
|
32
38
|
@classmethod
|
|
33
39
|
def from_dict(cls, d: Dict[str, any]) -> ColumnInfo:
|
|
34
40
|
"""Deserializes the ColumnInfo from a dictionary."""
|
|
@@ -50,6 +56,13 @@ class CreateEndpoint:
|
|
|
50
56
|
if self.name is not None: body['name'] = self.name
|
|
51
57
|
return body
|
|
52
58
|
|
|
59
|
+
def as_shallow_dict(self) -> dict:
|
|
60
|
+
"""Serializes the CreateEndpoint into a shallow dictionary of its immediate attributes."""
|
|
61
|
+
body = {}
|
|
62
|
+
if self.endpoint_type is not None: body['endpoint_type'] = self.endpoint_type
|
|
63
|
+
if self.name is not None: body['name'] = self.name
|
|
64
|
+
return body
|
|
65
|
+
|
|
53
66
|
@classmethod
|
|
54
67
|
def from_dict(cls, d: Dict[str, any]) -> CreateEndpoint:
|
|
55
68
|
"""Deserializes the CreateEndpoint from a dictionary."""
|
|
@@ -93,6 +106,17 @@ class CreateVectorIndexRequest:
|
|
|
93
106
|
if self.primary_key is not None: body['primary_key'] = self.primary_key
|
|
94
107
|
return body
|
|
95
108
|
|
|
109
|
+
def as_shallow_dict(self) -> dict:
|
|
110
|
+
"""Serializes the CreateVectorIndexRequest into a shallow dictionary of its immediate attributes."""
|
|
111
|
+
body = {}
|
|
112
|
+
if self.delta_sync_index_spec: body['delta_sync_index_spec'] = self.delta_sync_index_spec
|
|
113
|
+
if self.direct_access_index_spec: body['direct_access_index_spec'] = self.direct_access_index_spec
|
|
114
|
+
if self.endpoint_name is not None: body['endpoint_name'] = self.endpoint_name
|
|
115
|
+
if self.index_type is not None: body['index_type'] = self.index_type
|
|
116
|
+
if self.name is not None: body['name'] = self.name
|
|
117
|
+
if self.primary_key is not None: body['primary_key'] = self.primary_key
|
|
118
|
+
return body
|
|
119
|
+
|
|
96
120
|
@classmethod
|
|
97
121
|
def from_dict(cls, d: Dict[str, any]) -> CreateVectorIndexRequest:
|
|
98
122
|
"""Deserializes the CreateVectorIndexRequest from a dictionary."""
|
|
@@ -116,6 +140,12 @@ class CreateVectorIndexResponse:
|
|
|
116
140
|
if self.vector_index: body['vector_index'] = self.vector_index.as_dict()
|
|
117
141
|
return body
|
|
118
142
|
|
|
143
|
+
def as_shallow_dict(self) -> dict:
|
|
144
|
+
"""Serializes the CreateVectorIndexResponse into a shallow dictionary of its immediate attributes."""
|
|
145
|
+
body = {}
|
|
146
|
+
if self.vector_index: body['vector_index'] = self.vector_index
|
|
147
|
+
return body
|
|
148
|
+
|
|
119
149
|
@classmethod
|
|
120
150
|
def from_dict(cls, d: Dict[str, any]) -> CreateVectorIndexResponse:
|
|
121
151
|
"""Deserializes the CreateVectorIndexResponse from a dictionary."""
|
|
@@ -139,6 +169,13 @@ class DeleteDataResult:
|
|
|
139
169
|
if self.success_row_count is not None: body['success_row_count'] = self.success_row_count
|
|
140
170
|
return body
|
|
141
171
|
|
|
172
|
+
def as_shallow_dict(self) -> dict:
|
|
173
|
+
"""Serializes the DeleteDataResult into a shallow dictionary of its immediate attributes."""
|
|
174
|
+
body = {}
|
|
175
|
+
if self.failed_primary_keys: body['failed_primary_keys'] = self.failed_primary_keys
|
|
176
|
+
if self.success_row_count is not None: body['success_row_count'] = self.success_row_count
|
|
177
|
+
return body
|
|
178
|
+
|
|
142
179
|
@classmethod
|
|
143
180
|
def from_dict(cls, d: Dict[str, any]) -> DeleteDataResult:
|
|
144
181
|
"""Deserializes the DeleteDataResult from a dictionary."""
|
|
@@ -171,6 +208,13 @@ class DeleteDataVectorIndexRequest:
|
|
|
171
208
|
if self.primary_keys: body['primary_keys'] = [v for v in self.primary_keys]
|
|
172
209
|
return body
|
|
173
210
|
|
|
211
|
+
def as_shallow_dict(self) -> dict:
|
|
212
|
+
"""Serializes the DeleteDataVectorIndexRequest into a shallow dictionary of its immediate attributes."""
|
|
213
|
+
body = {}
|
|
214
|
+
if self.index_name is not None: body['index_name'] = self.index_name
|
|
215
|
+
if self.primary_keys: body['primary_keys'] = self.primary_keys
|
|
216
|
+
return body
|
|
217
|
+
|
|
174
218
|
@classmethod
|
|
175
219
|
def from_dict(cls, d: Dict[str, any]) -> DeleteDataVectorIndexRequest:
|
|
176
220
|
"""Deserializes the DeleteDataVectorIndexRequest from a dictionary."""
|
|
@@ -194,6 +238,13 @@ class DeleteDataVectorIndexResponse:
|
|
|
194
238
|
if self.status is not None: body['status'] = self.status.value
|
|
195
239
|
return body
|
|
196
240
|
|
|
241
|
+
def as_shallow_dict(self) -> dict:
|
|
242
|
+
"""Serializes the DeleteDataVectorIndexResponse into a shallow dictionary of its immediate attributes."""
|
|
243
|
+
body = {}
|
|
244
|
+
if self.result: body['result'] = self.result
|
|
245
|
+
if self.status is not None: body['status'] = self.status
|
|
246
|
+
return body
|
|
247
|
+
|
|
197
248
|
@classmethod
|
|
198
249
|
def from_dict(cls, d: Dict[str, any]) -> DeleteDataVectorIndexResponse:
|
|
199
250
|
"""Deserializes the DeleteDataVectorIndexResponse from a dictionary."""
|
|
@@ -209,6 +260,11 @@ class DeleteEndpointResponse:
|
|
|
209
260
|
body = {}
|
|
210
261
|
return body
|
|
211
262
|
|
|
263
|
+
def as_shallow_dict(self) -> dict:
|
|
264
|
+
"""Serializes the DeleteEndpointResponse into a shallow dictionary of its immediate attributes."""
|
|
265
|
+
body = {}
|
|
266
|
+
return body
|
|
267
|
+
|
|
212
268
|
@classmethod
|
|
213
269
|
def from_dict(cls, d: Dict[str, any]) -> DeleteEndpointResponse:
|
|
214
270
|
"""Deserializes the DeleteEndpointResponse from a dictionary."""
|
|
@@ -223,6 +279,11 @@ class DeleteIndexResponse:
|
|
|
223
279
|
body = {}
|
|
224
280
|
return body
|
|
225
281
|
|
|
282
|
+
def as_shallow_dict(self) -> dict:
|
|
283
|
+
"""Serializes the DeleteIndexResponse into a shallow dictionary of its immediate attributes."""
|
|
284
|
+
body = {}
|
|
285
|
+
return body
|
|
286
|
+
|
|
226
287
|
@classmethod
|
|
227
288
|
def from_dict(cls, d: Dict[str, any]) -> DeleteIndexResponse:
|
|
228
289
|
"""Deserializes the DeleteIndexResponse from a dictionary."""
|
|
@@ -272,6 +333,18 @@ class DeltaSyncVectorIndexSpecRequest:
|
|
|
272
333
|
if self.source_table is not None: body['source_table'] = self.source_table
|
|
273
334
|
return body
|
|
274
335
|
|
|
336
|
+
def as_shallow_dict(self) -> dict:
|
|
337
|
+
"""Serializes the DeltaSyncVectorIndexSpecRequest into a shallow dictionary of its immediate attributes."""
|
|
338
|
+
body = {}
|
|
339
|
+
if self.columns_to_sync: body['columns_to_sync'] = self.columns_to_sync
|
|
340
|
+
if self.embedding_source_columns: body['embedding_source_columns'] = self.embedding_source_columns
|
|
341
|
+
if self.embedding_vector_columns: body['embedding_vector_columns'] = self.embedding_vector_columns
|
|
342
|
+
if self.embedding_writeback_table is not None:
|
|
343
|
+
body['embedding_writeback_table'] = self.embedding_writeback_table
|
|
344
|
+
if self.pipeline_type is not None: body['pipeline_type'] = self.pipeline_type
|
|
345
|
+
if self.source_table is not None: body['source_table'] = self.source_table
|
|
346
|
+
return body
|
|
347
|
+
|
|
275
348
|
@classmethod
|
|
276
349
|
def from_dict(cls, d: Dict[str, any]) -> DeltaSyncVectorIndexSpecRequest:
|
|
277
350
|
"""Deserializes the DeltaSyncVectorIndexSpecRequest from a dictionary."""
|
|
@@ -325,6 +398,18 @@ class DeltaSyncVectorIndexSpecResponse:
|
|
|
325
398
|
if self.source_table is not None: body['source_table'] = self.source_table
|
|
326
399
|
return body
|
|
327
400
|
|
|
401
|
+
def as_shallow_dict(self) -> dict:
|
|
402
|
+
"""Serializes the DeltaSyncVectorIndexSpecResponse into a shallow dictionary of its immediate attributes."""
|
|
403
|
+
body = {}
|
|
404
|
+
if self.embedding_source_columns: body['embedding_source_columns'] = self.embedding_source_columns
|
|
405
|
+
if self.embedding_vector_columns: body['embedding_vector_columns'] = self.embedding_vector_columns
|
|
406
|
+
if self.embedding_writeback_table is not None:
|
|
407
|
+
body['embedding_writeback_table'] = self.embedding_writeback_table
|
|
408
|
+
if self.pipeline_id is not None: body['pipeline_id'] = self.pipeline_id
|
|
409
|
+
if self.pipeline_type is not None: body['pipeline_type'] = self.pipeline_type
|
|
410
|
+
if self.source_table is not None: body['source_table'] = self.source_table
|
|
411
|
+
return body
|
|
412
|
+
|
|
328
413
|
@classmethod
|
|
329
414
|
def from_dict(cls, d: Dict[str, any]) -> DeltaSyncVectorIndexSpecResponse:
|
|
330
415
|
"""Deserializes the DeltaSyncVectorIndexSpecResponse from a dictionary."""
|
|
@@ -363,6 +448,14 @@ class DirectAccessVectorIndexSpec:
|
|
|
363
448
|
if self.schema_json is not None: body['schema_json'] = self.schema_json
|
|
364
449
|
return body
|
|
365
450
|
|
|
451
|
+
def as_shallow_dict(self) -> dict:
|
|
452
|
+
"""Serializes the DirectAccessVectorIndexSpec into a shallow dictionary of its immediate attributes."""
|
|
453
|
+
body = {}
|
|
454
|
+
if self.embedding_source_columns: body['embedding_source_columns'] = self.embedding_source_columns
|
|
455
|
+
if self.embedding_vector_columns: body['embedding_vector_columns'] = self.embedding_vector_columns
|
|
456
|
+
if self.schema_json is not None: body['schema_json'] = self.schema_json
|
|
457
|
+
return body
|
|
458
|
+
|
|
366
459
|
@classmethod
|
|
367
460
|
def from_dict(cls, d: Dict[str, any]) -> DirectAccessVectorIndexSpec:
|
|
368
461
|
"""Deserializes the DirectAccessVectorIndexSpec from a dictionary."""
|
|
@@ -389,6 +482,14 @@ class EmbeddingSourceColumn:
|
|
|
389
482
|
if self.name is not None: body['name'] = self.name
|
|
390
483
|
return body
|
|
391
484
|
|
|
485
|
+
def as_shallow_dict(self) -> dict:
|
|
486
|
+
"""Serializes the EmbeddingSourceColumn into a shallow dictionary of its immediate attributes."""
|
|
487
|
+
body = {}
|
|
488
|
+
if self.embedding_model_endpoint_name is not None:
|
|
489
|
+
body['embedding_model_endpoint_name'] = self.embedding_model_endpoint_name
|
|
490
|
+
if self.name is not None: body['name'] = self.name
|
|
491
|
+
return body
|
|
492
|
+
|
|
392
493
|
@classmethod
|
|
393
494
|
def from_dict(cls, d: Dict[str, any]) -> EmbeddingSourceColumn:
|
|
394
495
|
"""Deserializes the EmbeddingSourceColumn from a dictionary."""
|
|
@@ -411,6 +512,13 @@ class EmbeddingVectorColumn:
|
|
|
411
512
|
if self.name is not None: body['name'] = self.name
|
|
412
513
|
return body
|
|
413
514
|
|
|
515
|
+
def as_shallow_dict(self) -> dict:
|
|
516
|
+
"""Serializes the EmbeddingVectorColumn into a shallow dictionary of its immediate attributes."""
|
|
517
|
+
body = {}
|
|
518
|
+
if self.embedding_dimension is not None: body['embedding_dimension'] = self.embedding_dimension
|
|
519
|
+
if self.name is not None: body['name'] = self.name
|
|
520
|
+
return body
|
|
521
|
+
|
|
414
522
|
@classmethod
|
|
415
523
|
def from_dict(cls, d: Dict[str, any]) -> EmbeddingVectorColumn:
|
|
416
524
|
"""Deserializes the EmbeddingVectorColumn from a dictionary."""
|
|
@@ -461,6 +569,21 @@ class EndpointInfo:
|
|
|
461
569
|
if self.num_indexes is not None: body['num_indexes'] = self.num_indexes
|
|
462
570
|
return body
|
|
463
571
|
|
|
572
|
+
def as_shallow_dict(self) -> dict:
|
|
573
|
+
"""Serializes the EndpointInfo into a shallow dictionary of its immediate attributes."""
|
|
574
|
+
body = {}
|
|
575
|
+
if self.creation_timestamp is not None: body['creation_timestamp'] = self.creation_timestamp
|
|
576
|
+
if self.creator is not None: body['creator'] = self.creator
|
|
577
|
+
if self.endpoint_status: body['endpoint_status'] = self.endpoint_status
|
|
578
|
+
if self.endpoint_type is not None: body['endpoint_type'] = self.endpoint_type
|
|
579
|
+
if self.id is not None: body['id'] = self.id
|
|
580
|
+
if self.last_updated_timestamp is not None:
|
|
581
|
+
body['last_updated_timestamp'] = self.last_updated_timestamp
|
|
582
|
+
if self.last_updated_user is not None: body['last_updated_user'] = self.last_updated_user
|
|
583
|
+
if self.name is not None: body['name'] = self.name
|
|
584
|
+
if self.num_indexes is not None: body['num_indexes'] = self.num_indexes
|
|
585
|
+
return body
|
|
586
|
+
|
|
464
587
|
@classmethod
|
|
465
588
|
def from_dict(cls, d: Dict[str, any]) -> EndpointInfo:
|
|
466
589
|
"""Deserializes the EndpointInfo from a dictionary."""
|
|
@@ -492,6 +615,13 @@ class EndpointStatus:
|
|
|
492
615
|
if self.state is not None: body['state'] = self.state.value
|
|
493
616
|
return body
|
|
494
617
|
|
|
618
|
+
def as_shallow_dict(self) -> dict:
|
|
619
|
+
"""Serializes the EndpointStatus into a shallow dictionary of its immediate attributes."""
|
|
620
|
+
body = {}
|
|
621
|
+
if self.message is not None: body['message'] = self.message
|
|
622
|
+
if self.state is not None: body['state'] = self.state
|
|
623
|
+
return body
|
|
624
|
+
|
|
495
625
|
@classmethod
|
|
496
626
|
def from_dict(cls, d: Dict[str, any]) -> EndpointStatus:
|
|
497
627
|
"""Deserializes the EndpointStatus from a dictionary."""
|
|
@@ -528,6 +658,13 @@ class ListEndpointResponse:
|
|
|
528
658
|
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
529
659
|
return body
|
|
530
660
|
|
|
661
|
+
def as_shallow_dict(self) -> dict:
|
|
662
|
+
"""Serializes the ListEndpointResponse into a shallow dictionary of its immediate attributes."""
|
|
663
|
+
body = {}
|
|
664
|
+
if self.endpoints: body['endpoints'] = self.endpoints
|
|
665
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
666
|
+
return body
|
|
667
|
+
|
|
531
668
|
@classmethod
|
|
532
669
|
def from_dict(cls, d: Dict[str, any]) -> ListEndpointResponse:
|
|
533
670
|
"""Deserializes the ListEndpointResponse from a dictionary."""
|
|
@@ -545,6 +682,12 @@ class ListValue:
|
|
|
545
682
|
if self.values: body['values'] = [v.as_dict() for v in self.values]
|
|
546
683
|
return body
|
|
547
684
|
|
|
685
|
+
def as_shallow_dict(self) -> dict:
|
|
686
|
+
"""Serializes the ListValue into a shallow dictionary of its immediate attributes."""
|
|
687
|
+
body = {}
|
|
688
|
+
if self.values: body['values'] = self.values
|
|
689
|
+
return body
|
|
690
|
+
|
|
548
691
|
@classmethod
|
|
549
692
|
def from_dict(cls, d: Dict[str, any]) -> ListValue:
|
|
550
693
|
"""Deserializes the ListValue from a dictionary."""
|
|
@@ -566,6 +709,13 @@ class ListVectorIndexesResponse:
|
|
|
566
709
|
if self.vector_indexes: body['vector_indexes'] = [v.as_dict() for v in self.vector_indexes]
|
|
567
710
|
return body
|
|
568
711
|
|
|
712
|
+
def as_shallow_dict(self) -> dict:
|
|
713
|
+
"""Serializes the ListVectorIndexesResponse into a shallow dictionary of its immediate attributes."""
|
|
714
|
+
body = {}
|
|
715
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
716
|
+
if self.vector_indexes: body['vector_indexes'] = self.vector_indexes
|
|
717
|
+
return body
|
|
718
|
+
|
|
569
719
|
@classmethod
|
|
570
720
|
def from_dict(cls, d: Dict[str, any]) -> ListVectorIndexesResponse:
|
|
571
721
|
"""Deserializes the ListVectorIndexesResponse from a dictionary."""
|
|
@@ -590,6 +740,13 @@ class MapStringValueEntry:
|
|
|
590
740
|
if self.value: body['value'] = self.value.as_dict()
|
|
591
741
|
return body
|
|
592
742
|
|
|
743
|
+
def as_shallow_dict(self) -> dict:
|
|
744
|
+
"""Serializes the MapStringValueEntry into a shallow dictionary of its immediate attributes."""
|
|
745
|
+
body = {}
|
|
746
|
+
if self.key is not None: body['key'] = self.key
|
|
747
|
+
if self.value: body['value'] = self.value
|
|
748
|
+
return body
|
|
749
|
+
|
|
593
750
|
@classmethod
|
|
594
751
|
def from_dict(cls, d: Dict[str, any]) -> MapStringValueEntry:
|
|
595
752
|
"""Deserializes the MapStringValueEntry from a dictionary."""
|
|
@@ -628,6 +785,16 @@ class MiniVectorIndex:
|
|
|
628
785
|
if self.primary_key is not None: body['primary_key'] = self.primary_key
|
|
629
786
|
return body
|
|
630
787
|
|
|
788
|
+
def as_shallow_dict(self) -> dict:
|
|
789
|
+
"""Serializes the MiniVectorIndex into a shallow dictionary of its immediate attributes."""
|
|
790
|
+
body = {}
|
|
791
|
+
if self.creator is not None: body['creator'] = self.creator
|
|
792
|
+
if self.endpoint_name is not None: body['endpoint_name'] = self.endpoint_name
|
|
793
|
+
if self.index_type is not None: body['index_type'] = self.index_type
|
|
794
|
+
if self.name is not None: body['name'] = self.name
|
|
795
|
+
if self.primary_key is not None: body['primary_key'] = self.primary_key
|
|
796
|
+
return body
|
|
797
|
+
|
|
631
798
|
@classmethod
|
|
632
799
|
def from_dict(cls, d: Dict[str, any]) -> MiniVectorIndex:
|
|
633
800
|
"""Deserializes the MiniVectorIndex from a dictionary."""
|
|
@@ -672,6 +839,14 @@ class QueryVectorIndexNextPageRequest:
|
|
|
672
839
|
if self.page_token is not None: body['page_token'] = self.page_token
|
|
673
840
|
return body
|
|
674
841
|
|
|
842
|
+
def as_shallow_dict(self) -> dict:
|
|
843
|
+
"""Serializes the QueryVectorIndexNextPageRequest into a shallow dictionary of its immediate attributes."""
|
|
844
|
+
body = {}
|
|
845
|
+
if self.endpoint_name is not None: body['endpoint_name'] = self.endpoint_name
|
|
846
|
+
if self.index_name is not None: body['index_name'] = self.index_name
|
|
847
|
+
if self.page_token is not None: body['page_token'] = self.page_token
|
|
848
|
+
return body
|
|
849
|
+
|
|
675
850
|
@classmethod
|
|
676
851
|
def from_dict(cls, d: Dict[str, any]) -> QueryVectorIndexNextPageRequest:
|
|
677
852
|
"""Deserializes the QueryVectorIndexNextPageRequest from a dictionary."""
|
|
@@ -724,6 +899,19 @@ class QueryVectorIndexRequest:
|
|
|
724
899
|
if self.score_threshold is not None: body['score_threshold'] = self.score_threshold
|
|
725
900
|
return body
|
|
726
901
|
|
|
902
|
+
def as_shallow_dict(self) -> dict:
|
|
903
|
+
"""Serializes the QueryVectorIndexRequest into a shallow dictionary of its immediate attributes."""
|
|
904
|
+
body = {}
|
|
905
|
+
if self.columns: body['columns'] = self.columns
|
|
906
|
+
if self.filters_json is not None: body['filters_json'] = self.filters_json
|
|
907
|
+
if self.index_name is not None: body['index_name'] = self.index_name
|
|
908
|
+
if self.num_results is not None: body['num_results'] = self.num_results
|
|
909
|
+
if self.query_text is not None: body['query_text'] = self.query_text
|
|
910
|
+
if self.query_type is not None: body['query_type'] = self.query_type
|
|
911
|
+
if self.query_vector: body['query_vector'] = self.query_vector
|
|
912
|
+
if self.score_threshold is not None: body['score_threshold'] = self.score_threshold
|
|
913
|
+
return body
|
|
914
|
+
|
|
727
915
|
@classmethod
|
|
728
916
|
def from_dict(cls, d: Dict[str, any]) -> QueryVectorIndexRequest:
|
|
729
917
|
"""Deserializes the QueryVectorIndexRequest from a dictionary."""
|
|
@@ -758,6 +946,14 @@ class QueryVectorIndexResponse:
|
|
|
758
946
|
if self.result: body['result'] = self.result.as_dict()
|
|
759
947
|
return body
|
|
760
948
|
|
|
949
|
+
def as_shallow_dict(self) -> dict:
|
|
950
|
+
"""Serializes the QueryVectorIndexResponse into a shallow dictionary of its immediate attributes."""
|
|
951
|
+
body = {}
|
|
952
|
+
if self.manifest: body['manifest'] = self.manifest
|
|
953
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
954
|
+
if self.result: body['result'] = self.result
|
|
955
|
+
return body
|
|
956
|
+
|
|
761
957
|
@classmethod
|
|
762
958
|
def from_dict(cls, d: Dict[str, any]) -> QueryVectorIndexResponse:
|
|
763
959
|
"""Deserializes the QueryVectorIndexResponse from a dictionary."""
|
|
@@ -783,6 +979,13 @@ class ResultData:
|
|
|
783
979
|
if self.row_count is not None: body['row_count'] = self.row_count
|
|
784
980
|
return body
|
|
785
981
|
|
|
982
|
+
def as_shallow_dict(self) -> dict:
|
|
983
|
+
"""Serializes the ResultData into a shallow dictionary of its immediate attributes."""
|
|
984
|
+
body = {}
|
|
985
|
+
if self.data_array: body['data_array'] = self.data_array
|
|
986
|
+
if self.row_count is not None: body['row_count'] = self.row_count
|
|
987
|
+
return body
|
|
988
|
+
|
|
786
989
|
@classmethod
|
|
787
990
|
def from_dict(cls, d: Dict[str, any]) -> ResultData:
|
|
788
991
|
"""Deserializes the ResultData from a dictionary."""
|
|
@@ -806,6 +1009,13 @@ class ResultManifest:
|
|
|
806
1009
|
if self.columns: body['columns'] = [v.as_dict() for v in self.columns]
|
|
807
1010
|
return body
|
|
808
1011
|
|
|
1012
|
+
def as_shallow_dict(self) -> dict:
|
|
1013
|
+
"""Serializes the ResultManifest into a shallow dictionary of its immediate attributes."""
|
|
1014
|
+
body = {}
|
|
1015
|
+
if self.column_count is not None: body['column_count'] = self.column_count
|
|
1016
|
+
if self.columns: body['columns'] = self.columns
|
|
1017
|
+
return body
|
|
1018
|
+
|
|
809
1019
|
@classmethod
|
|
810
1020
|
def from_dict(cls, d: Dict[str, any]) -> ResultManifest:
|
|
811
1021
|
"""Deserializes the ResultManifest from a dictionary."""
|
|
@@ -833,6 +1043,14 @@ class ScanVectorIndexRequest:
|
|
|
833
1043
|
if self.num_results is not None: body['num_results'] = self.num_results
|
|
834
1044
|
return body
|
|
835
1045
|
|
|
1046
|
+
def as_shallow_dict(self) -> dict:
|
|
1047
|
+
"""Serializes the ScanVectorIndexRequest into a shallow dictionary of its immediate attributes."""
|
|
1048
|
+
body = {}
|
|
1049
|
+
if self.index_name is not None: body['index_name'] = self.index_name
|
|
1050
|
+
if self.last_primary_key is not None: body['last_primary_key'] = self.last_primary_key
|
|
1051
|
+
if self.num_results is not None: body['num_results'] = self.num_results
|
|
1052
|
+
return body
|
|
1053
|
+
|
|
836
1054
|
@classmethod
|
|
837
1055
|
def from_dict(cls, d: Dict[str, any]) -> ScanVectorIndexRequest:
|
|
838
1056
|
"""Deserializes the ScanVectorIndexRequest from a dictionary."""
|
|
@@ -858,6 +1076,13 @@ class ScanVectorIndexResponse:
|
|
|
858
1076
|
if self.last_primary_key is not None: body['last_primary_key'] = self.last_primary_key
|
|
859
1077
|
return body
|
|
860
1078
|
|
|
1079
|
+
def as_shallow_dict(self) -> dict:
|
|
1080
|
+
"""Serializes the ScanVectorIndexResponse into a shallow dictionary of its immediate attributes."""
|
|
1081
|
+
body = {}
|
|
1082
|
+
if self.data: body['data'] = self.data
|
|
1083
|
+
if self.last_primary_key is not None: body['last_primary_key'] = self.last_primary_key
|
|
1084
|
+
return body
|
|
1085
|
+
|
|
861
1086
|
@classmethod
|
|
862
1087
|
def from_dict(cls, d: Dict[str, any]) -> ScanVectorIndexResponse:
|
|
863
1088
|
"""Deserializes the ScanVectorIndexResponse from a dictionary."""
|
|
@@ -875,6 +1100,12 @@ class Struct:
|
|
|
875
1100
|
if self.fields: body['fields'] = [v.as_dict() for v in self.fields]
|
|
876
1101
|
return body
|
|
877
1102
|
|
|
1103
|
+
def as_shallow_dict(self) -> dict:
|
|
1104
|
+
"""Serializes the Struct into a shallow dictionary of its immediate attributes."""
|
|
1105
|
+
body = {}
|
|
1106
|
+
if self.fields: body['fields'] = self.fields
|
|
1107
|
+
return body
|
|
1108
|
+
|
|
878
1109
|
@classmethod
|
|
879
1110
|
def from_dict(cls, d: Dict[str, any]) -> Struct:
|
|
880
1111
|
"""Deserializes the Struct from a dictionary."""
|
|
@@ -889,6 +1120,11 @@ class SyncIndexResponse:
|
|
|
889
1120
|
body = {}
|
|
890
1121
|
return body
|
|
891
1122
|
|
|
1123
|
+
def as_shallow_dict(self) -> dict:
|
|
1124
|
+
"""Serializes the SyncIndexResponse into a shallow dictionary of its immediate attributes."""
|
|
1125
|
+
body = {}
|
|
1126
|
+
return body
|
|
1127
|
+
|
|
892
1128
|
@classmethod
|
|
893
1129
|
def from_dict(cls, d: Dict[str, any]) -> SyncIndexResponse:
|
|
894
1130
|
"""Deserializes the SyncIndexResponse from a dictionary."""
|
|
@@ -912,6 +1148,13 @@ class UpsertDataResult:
|
|
|
912
1148
|
if self.success_row_count is not None: body['success_row_count'] = self.success_row_count
|
|
913
1149
|
return body
|
|
914
1150
|
|
|
1151
|
+
def as_shallow_dict(self) -> dict:
|
|
1152
|
+
"""Serializes the UpsertDataResult into a shallow dictionary of its immediate attributes."""
|
|
1153
|
+
body = {}
|
|
1154
|
+
if self.failed_primary_keys: body['failed_primary_keys'] = self.failed_primary_keys
|
|
1155
|
+
if self.success_row_count is not None: body['success_row_count'] = self.success_row_count
|
|
1156
|
+
return body
|
|
1157
|
+
|
|
915
1158
|
@classmethod
|
|
916
1159
|
def from_dict(cls, d: Dict[str, any]) -> UpsertDataResult:
|
|
917
1160
|
"""Deserializes the UpsertDataResult from a dictionary."""
|
|
@@ -944,6 +1187,13 @@ class UpsertDataVectorIndexRequest:
|
|
|
944
1187
|
if self.inputs_json is not None: body['inputs_json'] = self.inputs_json
|
|
945
1188
|
return body
|
|
946
1189
|
|
|
1190
|
+
def as_shallow_dict(self) -> dict:
|
|
1191
|
+
"""Serializes the UpsertDataVectorIndexRequest into a shallow dictionary of its immediate attributes."""
|
|
1192
|
+
body = {}
|
|
1193
|
+
if self.index_name is not None: body['index_name'] = self.index_name
|
|
1194
|
+
if self.inputs_json is not None: body['inputs_json'] = self.inputs_json
|
|
1195
|
+
return body
|
|
1196
|
+
|
|
947
1197
|
@classmethod
|
|
948
1198
|
def from_dict(cls, d: Dict[str, any]) -> UpsertDataVectorIndexRequest:
|
|
949
1199
|
"""Deserializes the UpsertDataVectorIndexRequest from a dictionary."""
|
|
@@ -967,6 +1217,13 @@ class UpsertDataVectorIndexResponse:
|
|
|
967
1217
|
if self.status is not None: body['status'] = self.status.value
|
|
968
1218
|
return body
|
|
969
1219
|
|
|
1220
|
+
def as_shallow_dict(self) -> dict:
|
|
1221
|
+
"""Serializes the UpsertDataVectorIndexResponse into a shallow dictionary of its immediate attributes."""
|
|
1222
|
+
body = {}
|
|
1223
|
+
if self.result: body['result'] = self.result
|
|
1224
|
+
if self.status is not None: body['status'] = self.status
|
|
1225
|
+
return body
|
|
1226
|
+
|
|
970
1227
|
@classmethod
|
|
971
1228
|
def from_dict(cls, d: Dict[str, any]) -> UpsertDataVectorIndexResponse:
|
|
972
1229
|
"""Deserializes the UpsertDataVectorIndexResponse from a dictionary."""
|
|
@@ -999,6 +1256,17 @@ class Value:
|
|
|
999
1256
|
if self.struct_value: body['struct_value'] = self.struct_value.as_dict()
|
|
1000
1257
|
return body
|
|
1001
1258
|
|
|
1259
|
+
def as_shallow_dict(self) -> dict:
|
|
1260
|
+
"""Serializes the Value into a shallow dictionary of its immediate attributes."""
|
|
1261
|
+
body = {}
|
|
1262
|
+
if self.bool_value is not None: body['bool_value'] = self.bool_value
|
|
1263
|
+
if self.list_value: body['list_value'] = self.list_value
|
|
1264
|
+
if self.null_value is not None: body['null_value'] = self.null_value
|
|
1265
|
+
if self.number_value is not None: body['number_value'] = self.number_value
|
|
1266
|
+
if self.string_value is not None: body['string_value'] = self.string_value
|
|
1267
|
+
if self.struct_value: body['struct_value'] = self.struct_value
|
|
1268
|
+
return body
|
|
1269
|
+
|
|
1002
1270
|
@classmethod
|
|
1003
1271
|
def from_dict(cls, d: Dict[str, any]) -> Value:
|
|
1004
1272
|
"""Deserializes the Value from a dictionary."""
|
|
@@ -1052,6 +1320,19 @@ class VectorIndex:
|
|
|
1052
1320
|
if self.status: body['status'] = self.status.as_dict()
|
|
1053
1321
|
return body
|
|
1054
1322
|
|
|
1323
|
+
def as_shallow_dict(self) -> dict:
|
|
1324
|
+
"""Serializes the VectorIndex into a shallow dictionary of its immediate attributes."""
|
|
1325
|
+
body = {}
|
|
1326
|
+
if self.creator is not None: body['creator'] = self.creator
|
|
1327
|
+
if self.delta_sync_index_spec: body['delta_sync_index_spec'] = self.delta_sync_index_spec
|
|
1328
|
+
if self.direct_access_index_spec: body['direct_access_index_spec'] = self.direct_access_index_spec
|
|
1329
|
+
if self.endpoint_name is not None: body['endpoint_name'] = self.endpoint_name
|
|
1330
|
+
if self.index_type is not None: body['index_type'] = self.index_type
|
|
1331
|
+
if self.name is not None: body['name'] = self.name
|
|
1332
|
+
if self.primary_key is not None: body['primary_key'] = self.primary_key
|
|
1333
|
+
if self.status: body['status'] = self.status
|
|
1334
|
+
return body
|
|
1335
|
+
|
|
1055
1336
|
@classmethod
|
|
1056
1337
|
def from_dict(cls, d: Dict[str, any]) -> VectorIndex:
|
|
1057
1338
|
"""Deserializes the VectorIndex from a dictionary."""
|
|
@@ -1090,6 +1371,15 @@ class VectorIndexStatus:
|
|
|
1090
1371
|
if self.ready is not None: body['ready'] = self.ready
|
|
1091
1372
|
return body
|
|
1092
1373
|
|
|
1374
|
+
def as_shallow_dict(self) -> dict:
|
|
1375
|
+
"""Serializes the VectorIndexStatus into a shallow dictionary of its immediate attributes."""
|
|
1376
|
+
body = {}
|
|
1377
|
+
if self.index_url is not None: body['index_url'] = self.index_url
|
|
1378
|
+
if self.indexed_row_count is not None: body['indexed_row_count'] = self.indexed_row_count
|
|
1379
|
+
if self.message is not None: body['message'] = self.message
|
|
1380
|
+
if self.ready is not None: body['ready'] = self.ready
|
|
1381
|
+
return body
|
|
1382
|
+
|
|
1093
1383
|
@classmethod
|
|
1094
1384
|
def from_dict(cls, d: Dict[str, any]) -> VectorIndexStatus:
|
|
1095
1385
|
"""Deserializes the VectorIndexStatus from a dictionary."""
|