38
38
build_connections_get_request ,
39
39
build_connections_get_with_credentials_request ,
40
40
build_connections_list_request ,
41
- build_datasets_create_version_request ,
41
+ build_datasets_create_or_update_version_request ,
42
42
build_datasets_delete_version_request ,
43
43
build_datasets_get_credentials_request ,
44
44
build_datasets_get_version_request ,
47
47
build_datasets_start_pending_upload_version_request ,
48
48
build_deployments_get_request ,
49
49
build_deployments_list_request ,
50
- build_evaluation_results_create_version_request ,
50
+ build_evaluation_results_create_or_update_version_request ,
51
51
build_evaluation_results_delete_version_request ,
52
52
build_evaluation_results_get_credentials_request ,
53
53
build_evaluation_results_get_version_request ,
62
62
build_evaluations_submit_annotation_request ,
63
63
build_evaluations_upload_run_request ,
64
64
build_evaluations_upload_update_run_request ,
65
- build_indexes_create_version_request ,
65
+ build_indexes_create_or_update_version_request ,
66
66
build_indexes_delete_version_request ,
67
67
build_indexes_get_version_request ,
68
68
build_indexes_list_latest_request ,
@@ -885,13 +885,13 @@ async def submit_annotation(
885
885
method_added_on = "2025-05-15-preview" ,
886
886
params_added_on = {"2025-05-15-preview" : ["api_version" , "operation_id" , "accept" ]},
887
887
)
888
- async def operation_results (self , operation_id : str , ** kwargs : Any ) -> Dict [str , Any ]:
888
+ async def operation_results (self , operation_id : str , ** kwargs : Any ) -> List [ Dict [str , Any ] ]:
889
889
"""Poll for the operation results.
890
890
891
891
:param operation_id: Operation ID for the polling operation. Required.
892
892
:type operation_id: str
893
- :return: dict mapping str to any
894
- :rtype: dict[str, any]
893
+ :return: list of dict mapping str to any
894
+ :rtype: list[ dict[str, any] ]
895
895
:raises ~azure.core.exceptions.HttpResponseError:
896
896
"""
897
897
error_map : MutableMapping = {
@@ -905,7 +905,7 @@ async def operation_results(self, operation_id: str, **kwargs: Any) -> Dict[str,
905
905
_headers = kwargs .pop ("headers" , {}) or {}
906
906
_params = kwargs .pop ("params" , {}) or {}
907
907
908
- cls : ClsType [Dict [str , Any ]] = kwargs .pop ("cls" , None )
908
+ cls : ClsType [List [ Dict [str , Any ] ]] = kwargs .pop ("cls" , None )
909
909
910
910
_request = build_evaluations_operation_results_request (
911
911
operation_id = operation_id ,
@@ -925,7 +925,7 @@ async def operation_results(self, operation_id: str, **kwargs: Any) -> Dict[str,
925
925
926
926
response = pipeline_response .http_response
927
927
928
- if response .status_code not in [202 ]:
928
+ if response .status_code not in [200 ]:
929
929
if _stream :
930
930
try :
931
931
await response .read () # Load the body in memory and close the socket
@@ -937,7 +937,7 @@ async def operation_results(self, operation_id: str, **kwargs: Any) -> Dict[str,
937
937
if _stream :
938
938
deserialized = response .iter_bytes ()
939
939
else :
940
- deserialized = _deserialize (Dict [str , Any ], response .json ())
940
+ deserialized = _deserialize (List [ Dict [str , Any ] ], response .json ())
941
941
942
942
if cls :
943
943
return cls (pipeline_response , deserialized , {}) # type: ignore
@@ -1550,7 +1550,7 @@ async def delete_version(self, name: str, version: str, **kwargs: Any) -> None:
1550
1550
return cls (pipeline_response , None , {}) # type: ignore
1551
1551
1552
1552
@overload
1553
- async def create_version (
1553
+ async def create_or_update_version (
1554
1554
self ,
1555
1555
name : str ,
1556
1556
version : str ,
@@ -1559,13 +1559,13 @@ async def create_version(
1559
1559
content_type : str = "application/json" ,
1560
1560
** kwargs : Any
1561
1561
) -> _models .DatasetVersion :
1562
- """Create a new or replace an existing DatasetVersion with the given version id.
1562
+ """Create a new or update an existing DatasetVersion with the given version id.
1563
1563
1564
1564
:param name: The name of the resource. Required.
1565
1565
:type name: str
1566
1566
:param version: The specific version id of the DatasetVersion to create or replace. Required.
1567
1567
:type version: str
1568
- :param body: The definition of the DatasetVersion to create. Required.
1568
+ :param body: The definition of the DatasetVersion to create or update . Required.
1569
1569
:type body: ~azure.ai.projects.onedp.models.DatasetVersion
1570
1570
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
1571
1571
Default value is "application/json".
@@ -1576,16 +1576,16 @@ async def create_version(
1576
1576
"""
1577
1577
1578
1578
@overload
1579
- async def create_version (
1579
+ async def create_or_update_version (
1580
1580
self , name : str , version : str , body : JSON , * , content_type : str = "application/json" , ** kwargs : Any
1581
1581
) -> _models .DatasetVersion :
1582
- """Create a new or replace an existing DatasetVersion with the given version id.
1582
+ """Create a new or update an existing DatasetVersion with the given version id.
1583
1583
1584
1584
:param name: The name of the resource. Required.
1585
1585
:type name: str
1586
1586
:param version: The specific version id of the DatasetVersion to create or replace. Required.
1587
1587
:type version: str
1588
- :param body: The definition of the DatasetVersion to create. Required.
1588
+ :param body: The definition of the DatasetVersion to create or update . Required.
1589
1589
:type body: JSON
1590
1590
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
1591
1591
Default value is "application/json".
@@ -1596,16 +1596,16 @@ async def create_version(
1596
1596
"""
1597
1597
1598
1598
@overload
1599
- async def create_version (
1599
+ async def create_or_update_version (
1600
1600
self , name : str , version : str , body : IO [bytes ], * , content_type : str = "application/json" , ** kwargs : Any
1601
1601
) -> _models .DatasetVersion :
1602
- """Create a new or replace an existing DatasetVersion with the given version id.
1602
+ """Create a new or update an existing DatasetVersion with the given version id.
1603
1603
1604
1604
:param name: The name of the resource. Required.
1605
1605
:type name: str
1606
1606
:param version: The specific version id of the DatasetVersion to create or replace. Required.
1607
1607
:type version: str
1608
- :param body: The definition of the DatasetVersion to create. Required.
1608
+ :param body: The definition of the DatasetVersion to create or update . Required.
1609
1609
:type body: IO[bytes]
1610
1610
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
1611
1611
Default value is "application/json".
@@ -1616,17 +1616,17 @@ async def create_version(
1616
1616
"""
1617
1617
1618
1618
@distributed_trace_async
1619
- async def create_version (
1619
+ async def create_or_update_version (
1620
1620
self , name : str , version : str , body : Union [_models .DatasetVersion , JSON , IO [bytes ]], ** kwargs : Any
1621
1621
) -> _models .DatasetVersion :
1622
- """Create a new or replace an existing DatasetVersion with the given version id.
1622
+ """Create a new or update an existing DatasetVersion with the given version id.
1623
1623
1624
1624
:param name: The name of the resource. Required.
1625
1625
:type name: str
1626
1626
:param version: The specific version id of the DatasetVersion to create or replace. Required.
1627
1627
:type version: str
1628
- :param body: The definition of the DatasetVersion to create. Is one of the following types:
1629
- DatasetVersion, JSON, IO[bytes] Required.
1628
+ :param body: The definition of the DatasetVersion to create or update . Is one of the following
1629
+ types: DatasetVersion, JSON, IO[bytes] Required.
1630
1630
:type body: ~azure.ai.projects.onedp.models.DatasetVersion or JSON or IO[bytes]
1631
1631
:return: DatasetVersion. The DatasetVersion is compatible with MutableMapping
1632
1632
:rtype: ~azure.ai.projects.onedp.models.DatasetVersion
@@ -1653,7 +1653,7 @@ async def create_version(
1653
1653
else :
1654
1654
_content = json .dumps (body , cls = SdkJSONEncoder , exclude_readonly = True ) # type: ignore
1655
1655
1656
- _request = build_datasets_create_version_request (
1656
+ _request = build_datasets_create_or_update_version_request (
1657
1657
name = name ,
1658
1658
version = version ,
1659
1659
content_type = content_type ,
@@ -2258,16 +2258,16 @@ async def delete_version(self, name: str, version: str, **kwargs: Any) -> None:
2258
2258
return cls (pipeline_response , None , {}) # type: ignore
2259
2259
2260
2260
@overload
2261
- async def create_version (
2261
+ async def create_or_update_version (
2262
2262
self , name : str , version : str , body : _models .Index , * , content_type : str = "application/json" , ** kwargs : Any
2263
2263
) -> _models .Index :
2264
- """Create a new or replace an existing Index with the given version id.
2264
+ """Create a new or update an existing Index with the given version id.
2265
2265
2266
2266
:param name: The name of the resource. Required.
2267
2267
:type name: str
2268
2268
:param version: The specific version id of the Index to create or replace. Required.
2269
2269
:type version: str
2270
- :param body: The definition of the Index to create. Required.
2270
+ :param body: The definition of the Index to create or update . Required.
2271
2271
:type body: ~azure.ai.projects.onedp.models.Index
2272
2272
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2273
2273
Default value is "application/json".
@@ -2278,16 +2278,16 @@ async def create_version(
2278
2278
"""
2279
2279
2280
2280
@overload
2281
- async def create_version (
2281
+ async def create_or_update_version (
2282
2282
self , name : str , version : str , body : JSON , * , content_type : str = "application/json" , ** kwargs : Any
2283
2283
) -> _models .Index :
2284
- """Create a new or replace an existing Index with the given version id.
2284
+ """Create a new or update an existing Index with the given version id.
2285
2285
2286
2286
:param name: The name of the resource. Required.
2287
2287
:type name: str
2288
2288
:param version: The specific version id of the Index to create or replace. Required.
2289
2289
:type version: str
2290
- :param body: The definition of the Index to create. Required.
2290
+ :param body: The definition of the Index to create or update . Required.
2291
2291
:type body: JSON
2292
2292
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2293
2293
Default value is "application/json".
@@ -2298,16 +2298,16 @@ async def create_version(
2298
2298
"""
2299
2299
2300
2300
@overload
2301
- async def create_version (
2301
+ async def create_or_update_version (
2302
2302
self , name : str , version : str , body : IO [bytes ], * , content_type : str = "application/json" , ** kwargs : Any
2303
2303
) -> _models .Index :
2304
- """Create a new or replace an existing Index with the given version id.
2304
+ """Create a new or update an existing Index with the given version id.
2305
2305
2306
2306
:param name: The name of the resource. Required.
2307
2307
:type name: str
2308
2308
:param version: The specific version id of the Index to create or replace. Required.
2309
2309
:type version: str
2310
- :param body: The definition of the Index to create. Required.
2310
+ :param body: The definition of the Index to create or update . Required.
2311
2311
:type body: IO[bytes]
2312
2312
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
2313
2313
Default value is "application/json".
@@ -2318,17 +2318,17 @@ async def create_version(
2318
2318
"""
2319
2319
2320
2320
@distributed_trace_async
2321
- async def create_version (
2321
+ async def create_or_update_version (
2322
2322
self , name : str , version : str , body : Union [_models .Index , JSON , IO [bytes ]], ** kwargs : Any
2323
2323
) -> _models .Index :
2324
- """Create a new or replace an existing Index with the given version id.
2324
+ """Create a new or update an existing Index with the given version id.
2325
2325
2326
2326
:param name: The name of the resource. Required.
2327
2327
:type name: str
2328
2328
:param version: The specific version id of the Index to create or replace. Required.
2329
2329
:type version: str
2330
- :param body: The definition of the Index to create. Is one of the following types: Index, JSON,
2331
- IO[bytes] Required.
2330
+ :param body: The definition of the Index to create or update . Is one of the following types:
2331
+ Index, JSON, IO[bytes] Required.
2332
2332
:type body: ~azure.ai.projects.onedp.models.Index or JSON or IO[bytes]
2333
2333
:return: Index. The Index is compatible with MutableMapping
2334
2334
:rtype: ~azure.ai.projects.onedp.models.Index
@@ -2355,7 +2355,7 @@ async def create_version(
2355
2355
else :
2356
2356
_content = json .dumps (body , cls = SdkJSONEncoder , exclude_readonly = True ) # type: ignore
2357
2357
2358
- _request = build_indexes_create_version_request (
2358
+ _request = build_indexes_create_or_update_version_request (
2359
2359
name = name ,
2360
2360
version = version ,
2361
2361
content_type = content_type ,
@@ -4032,7 +4032,7 @@ async def delete_version(self, name: str, version: str, **kwargs: Any) -> None:
4032
4032
return cls (pipeline_response , None , {}) # type: ignore
4033
4033
4034
4034
@overload
4035
- async def create_version (
4035
+ async def create_or_update_version (
4036
4036
self ,
4037
4037
name : str ,
4038
4038
version : str ,
@@ -4041,13 +4041,13 @@ async def create_version(
4041
4041
content_type : str = "application/json" ,
4042
4042
** kwargs : Any
4043
4043
) -> _models .EvaluationResult :
4044
- """Create a new or replace an existing EvaluationResult with the given version id.
4044
+ """Create a new or update an existing EvaluationResult with the given version id.
4045
4045
4046
4046
:param name: The name of the resource. Required.
4047
4047
:type name: str
4048
4048
:param version: The specific version id of the EvaluationResult to create or replace. Required.
4049
4049
:type version: str
4050
- :param body: The definition of the EvaluationResult to create. Required.
4050
+ :param body: The definition of the EvaluationResult to create or update . Required.
4051
4051
:type body: ~azure.ai.projects.onedp.models.EvaluationResult
4052
4052
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
4053
4053
Default value is "application/json".
@@ -4058,16 +4058,16 @@ async def create_version(
4058
4058
"""
4059
4059
4060
4060
@overload
4061
- async def create_version (
4061
+ async def create_or_update_version (
4062
4062
self , name : str , version : str , body : JSON , * , content_type : str = "application/json" , ** kwargs : Any
4063
4063
) -> _models .EvaluationResult :
4064
- """Create a new or replace an existing EvaluationResult with the given version id.
4064
+ """Create a new or update an existing EvaluationResult with the given version id.
4065
4065
4066
4066
:param name: The name of the resource. Required.
4067
4067
:type name: str
4068
4068
:param version: The specific version id of the EvaluationResult to create or replace. Required.
4069
4069
:type version: str
4070
- :param body: The definition of the EvaluationResult to create. Required.
4070
+ :param body: The definition of the EvaluationResult to create or update . Required.
4071
4071
:type body: JSON
4072
4072
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
4073
4073
Default value is "application/json".
@@ -4078,16 +4078,16 @@ async def create_version(
4078
4078
"""
4079
4079
4080
4080
@overload
4081
- async def create_version (
4081
+ async def create_or_update_version (
4082
4082
self , name : str , version : str , body : IO [bytes ], * , content_type : str = "application/json" , ** kwargs : Any
4083
4083
) -> _models .EvaluationResult :
4084
- """Create a new or replace an existing EvaluationResult with the given version id.
4084
+ """Create a new or update an existing EvaluationResult with the given version id.
4085
4085
4086
4086
:param name: The name of the resource. Required.
4087
4087
:type name: str
4088
4088
:param version: The specific version id of the EvaluationResult to create or replace. Required.
4089
4089
:type version: str
4090
- :param body: The definition of the EvaluationResult to create. Required.
4090
+ :param body: The definition of the EvaluationResult to create or update . Required.
4091
4091
:type body: IO[bytes]
4092
4092
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
4093
4093
Default value is "application/json".
@@ -4102,17 +4102,17 @@ async def create_version(
4102
4102
method_added_on = "2025-05-15-preview" ,
4103
4103
params_added_on = {"2025-05-15-preview" : ["api_version" , "name" , "version" , "content_type" , "accept" ]},
4104
4104
)
4105
- async def create_version (
4105
+ async def create_or_update_version (
4106
4106
self , name : str , version : str , body : Union [_models .EvaluationResult , JSON , IO [bytes ]], ** kwargs : Any
4107
4107
) -> _models .EvaluationResult :
4108
- """Create a new or replace an existing EvaluationResult with the given version id.
4108
+ """Create a new or update an existing EvaluationResult with the given version id.
4109
4109
4110
4110
:param name: The name of the resource. Required.
4111
4111
:type name: str
4112
4112
:param version: The specific version id of the EvaluationResult to create or replace. Required.
4113
4113
:type version: str
4114
- :param body: The definition of the EvaluationResult to create. Is one of the following types:
4115
- EvaluationResult, JSON, IO[bytes] Required.
4114
+ :param body: The definition of the EvaluationResult to create or update . Is one of the
4115
+ following types: EvaluationResult, JSON, IO[bytes] Required.
4116
4116
:type body: ~azure.ai.projects.onedp.models.EvaluationResult or JSON or IO[bytes]
4117
4117
:return: EvaluationResult. The EvaluationResult is compatible with MutableMapping
4118
4118
:rtype: ~azure.ai.projects.onedp.models.EvaluationResult
@@ -4139,7 +4139,7 @@ async def create_version(
4139
4139
else :
4140
4140
_content = json .dumps (body , cls = SdkJSONEncoder , exclude_readonly = True ) # type: ignore
4141
4141
4142
- _request = build_evaluation_results_create_version_request (
4142
+ _request = build_evaluation_results_create_or_update_version_request (
4143
4143
name = name ,
4144
4144
version = version ,
4145
4145
content_type = content_type ,
0 commit comments