diracx-client 0.0.1a20__py3-none-any.whl → 0.0.1a22__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  # pylint: disable=too-many-lines
2
2
  # coding=utf-8
3
3
  # --------------------------------------------------------------------------
4
- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.26.0)
4
+ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.27.1)
5
5
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
6
6
  # --------------------------------------------------------------------------
7
7
  from io import IOBase
@@ -202,9 +202,9 @@ def build_auth_userinfo_request(**kwargs: Any) -> HttpRequest:
202
202
 
203
203
  def build_auth_authorization_flow_request(
204
204
  *,
205
- response_type: Union[str, _models.Enum0],
205
+ response_type: str,
206
206
  code_challenge: str,
207
- code_challenge_method: Union[str, _models.Enum1],
207
+ code_challenge_method: str,
208
208
  client_id: str,
209
209
  redirect_uri: str,
210
210
  scope: str,
@@ -458,28 +458,7 @@ def build_jobs_assign_sandbox_to_job_request(
458
458
  )
459
459
 
460
460
 
461
- def build_jobs_submit_bulk_jobs_request(**kwargs: Any) -> HttpRequest:
462
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
463
-
464
- content_type: Optional[str] = kwargs.pop(
465
- "content_type", _headers.pop("Content-Type", None)
466
- )
467
- accept = _headers.pop("Accept", "application/json")
468
-
469
- # Construct URL
470
- _url = "/api/jobs/"
471
-
472
- # Construct headers
473
- if content_type is not None:
474
- _headers["Content-Type"] = _SERIALIZER.header(
475
- "content_type", content_type, "str"
476
- )
477
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
478
-
479
- return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)
480
-
481
-
482
- def build_jobs_delete_bulk_jobs_request(
461
+ def build_jobs_remove_bulk_jobs_request(
483
462
  *, job_ids: List[int], **kwargs: Any
484
463
  ) -> HttpRequest:
485
464
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -501,73 +480,7 @@ def build_jobs_delete_bulk_jobs_request(
501
480
  )
502
481
 
503
482
 
504
- def build_jobs_kill_bulk_jobs_request(
505
- *, job_ids: List[int], **kwargs: Any
506
- ) -> HttpRequest:
507
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
508
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
509
-
510
- accept = _headers.pop("Accept", "application/json")
511
-
512
- # Construct URL
513
- _url = "/api/jobs/kill"
514
-
515
- # Construct parameters
516
- _params["job_ids"] = _SERIALIZER.query("job_ids", job_ids, "[int]")
517
-
518
- # Construct headers
519
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
520
-
521
- return HttpRequest(
522
- method="POST", url=_url, params=_params, headers=_headers, **kwargs
523
- )
524
-
525
-
526
- def build_jobs_remove_bulk_jobs_request(
527
- *, job_ids: List[int], **kwargs: Any
528
- ) -> HttpRequest:
529
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
530
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
531
-
532
- accept = _headers.pop("Accept", "application/json")
533
-
534
- # Construct URL
535
- _url = "/api/jobs/remove"
536
-
537
- # Construct parameters
538
- _params["job_ids"] = _SERIALIZER.query("job_ids", job_ids, "[int]")
539
-
540
- # Construct headers
541
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
542
-
543
- return HttpRequest(
544
- method="POST", url=_url, params=_params, headers=_headers, **kwargs
545
- )
546
-
547
-
548
- def build_jobs_get_job_status_bulk_request(
549
- *, job_ids: List[int], **kwargs: Any
550
- ) -> HttpRequest:
551
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
552
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
553
-
554
- accept = _headers.pop("Accept", "application/json")
555
-
556
- # Construct URL
557
- _url = "/api/jobs/status"
558
-
559
- # Construct parameters
560
- _params["job_ids"] = _SERIALIZER.query("job_ids", job_ids, "[int]")
561
-
562
- # Construct headers
563
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
564
-
565
- return HttpRequest(
566
- method="GET", url=_url, params=_params, headers=_headers, **kwargs
567
- )
568
-
569
-
570
- def build_jobs_set_job_status_bulk_request(
483
+ def build_jobs_set_job_statuses_request(
571
484
  *, force: bool = False, **kwargs: Any
572
485
  ) -> HttpRequest:
573
486
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -597,30 +510,8 @@ def build_jobs_set_job_status_bulk_request(
597
510
  )
598
511
 
599
512
 
600
- def build_jobs_get_job_status_history_bulk_request( # pylint: disable=name-too-long
601
- *, job_ids: List[int], **kwargs: Any
602
- ) -> HttpRequest:
603
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
604
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
605
-
606
- accept = _headers.pop("Accept", "application/json")
607
-
608
- # Construct URL
609
- _url = "/api/jobs/status/history"
610
-
611
- # Construct parameters
612
- _params["job_ids"] = _SERIALIZER.query("job_ids", job_ids, "[int]")
613
-
614
- # Construct headers
615
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
616
-
617
- return HttpRequest(
618
- method="GET", url=_url, params=_params, headers=_headers, **kwargs
619
- )
620
-
621
-
622
513
  def build_jobs_reschedule_bulk_jobs_request(
623
- *, job_ids: List[int], **kwargs: Any
514
+ *, job_ids: List[int], reset_jobs: bool = False, **kwargs: Any
624
515
  ) -> HttpRequest:
625
516
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
626
517
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
@@ -632,6 +523,8 @@ def build_jobs_reschedule_bulk_jobs_request(
632
523
 
633
524
  # Construct parameters
634
525
  _params["job_ids"] = _SERIALIZER.query("job_ids", job_ids, "[int]")
526
+ if reset_jobs is not None:
527
+ _params["reset_jobs"] = _SERIALIZER.query("reset_jobs", reset_jobs, "bool")
635
528
 
636
529
  # Construct headers
637
530
  _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
@@ -641,25 +534,6 @@ def build_jobs_reschedule_bulk_jobs_request(
641
534
  )
642
535
 
643
536
 
644
- def build_jobs_reschedule_single_job_request(job_id: int, **kwargs: Any) -> HttpRequest:
645
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
646
-
647
- accept = _headers.pop("Accept", "application/json")
648
-
649
- # Construct URL
650
- _url = "/api/jobs/{job_id}/reschedule"
651
- path_format_arguments = {
652
- "job_id": _SERIALIZER.url("job_id", job_id, "int"),
653
- }
654
-
655
- _url: str = _url.format(**path_format_arguments) # type: ignore
656
-
657
- # Construct headers
658
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
659
-
660
- return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)
661
-
662
-
663
537
  def build_jobs_search_request(
664
538
  *, page: int = 1, per_page: int = 100, **kwargs: Any
665
539
  ) -> HttpRequest:
@@ -713,49 +587,8 @@ def build_jobs_summary_request(**kwargs: Any) -> HttpRequest:
713
587
  return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)
714
588
 
715
589
 
716
- def build_jobs_get_single_job_request(job_id: int, **kwargs: Any) -> HttpRequest:
717
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
718
-
719
- accept = _headers.pop("Accept", "application/json")
720
-
721
- # Construct URL
722
- _url = "/api/jobs/{job_id}"
723
- path_format_arguments = {
724
- "job_id": _SERIALIZER.url("job_id", job_id, "int"),
725
- }
726
-
727
- _url: str = _url.format(**path_format_arguments) # type: ignore
728
-
729
- # Construct headers
730
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
731
-
732
- return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs)
733
-
734
-
735
- def build_jobs_delete_single_job_request(job_id: int, **kwargs: Any) -> HttpRequest:
736
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
737
-
738
- accept = _headers.pop("Accept", "application/json")
739
-
740
- # Construct URL
741
- _url = "/api/jobs/{job_id}"
742
- path_format_arguments = {
743
- "job_id": _SERIALIZER.url("job_id", job_id, "int"),
744
- }
745
-
746
- _url: str = _url.format(**path_format_arguments) # type: ignore
747
-
748
- # Construct headers
749
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
750
-
751
- return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs)
752
-
753
-
754
- def build_jobs_set_single_job_properties_request( # pylint: disable=name-too-long
755
- job_id: int, *, json: JSON, update_timestamp: bool = False, **kwargs: Any
756
- ) -> HttpRequest:
590
+ def build_jobs_submit_bulk_jdl_jobs_request(**kwargs: Any) -> HttpRequest:
757
591
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
758
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
759
592
 
760
593
  content_type: Optional[str] = kwargs.pop(
761
594
  "content_type", _headers.pop("Content-Type", None)
@@ -763,18 +596,7 @@ def build_jobs_set_single_job_properties_request( # pylint: disable=name-too-lo
763
596
  accept = _headers.pop("Accept", "application/json")
764
597
 
765
598
  # Construct URL
766
- _url = "/api/jobs/{job_id}"
767
- path_format_arguments = {
768
- "job_id": _SERIALIZER.url("job_id", job_id, "int"),
769
- }
770
-
771
- _url: str = _url.format(**path_format_arguments) # type: ignore
772
-
773
- # Construct parameters
774
- if update_timestamp is not None:
775
- _params["update_timestamp"] = _SERIALIZER.query(
776
- "update_timestamp", update_timestamp, "bool"
777
- )
599
+ _url = "/api/jobs/jdl"
778
600
 
779
601
  # Construct headers
780
602
  if content_type is not None:
@@ -783,201 +605,86 @@ def build_jobs_set_single_job_properties_request( # pylint: disable=name-too-lo
783
605
  )
784
606
  _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
785
607
 
786
- return HttpRequest(
787
- method="PATCH", url=_url, params=_params, headers=_headers, json=json, **kwargs
788
- )
608
+ return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)
789
609
 
790
610
 
791
- def build_jobs_kill_single_job_request(job_id: int, **kwargs: Any) -> HttpRequest:
792
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
611
+ class WellKnownOperations:
612
+ """
613
+ .. warning::
614
+ **DO NOT** instantiate this class directly.
793
615
 
794
- accept = _headers.pop("Accept", "application/json")
616
+ Instead, you should access the following operations through
617
+ :class:`~generated.Dirac`'s
618
+ :attr:`well_known` attribute.
619
+ """
795
620
 
796
- # Construct URL
797
- _url = "/api/jobs/{job_id}/kill"
798
- path_format_arguments = {
799
- "job_id": _SERIALIZER.url("job_id", job_id, "int"),
800
- }
621
+ models = _models
801
622
 
802
- _url: str = _url.format(**path_format_arguments) # type: ignore
623
+ def __init__(self, *args, **kwargs):
624
+ input_args = list(args)
625
+ self._client = input_args.pop(0) if input_args else kwargs.pop("client")
626
+ self._config = input_args.pop(0) if input_args else kwargs.pop("config")
627
+ self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
628
+ self._deserialize = (
629
+ input_args.pop(0) if input_args else kwargs.pop("deserializer")
630
+ )
803
631
 
804
- # Construct headers
805
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
632
+ @distributed_trace
633
+ def openid_configuration(self, **kwargs: Any) -> Any:
634
+ """Openid Configuration.
806
635
 
807
- return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)
636
+ OpenID Connect discovery endpoint.
808
637
 
638
+ :return: any
639
+ :rtype: any
640
+ :raises ~azure.core.exceptions.HttpResponseError:
641
+ """
642
+ error_map: MutableMapping = {
643
+ 401: ClientAuthenticationError,
644
+ 404: ResourceNotFoundError,
645
+ 409: ResourceExistsError,
646
+ 304: ResourceNotModifiedError,
647
+ }
648
+ error_map.update(kwargs.pop("error_map", {}) or {})
809
649
 
810
- def build_jobs_remove_single_job_request(job_id: int, **kwargs: Any) -> HttpRequest:
811
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
650
+ _headers = kwargs.pop("headers", {}) or {}
651
+ _params = kwargs.pop("params", {}) or {}
812
652
 
813
- accept = _headers.pop("Accept", "application/json")
653
+ cls: ClsType[Any] = kwargs.pop("cls", None)
814
654
 
815
- # Construct URL
816
- _url = "/api/jobs/{job_id}/remove"
817
- path_format_arguments = {
818
- "job_id": _SERIALIZER.url("job_id", job_id, "int"),
819
- }
655
+ _request = build_well_known_openid_configuration_request(
656
+ headers=_headers,
657
+ params=_params,
658
+ )
659
+ _request.url = self._client.format_url(_request.url)
820
660
 
821
- _url: str = _url.format(**path_format_arguments) # type: ignore
661
+ _stream = False
662
+ pipeline_response: PipelineResponse = (
663
+ self._client._pipeline.run( # pylint: disable=protected-access
664
+ _request, stream=_stream, **kwargs
665
+ )
666
+ )
822
667
 
823
- # Construct headers
824
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
668
+ response = pipeline_response.http_response
825
669
 
826
- return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs)
670
+ if response.status_code not in [200]:
671
+ map_error(
672
+ status_code=response.status_code, response=response, error_map=error_map
673
+ )
674
+ raise HttpResponseError(response=response)
827
675
 
676
+ deserialized = self._deserialize("object", pipeline_response.http_response)
828
677
 
829
- def build_jobs_get_single_job_status_request(job_id: int, **kwargs: Any) -> HttpRequest:
830
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
678
+ if cls:
679
+ return cls(pipeline_response, deserialized, {}) # type: ignore
831
680
 
832
- accept = _headers.pop("Accept", "application/json")
681
+ return deserialized # type: ignore
833
682
 
834
- # Construct URL
835
- _url = "/api/jobs/{job_id}/status"
836
- path_format_arguments = {
837
- "job_id": _SERIALIZER.url("job_id", job_id, "int"),
838
- }
683
+ @distributed_trace
684
+ def installation_metadata(self, **kwargs: Any) -> _models.Metadata:
685
+ """Installation Metadata.
839
686
 
840
- _url: str = _url.format(**path_format_arguments) # type: ignore
841
-
842
- # Construct headers
843
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
844
-
845
- return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs)
846
-
847
-
848
- def build_jobs_set_single_job_status_request(
849
- job_id: int, *, force: bool = False, **kwargs: Any
850
- ) -> HttpRequest:
851
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
852
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
853
-
854
- content_type: Optional[str] = kwargs.pop(
855
- "content_type", _headers.pop("Content-Type", None)
856
- )
857
- accept = _headers.pop("Accept", "application/json")
858
-
859
- # Construct URL
860
- _url = "/api/jobs/{job_id}/status"
861
- path_format_arguments = {
862
- "job_id": _SERIALIZER.url("job_id", job_id, "int"),
863
- }
864
-
865
- _url: str = _url.format(**path_format_arguments) # type: ignore
866
-
867
- # Construct parameters
868
- if force is not None:
869
- _params["force"] = _SERIALIZER.query("force", force, "bool")
870
-
871
- # Construct headers
872
- if content_type is not None:
873
- _headers["Content-Type"] = _SERIALIZER.header(
874
- "content_type", content_type, "str"
875
- )
876
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
877
-
878
- return HttpRequest(
879
- method="PATCH", url=_url, params=_params, headers=_headers, **kwargs
880
- )
881
-
882
-
883
- def build_jobs_get_single_job_status_history_request( # pylint: disable=name-too-long
884
- job_id: int, **kwargs: Any
885
- ) -> HttpRequest:
886
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
887
-
888
- accept = _headers.pop("Accept", "application/json")
889
-
890
- # Construct URL
891
- _url = "/api/jobs/{job_id}/status/history"
892
- path_format_arguments = {
893
- "job_id": _SERIALIZER.url("job_id", job_id, "int"),
894
- }
895
-
896
- _url: str = _url.format(**path_format_arguments) # type: ignore
897
-
898
- # Construct headers
899
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
900
-
901
- return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs)
902
-
903
-
904
- class WellKnownOperations:
905
- """
906
- .. warning::
907
- **DO NOT** instantiate this class directly.
908
-
909
- Instead, you should access the following operations through
910
- :class:`~generated.Dirac`'s
911
- :attr:`well_known` attribute.
912
- """
913
-
914
- models = _models
915
-
916
- def __init__(self, *args, **kwargs):
917
- input_args = list(args)
918
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
919
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
920
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
921
- self._deserialize = (
922
- input_args.pop(0) if input_args else kwargs.pop("deserializer")
923
- )
924
-
925
- @distributed_trace
926
- def openid_configuration(self, **kwargs: Any) -> Any:
927
- """Openid Configuration.
928
-
929
- OpenID Connect discovery endpoint.
930
-
931
- :return: any
932
- :rtype: any
933
- :raises ~azure.core.exceptions.HttpResponseError:
934
- """
935
- error_map: MutableMapping = {
936
- 401: ClientAuthenticationError,
937
- 404: ResourceNotFoundError,
938
- 409: ResourceExistsError,
939
- 304: ResourceNotModifiedError,
940
- }
941
- error_map.update(kwargs.pop("error_map", {}) or {})
942
-
943
- _headers = kwargs.pop("headers", {}) or {}
944
- _params = kwargs.pop("params", {}) or {}
945
-
946
- cls: ClsType[Any] = kwargs.pop("cls", None)
947
-
948
- _request = build_well_known_openid_configuration_request(
949
- headers=_headers,
950
- params=_params,
951
- )
952
- _request.url = self._client.format_url(_request.url)
953
-
954
- _stream = False
955
- pipeline_response: PipelineResponse = (
956
- self._client._pipeline.run( # pylint: disable=protected-access
957
- _request, stream=_stream, **kwargs
958
- )
959
- )
960
-
961
- response = pipeline_response.http_response
962
-
963
- if response.status_code not in [200]:
964
- map_error(
965
- status_code=response.status_code, response=response, error_map=error_map
966
- )
967
- raise HttpResponseError(response=response)
968
-
969
- deserialized = self._deserialize("object", pipeline_response.http_response)
970
-
971
- if cls:
972
- return cls(pipeline_response, deserialized, {}) # type: ignore
973
-
974
- return deserialized # type: ignore
975
-
976
- @distributed_trace
977
- def installation_metadata(self, **kwargs: Any) -> _models.Metadata:
978
- """Installation Metadata.
979
-
980
- Get metadata about the dirac installation.
687
+ Get metadata about the dirac installation.
981
688
 
982
689
  :return: Metadata
983
690
  :rtype: ~generated.models.Metadata
@@ -1060,9 +767,25 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
1060
767
  """Initiate Device Flow.
1061
768
 
1062
769
  Initiate the device flow against DIRAC authorization Server.
1063
- Scope must have exactly up to one ``group`` (otherwise default) and
1064
- one or more ``property`` scope.
1065
- If no property, then get default one.
770
+
771
+ Scope details:
772
+
773
+
774
+ *
775
+ If only VO is provided: Uses the default group and its properties for the VO.
776
+
777
+ *
778
+ If VO and group are provided: Uses the specified group and its properties for the VO.
779
+
780
+ *
781
+ If VO and properties are provided: Uses the default group and combines its properties with
782
+ the
783
+ provided properties.
784
+
785
+ *
786
+ If VO, group, and properties are provided: Uses the specified group and combines its
787
+ properties with the
788
+ provided properties.
1066
789
 
1067
790
  Offers the user to go with the browser to
1068
791
  ``auth/<vo>/device?user_code=XYZ``.
@@ -1457,9 +1180,9 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
1457
1180
  def authorization_flow(
1458
1181
  self,
1459
1182
  *,
1460
- response_type: Union[str, _models.Enum0],
1183
+ response_type: str,
1461
1184
  code_challenge: str,
1462
- code_challenge_method: Union[str, _models.Enum1],
1185
+ code_challenge_method: str,
1463
1186
  client_id: str,
1464
1187
  redirect_uri: str,
1465
1188
  scope: str,
@@ -1472,16 +1195,35 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
1472
1195
  It will redirect to the actual OpenID server (IAM, CheckIn) to
1473
1196
  perform a authorization code flow.
1474
1197
 
1198
+ Scope details:
1199
+
1200
+
1201
+ *
1202
+ If only VO is provided: Uses the default group and its properties for the VO.
1203
+
1204
+ *
1205
+ If VO and group are provided: Uses the specified group and its properties for the VO.
1206
+
1207
+ *
1208
+ If VO and properties are provided: Uses the default group and combines its properties with
1209
+ the
1210
+ provided properties.
1211
+
1212
+ *
1213
+ If VO, group, and properties are provided: Uses the specified group and combines its
1214
+ properties with the
1215
+ provided properties.
1216
+
1475
1217
  We set the user details obtained from the user authorize flow in a cookie
1476
1218
  to be able to map the authorization flow with the corresponding
1477
1219
  user authorize flow.
1478
1220
 
1479
- :keyword response_type: "code" Required.
1480
- :paramtype response_type: str or ~generated.models.Enum0
1221
+ :keyword response_type: Required.
1222
+ :paramtype response_type: str
1481
1223
  :keyword code_challenge: Required.
1482
1224
  :paramtype code_challenge: str
1483
- :keyword code_challenge_method: "S256" Required.
1484
- :paramtype code_challenge_method: str or ~generated.models.Enum1
1225
+ :keyword code_challenge_method: Required.
1226
+ :paramtype code_challenge_method: str
1485
1227
  :keyword client_id: Required.
1486
1228
  :paramtype client_id: str
1487
1229
  :keyword redirect_uri: Required.
@@ -1709,7 +1451,7 @@ class ConfigOperations:
1709
1451
  return deserialized # type: ignore
1710
1452
 
1711
1453
 
1712
- class JobsOperations: # pylint: disable=too-many-public-methods
1454
+ class JobsOperations:
1713
1455
  """
1714
1456
  .. warning::
1715
1457
  **DO NOT** instantiate this class directly.
@@ -1945,1015 +1687,13 @@ class JobsOperations: # pylint: disable=too-many-public-methods
1945
1687
  }
1946
1688
  error_map.update(kwargs.pop("error_map", {}) or {})
1947
1689
 
1948
- _headers = kwargs.pop("headers", {}) or {}
1949
- _params = kwargs.pop("params", {}) or {}
1950
-
1951
- cls: ClsType[Any] = kwargs.pop("cls", None)
1952
-
1953
- _request = build_jobs_unassign_bulk_jobs_sandboxes_request(
1954
- jobs_ids=jobs_ids,
1955
- headers=_headers,
1956
- params=_params,
1957
- )
1958
- _request.url = self._client.format_url(_request.url)
1959
-
1960
- _stream = False
1961
- pipeline_response: PipelineResponse = (
1962
- self._client._pipeline.run( # pylint: disable=protected-access
1963
- _request, stream=_stream, **kwargs
1964
- )
1965
- )
1966
-
1967
- response = pipeline_response.http_response
1968
-
1969
- if response.status_code not in [200]:
1970
- map_error(
1971
- status_code=response.status_code, response=response, error_map=error_map
1972
- )
1973
- raise HttpResponseError(response=response)
1974
-
1975
- deserialized = self._deserialize("object", pipeline_response.http_response)
1976
-
1977
- if cls:
1978
- return cls(pipeline_response, deserialized, {}) # type: ignore
1979
-
1980
- return deserialized # type: ignore
1981
-
1982
- @distributed_trace
1983
- def get_job_sandboxes(self, job_id: int, **kwargs: Any) -> Dict[str, List[Any]]:
1984
- """Get Job Sandboxes.
1985
-
1986
- Get input and output sandboxes of given job.
1987
-
1988
- :param job_id: Required.
1989
- :type job_id: int
1990
- :return: dict mapping str to list of any
1991
- :rtype: dict[str, list[any]]
1992
- :raises ~azure.core.exceptions.HttpResponseError:
1993
- """
1994
- error_map: MutableMapping = {
1995
- 401: ClientAuthenticationError,
1996
- 404: ResourceNotFoundError,
1997
- 409: ResourceExistsError,
1998
- 304: ResourceNotModifiedError,
1999
- }
2000
- error_map.update(kwargs.pop("error_map", {}) or {})
2001
-
2002
- _headers = kwargs.pop("headers", {}) or {}
2003
- _params = kwargs.pop("params", {}) or {}
2004
-
2005
- cls: ClsType[Dict[str, List[Any]]] = kwargs.pop("cls", None)
2006
-
2007
- _request = build_jobs_get_job_sandboxes_request(
2008
- job_id=job_id,
2009
- headers=_headers,
2010
- params=_params,
2011
- )
2012
- _request.url = self._client.format_url(_request.url)
2013
-
2014
- _stream = False
2015
- pipeline_response: PipelineResponse = (
2016
- self._client._pipeline.run( # pylint: disable=protected-access
2017
- _request, stream=_stream, **kwargs
2018
- )
2019
- )
2020
-
2021
- response = pipeline_response.http_response
2022
-
2023
- if response.status_code not in [200]:
2024
- map_error(
2025
- status_code=response.status_code, response=response, error_map=error_map
2026
- )
2027
- raise HttpResponseError(response=response)
2028
-
2029
- deserialized = self._deserialize("{[object]}", pipeline_response.http_response)
2030
-
2031
- if cls:
2032
- return cls(pipeline_response, deserialized, {}) # type: ignore
2033
-
2034
- return deserialized # type: ignore
2035
-
2036
- @distributed_trace
2037
- def unassign_job_sandboxes(self, job_id: int, **kwargs: Any) -> Any:
2038
- """Unassign Job Sandboxes.
2039
-
2040
- Delete single job sandbox mapping.
2041
-
2042
- :param job_id: Required.
2043
- :type job_id: int
2044
- :return: any
2045
- :rtype: any
2046
- :raises ~azure.core.exceptions.HttpResponseError:
2047
- """
2048
- error_map: MutableMapping = {
2049
- 401: ClientAuthenticationError,
2050
- 404: ResourceNotFoundError,
2051
- 409: ResourceExistsError,
2052
- 304: ResourceNotModifiedError,
2053
- }
2054
- error_map.update(kwargs.pop("error_map", {}) or {})
2055
-
2056
- _headers = kwargs.pop("headers", {}) or {}
2057
- _params = kwargs.pop("params", {}) or {}
2058
-
2059
- cls: ClsType[Any] = kwargs.pop("cls", None)
2060
-
2061
- _request = build_jobs_unassign_job_sandboxes_request(
2062
- job_id=job_id,
2063
- headers=_headers,
2064
- params=_params,
2065
- )
2066
- _request.url = self._client.format_url(_request.url)
2067
-
2068
- _stream = False
2069
- pipeline_response: PipelineResponse = (
2070
- self._client._pipeline.run( # pylint: disable=protected-access
2071
- _request, stream=_stream, **kwargs
2072
- )
2073
- )
2074
-
2075
- response = pipeline_response.http_response
2076
-
2077
- if response.status_code not in [200]:
2078
- map_error(
2079
- status_code=response.status_code, response=response, error_map=error_map
2080
- )
2081
- raise HttpResponseError(response=response)
2082
-
2083
- deserialized = self._deserialize("object", pipeline_response.http_response)
2084
-
2085
- if cls:
2086
- return cls(pipeline_response, deserialized, {}) # type: ignore
2087
-
2088
- return deserialized # type: ignore
2089
-
2090
- @distributed_trace
2091
- def get_job_sandbox(
2092
- self, job_id: int, sandbox_type: Union[str, _models.SandboxType], **kwargs: Any
2093
- ) -> List[Any]:
2094
- """Get Job Sandbox.
2095
-
2096
- Get input or output sandbox of given job.
2097
-
2098
- :param job_id: Required.
2099
- :type job_id: int
2100
- :param sandbox_type: Known values are: "input" and "output". Required.
2101
- :type sandbox_type: str or ~generated.models.SandboxType
2102
- :return: list of any
2103
- :rtype: list[any]
2104
- :raises ~azure.core.exceptions.HttpResponseError:
2105
- """
2106
- error_map: MutableMapping = {
2107
- 401: ClientAuthenticationError,
2108
- 404: ResourceNotFoundError,
2109
- 409: ResourceExistsError,
2110
- 304: ResourceNotModifiedError,
2111
- }
2112
- error_map.update(kwargs.pop("error_map", {}) or {})
2113
-
2114
- _headers = kwargs.pop("headers", {}) or {}
2115
- _params = kwargs.pop("params", {}) or {}
2116
-
2117
- cls: ClsType[List[Any]] = kwargs.pop("cls", None)
2118
-
2119
- _request = build_jobs_get_job_sandbox_request(
2120
- job_id=job_id,
2121
- sandbox_type=sandbox_type,
2122
- headers=_headers,
2123
- params=_params,
2124
- )
2125
- _request.url = self._client.format_url(_request.url)
2126
-
2127
- _stream = False
2128
- pipeline_response: PipelineResponse = (
2129
- self._client._pipeline.run( # pylint: disable=protected-access
2130
- _request, stream=_stream, **kwargs
2131
- )
2132
- )
2133
-
2134
- response = pipeline_response.http_response
2135
-
2136
- if response.status_code not in [200]:
2137
- map_error(
2138
- status_code=response.status_code, response=response, error_map=error_map
2139
- )
2140
- raise HttpResponseError(response=response)
2141
-
2142
- deserialized = self._deserialize("[object]", pipeline_response.http_response)
2143
-
2144
- if cls:
2145
- return cls(pipeline_response, deserialized, {}) # type: ignore
2146
-
2147
- return deserialized # type: ignore
2148
-
2149
- @distributed_trace
2150
- def assign_sandbox_to_job(self, job_id: int, body: str, **kwargs: Any) -> Any:
2151
- """Assign Sandbox To Job.
2152
-
2153
- Map the pfn as output sandbox to job.
2154
-
2155
- :param job_id: Required.
2156
- :type job_id: int
2157
- :param body: Required.
2158
- :type body: str
2159
- :return: any
2160
- :rtype: any
2161
- :raises ~azure.core.exceptions.HttpResponseError:
2162
- """
2163
- error_map: MutableMapping = {
2164
- 401: ClientAuthenticationError,
2165
- 404: ResourceNotFoundError,
2166
- 409: ResourceExistsError,
2167
- 304: ResourceNotModifiedError,
2168
- }
2169
- error_map.update(kwargs.pop("error_map", {}) or {})
2170
-
2171
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
2172
- _params = kwargs.pop("params", {}) or {}
2173
-
2174
- content_type: str = kwargs.pop(
2175
- "content_type", _headers.pop("Content-Type", "application/json")
2176
- )
2177
- cls: ClsType[Any] = kwargs.pop("cls", None)
2178
-
2179
- _content = self._serialize.body(body, "str")
2180
-
2181
- _request = build_jobs_assign_sandbox_to_job_request(
2182
- job_id=job_id,
2183
- content_type=content_type,
2184
- content=_content,
2185
- headers=_headers,
2186
- params=_params,
2187
- )
2188
- _request.url = self._client.format_url(_request.url)
2189
-
2190
- _stream = False
2191
- pipeline_response: PipelineResponse = (
2192
- self._client._pipeline.run( # pylint: disable=protected-access
2193
- _request, stream=_stream, **kwargs
2194
- )
2195
- )
2196
-
2197
- response = pipeline_response.http_response
2198
-
2199
- if response.status_code not in [200]:
2200
- map_error(
2201
- status_code=response.status_code, response=response, error_map=error_map
2202
- )
2203
- raise HttpResponseError(response=response)
2204
-
2205
- deserialized = self._deserialize("object", pipeline_response.http_response)
2206
-
2207
- if cls:
2208
- return cls(pipeline_response, deserialized, {}) # type: ignore
2209
-
2210
- return deserialized # type: ignore
2211
-
2212
- @overload
2213
- def submit_bulk_jobs(
2214
- self, body: List[str], *, content_type: str = "application/json", **kwargs: Any
2215
- ) -> List[_models.InsertedJob]:
2216
- """Submit Bulk Jobs.
2217
-
2218
- Submit Bulk Jobs.
2219
-
2220
- :param body: Required.
2221
- :type body: list[str]
2222
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2223
- Default value is "application/json".
2224
- :paramtype content_type: str
2225
- :return: list of InsertedJob
2226
- :rtype: list[~generated.models.InsertedJob]
2227
- :raises ~azure.core.exceptions.HttpResponseError:
2228
- """
2229
-
2230
- @overload
2231
- def submit_bulk_jobs(
2232
- self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
2233
- ) -> List[_models.InsertedJob]:
2234
- """Submit Bulk Jobs.
2235
-
2236
- Submit Bulk Jobs.
2237
-
2238
- :param body: Required.
2239
- :type body: IO[bytes]
2240
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
2241
- Default value is "application/json".
2242
- :paramtype content_type: str
2243
- :return: list of InsertedJob
2244
- :rtype: list[~generated.models.InsertedJob]
2245
- :raises ~azure.core.exceptions.HttpResponseError:
2246
- """
2247
-
2248
- @distributed_trace
2249
- def submit_bulk_jobs(
2250
- self, body: Union[List[str], IO[bytes]], **kwargs: Any
2251
- ) -> List[_models.InsertedJob]:
2252
- """Submit Bulk Jobs.
2253
-
2254
- Submit Bulk Jobs.
2255
-
2256
- :param body: Is either a [str] type or a IO[bytes] type. Required.
2257
- :type body: list[str] or IO[bytes]
2258
- :return: list of InsertedJob
2259
- :rtype: list[~generated.models.InsertedJob]
2260
- :raises ~azure.core.exceptions.HttpResponseError:
2261
- """
2262
- error_map: MutableMapping = {
2263
- 401: ClientAuthenticationError,
2264
- 404: ResourceNotFoundError,
2265
- 409: ResourceExistsError,
2266
- 304: ResourceNotModifiedError,
2267
- }
2268
- error_map.update(kwargs.pop("error_map", {}) or {})
2269
-
2270
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
2271
- _params = kwargs.pop("params", {}) or {}
2272
-
2273
- content_type: Optional[str] = kwargs.pop(
2274
- "content_type", _headers.pop("Content-Type", None)
2275
- )
2276
- cls: ClsType[List[_models.InsertedJob]] = kwargs.pop("cls", None)
2277
-
2278
- content_type = content_type or "application/json"
2279
- _json = None
2280
- _content = None
2281
- if isinstance(body, (IOBase, bytes)):
2282
- _content = body
2283
- else:
2284
- _json = self._serialize.body(body, "[str]")
2285
-
2286
- _request = build_jobs_submit_bulk_jobs_request(
2287
- content_type=content_type,
2288
- json=_json,
2289
- content=_content,
2290
- headers=_headers,
2291
- params=_params,
2292
- )
2293
- _request.url = self._client.format_url(_request.url)
2294
-
2295
- _stream = False
2296
- pipeline_response: PipelineResponse = (
2297
- self._client._pipeline.run( # pylint: disable=protected-access
2298
- _request, stream=_stream, **kwargs
2299
- )
2300
- )
2301
-
2302
- response = pipeline_response.http_response
2303
-
2304
- if response.status_code not in [200]:
2305
- map_error(
2306
- status_code=response.status_code, response=response, error_map=error_map
2307
- )
2308
- raise HttpResponseError(response=response)
2309
-
2310
- deserialized = self._deserialize(
2311
- "[InsertedJob]", pipeline_response.http_response
2312
- )
2313
-
2314
- if cls:
2315
- return cls(pipeline_response, deserialized, {}) # type: ignore
2316
-
2317
- return deserialized # type: ignore
2318
-
2319
- @distributed_trace
2320
- def delete_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
2321
- """Delete Bulk Jobs.
2322
-
2323
- Delete Bulk Jobs.
2324
-
2325
- :keyword job_ids: Required.
2326
- :paramtype job_ids: list[int]
2327
- :return: any
2328
- :rtype: any
2329
- :raises ~azure.core.exceptions.HttpResponseError:
2330
- """
2331
- error_map: MutableMapping = {
2332
- 401: ClientAuthenticationError,
2333
- 404: ResourceNotFoundError,
2334
- 409: ResourceExistsError,
2335
- 304: ResourceNotModifiedError,
2336
- }
2337
- error_map.update(kwargs.pop("error_map", {}) or {})
2338
-
2339
- _headers = kwargs.pop("headers", {}) or {}
2340
- _params = kwargs.pop("params", {}) or {}
2341
-
2342
- cls: ClsType[Any] = kwargs.pop("cls", None)
2343
-
2344
- _request = build_jobs_delete_bulk_jobs_request(
2345
- job_ids=job_ids,
2346
- headers=_headers,
2347
- params=_params,
2348
- )
2349
- _request.url = self._client.format_url(_request.url)
2350
-
2351
- _stream = False
2352
- pipeline_response: PipelineResponse = (
2353
- self._client._pipeline.run( # pylint: disable=protected-access
2354
- _request, stream=_stream, **kwargs
2355
- )
2356
- )
2357
-
2358
- response = pipeline_response.http_response
2359
-
2360
- if response.status_code not in [200]:
2361
- map_error(
2362
- status_code=response.status_code, response=response, error_map=error_map
2363
- )
2364
- raise HttpResponseError(response=response)
2365
-
2366
- deserialized = self._deserialize("object", pipeline_response.http_response)
2367
-
2368
- if cls:
2369
- return cls(pipeline_response, deserialized, {}) # type: ignore
2370
-
2371
- return deserialized # type: ignore
2372
-
2373
- @distributed_trace
2374
- def kill_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
2375
- """Kill Bulk Jobs.
2376
-
2377
- Kill Bulk Jobs.
2378
-
2379
- :keyword job_ids: Required.
2380
- :paramtype job_ids: list[int]
2381
- :return: any
2382
- :rtype: any
2383
- :raises ~azure.core.exceptions.HttpResponseError:
2384
- """
2385
- error_map: MutableMapping = {
2386
- 401: ClientAuthenticationError,
2387
- 404: ResourceNotFoundError,
2388
- 409: ResourceExistsError,
2389
- 304: ResourceNotModifiedError,
2390
- }
2391
- error_map.update(kwargs.pop("error_map", {}) or {})
2392
-
2393
- _headers = kwargs.pop("headers", {}) or {}
2394
- _params = kwargs.pop("params", {}) or {}
2395
-
2396
- cls: ClsType[Any] = kwargs.pop("cls", None)
2397
-
2398
- _request = build_jobs_kill_bulk_jobs_request(
2399
- job_ids=job_ids,
2400
- headers=_headers,
2401
- params=_params,
2402
- )
2403
- _request.url = self._client.format_url(_request.url)
2404
-
2405
- _stream = False
2406
- pipeline_response: PipelineResponse = (
2407
- self._client._pipeline.run( # pylint: disable=protected-access
2408
- _request, stream=_stream, **kwargs
2409
- )
2410
- )
2411
-
2412
- response = pipeline_response.http_response
2413
-
2414
- if response.status_code not in [200]:
2415
- map_error(
2416
- status_code=response.status_code, response=response, error_map=error_map
2417
- )
2418
- raise HttpResponseError(response=response)
2419
-
2420
- deserialized = self._deserialize("object", pipeline_response.http_response)
2421
-
2422
- if cls:
2423
- return cls(pipeline_response, deserialized, {}) # type: ignore
2424
-
2425
- return deserialized # type: ignore
2426
-
2427
- @distributed_trace
2428
- def remove_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
2429
- """Remove Bulk Jobs.
2430
-
2431
- Fully remove a list of jobs from the WMS databases.
2432
-
2433
- WARNING: This endpoint has been implemented for the compatibility with the legacy DIRAC WMS
2434
- and the JobCleaningAgent. However, once this agent is ported to diracx, this endpoint should
2435
- be removed, and the delete endpoint should be used instead for any other purpose.
2436
-
2437
- :keyword job_ids: Required.
2438
- :paramtype job_ids: list[int]
2439
- :return: any
2440
- :rtype: any
2441
- :raises ~azure.core.exceptions.HttpResponseError:
2442
- """
2443
- error_map: MutableMapping = {
2444
- 401: ClientAuthenticationError,
2445
- 404: ResourceNotFoundError,
2446
- 409: ResourceExistsError,
2447
- 304: ResourceNotModifiedError,
2448
- }
2449
- error_map.update(kwargs.pop("error_map", {}) or {})
2450
-
2451
- _headers = kwargs.pop("headers", {}) or {}
2452
- _params = kwargs.pop("params", {}) or {}
2453
-
2454
- cls: ClsType[Any] = kwargs.pop("cls", None)
2455
-
2456
- _request = build_jobs_remove_bulk_jobs_request(
2457
- job_ids=job_ids,
2458
- headers=_headers,
2459
- params=_params,
2460
- )
2461
- _request.url = self._client.format_url(_request.url)
2462
-
2463
- _stream = False
2464
- pipeline_response: PipelineResponse = (
2465
- self._client._pipeline.run( # pylint: disable=protected-access
2466
- _request, stream=_stream, **kwargs
2467
- )
2468
- )
2469
-
2470
- response = pipeline_response.http_response
2471
-
2472
- if response.status_code not in [200]:
2473
- map_error(
2474
- status_code=response.status_code, response=response, error_map=error_map
2475
- )
2476
- raise HttpResponseError(response=response)
2477
-
2478
- deserialized = self._deserialize("object", pipeline_response.http_response)
2479
-
2480
- if cls:
2481
- return cls(pipeline_response, deserialized, {}) # type: ignore
2482
-
2483
- return deserialized # type: ignore
2484
-
2485
- @distributed_trace
2486
- def get_job_status_bulk(
2487
- self, *, job_ids: List[int], **kwargs: Any
2488
- ) -> Dict[str, _models.LimitedJobStatusReturn]:
2489
- """Get Job Status Bulk.
2490
-
2491
- Get Job Status Bulk.
2492
-
2493
- :keyword job_ids: Required.
2494
- :paramtype job_ids: list[int]
2495
- :return: dict mapping str to LimitedJobStatusReturn
2496
- :rtype: dict[str, ~generated.models.LimitedJobStatusReturn]
2497
- :raises ~azure.core.exceptions.HttpResponseError:
2498
- """
2499
- error_map: MutableMapping = {
2500
- 401: ClientAuthenticationError,
2501
- 404: ResourceNotFoundError,
2502
- 409: ResourceExistsError,
2503
- 304: ResourceNotModifiedError,
2504
- }
2505
- error_map.update(kwargs.pop("error_map", {}) or {})
2506
-
2507
- _headers = kwargs.pop("headers", {}) or {}
2508
- _params = kwargs.pop("params", {}) or {}
2509
-
2510
- cls: ClsType[Dict[str, _models.LimitedJobStatusReturn]] = kwargs.pop(
2511
- "cls", None
2512
- )
2513
-
2514
- _request = build_jobs_get_job_status_bulk_request(
2515
- job_ids=job_ids,
2516
- headers=_headers,
2517
- params=_params,
2518
- )
2519
- _request.url = self._client.format_url(_request.url)
2520
-
2521
- _stream = False
2522
- pipeline_response: PipelineResponse = (
2523
- self._client._pipeline.run( # pylint: disable=protected-access
2524
- _request, stream=_stream, **kwargs
2525
- )
2526
- )
2527
-
2528
- response = pipeline_response.http_response
2529
-
2530
- if response.status_code not in [200]:
2531
- map_error(
2532
- status_code=response.status_code, response=response, error_map=error_map
2533
- )
2534
- raise HttpResponseError(response=response)
2535
-
2536
- deserialized = self._deserialize(
2537
- "{LimitedJobStatusReturn}", pipeline_response.http_response
2538
- )
2539
-
2540
- if cls:
2541
- return cls(pipeline_response, deserialized, {}) # type: ignore
2542
-
2543
- return deserialized # type: ignore
2544
-
2545
- @overload
2546
- def set_job_status_bulk(
2547
- self,
2548
- body: Dict[str, Dict[str, _models.JobStatusUpdate]],
2549
- *,
2550
- force: bool = False,
2551
- content_type: str = "application/json",
2552
- **kwargs: Any,
2553
- ) -> Dict[str, _models.SetJobStatusReturn]:
2554
- """Set Job Status Bulk.
2555
-
2556
- Set Job Status Bulk.
2557
-
2558
- :param body: Required.
2559
- :type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]]
2560
- :keyword force: Default value is False.
2561
- :paramtype force: bool
2562
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2563
- Default value is "application/json".
2564
- :paramtype content_type: str
2565
- :return: dict mapping str to SetJobStatusReturn
2566
- :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2567
- :raises ~azure.core.exceptions.HttpResponseError:
2568
- """
2569
-
2570
- @overload
2571
- def set_job_status_bulk(
2572
- self,
2573
- body: IO[bytes],
2574
- *,
2575
- force: bool = False,
2576
- content_type: str = "application/json",
2577
- **kwargs: Any,
2578
- ) -> Dict[str, _models.SetJobStatusReturn]:
2579
- """Set Job Status Bulk.
2580
-
2581
- Set Job Status Bulk.
2582
-
2583
- :param body: Required.
2584
- :type body: IO[bytes]
2585
- :keyword force: Default value is False.
2586
- :paramtype force: bool
2587
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
2588
- Default value is "application/json".
2589
- :paramtype content_type: str
2590
- :return: dict mapping str to SetJobStatusReturn
2591
- :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2592
- :raises ~azure.core.exceptions.HttpResponseError:
2593
- """
2594
-
2595
- @distributed_trace
2596
- def set_job_status_bulk(
2597
- self,
2598
- body: Union[Dict[str, Dict[str, _models.JobStatusUpdate]], IO[bytes]],
2599
- *,
2600
- force: bool = False,
2601
- **kwargs: Any,
2602
- ) -> Dict[str, _models.SetJobStatusReturn]:
2603
- """Set Job Status Bulk.
2604
-
2605
- Set Job Status Bulk.
2606
-
2607
- :param body: Is either a {str: {str: JobStatusUpdate}} type or a IO[bytes] type. Required.
2608
- :type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]] or IO[bytes]
2609
- :keyword force: Default value is False.
2610
- :paramtype force: bool
2611
- :return: dict mapping str to SetJobStatusReturn
2612
- :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2613
- :raises ~azure.core.exceptions.HttpResponseError:
2614
- """
2615
- error_map: MutableMapping = {
2616
- 401: ClientAuthenticationError,
2617
- 404: ResourceNotFoundError,
2618
- 409: ResourceExistsError,
2619
- 304: ResourceNotModifiedError,
2620
- }
2621
- error_map.update(kwargs.pop("error_map", {}) or {})
2622
-
2623
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
2624
- _params = kwargs.pop("params", {}) or {}
2625
-
2626
- content_type: Optional[str] = kwargs.pop(
2627
- "content_type", _headers.pop("Content-Type", None)
2628
- )
2629
- cls: ClsType[Dict[str, _models.SetJobStatusReturn]] = kwargs.pop("cls", None)
2630
-
2631
- content_type = content_type or "application/json"
2632
- _json = None
2633
- _content = None
2634
- if isinstance(body, (IOBase, bytes)):
2635
- _content = body
2636
- else:
2637
- _json = self._serialize.body(body, "{{JobStatusUpdate}}")
2638
-
2639
- _request = build_jobs_set_job_status_bulk_request(
2640
- force=force,
2641
- content_type=content_type,
2642
- json=_json,
2643
- content=_content,
2644
- headers=_headers,
2645
- params=_params,
2646
- )
2647
- _request.url = self._client.format_url(_request.url)
2648
-
2649
- _stream = False
2650
- pipeline_response: PipelineResponse = (
2651
- self._client._pipeline.run( # pylint: disable=protected-access
2652
- _request, stream=_stream, **kwargs
2653
- )
2654
- )
2655
-
2656
- response = pipeline_response.http_response
2657
-
2658
- if response.status_code not in [200]:
2659
- map_error(
2660
- status_code=response.status_code, response=response, error_map=error_map
2661
- )
2662
- raise HttpResponseError(response=response)
2663
-
2664
- deserialized = self._deserialize(
2665
- "{SetJobStatusReturn}", pipeline_response.http_response
2666
- )
2667
-
2668
- if cls:
2669
- return cls(pipeline_response, deserialized, {}) # type: ignore
2670
-
2671
- return deserialized # type: ignore
2672
-
2673
- @distributed_trace
2674
- def get_job_status_history_bulk(
2675
- self, *, job_ids: List[int], **kwargs: Any
2676
- ) -> Dict[str, List[_models.JobStatusReturn]]:
2677
- """Get Job Status History Bulk.
2678
-
2679
- Get Job Status History Bulk.
2680
-
2681
- :keyword job_ids: Required.
2682
- :paramtype job_ids: list[int]
2683
- :return: dict mapping str to list of JobStatusReturn
2684
- :rtype: dict[str, list[~generated.models.JobStatusReturn]]
2685
- :raises ~azure.core.exceptions.HttpResponseError:
2686
- """
2687
- error_map: MutableMapping = {
2688
- 401: ClientAuthenticationError,
2689
- 404: ResourceNotFoundError,
2690
- 409: ResourceExistsError,
2691
- 304: ResourceNotModifiedError,
2692
- }
2693
- error_map.update(kwargs.pop("error_map", {}) or {})
2694
-
2695
- _headers = kwargs.pop("headers", {}) or {}
2696
- _params = kwargs.pop("params", {}) or {}
2697
-
2698
- cls: ClsType[Dict[str, List[_models.JobStatusReturn]]] = kwargs.pop("cls", None)
2699
-
2700
- _request = build_jobs_get_job_status_history_bulk_request(
2701
- job_ids=job_ids,
2702
- headers=_headers,
2703
- params=_params,
2704
- )
2705
- _request.url = self._client.format_url(_request.url)
2706
-
2707
- _stream = False
2708
- pipeline_response: PipelineResponse = (
2709
- self._client._pipeline.run( # pylint: disable=protected-access
2710
- _request, stream=_stream, **kwargs
2711
- )
2712
- )
2713
-
2714
- response = pipeline_response.http_response
2715
-
2716
- if response.status_code not in [200]:
2717
- map_error(
2718
- status_code=response.status_code, response=response, error_map=error_map
2719
- )
2720
- raise HttpResponseError(response=response)
2721
-
2722
- deserialized = self._deserialize(
2723
- "{[JobStatusReturn]}", pipeline_response.http_response
2724
- )
2725
-
2726
- if cls:
2727
- return cls(pipeline_response, deserialized, {}) # type: ignore
2728
-
2729
- return deserialized # type: ignore
2730
-
2731
- @distributed_trace
2732
- def reschedule_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
2733
- """Reschedule Bulk Jobs.
2734
-
2735
- Reschedule Bulk Jobs.
2736
-
2737
- :keyword job_ids: Required.
2738
- :paramtype job_ids: list[int]
2739
- :return: any
2740
- :rtype: any
2741
- :raises ~azure.core.exceptions.HttpResponseError:
2742
- """
2743
- error_map: MutableMapping = {
2744
- 401: ClientAuthenticationError,
2745
- 404: ResourceNotFoundError,
2746
- 409: ResourceExistsError,
2747
- 304: ResourceNotModifiedError,
2748
- }
2749
- error_map.update(kwargs.pop("error_map", {}) or {})
2750
-
2751
- _headers = kwargs.pop("headers", {}) or {}
2752
- _params = kwargs.pop("params", {}) or {}
2753
-
2754
- cls: ClsType[Any] = kwargs.pop("cls", None)
2755
-
2756
- _request = build_jobs_reschedule_bulk_jobs_request(
2757
- job_ids=job_ids,
2758
- headers=_headers,
2759
- params=_params,
2760
- )
2761
- _request.url = self._client.format_url(_request.url)
2762
-
2763
- _stream = False
2764
- pipeline_response: PipelineResponse = (
2765
- self._client._pipeline.run( # pylint: disable=protected-access
2766
- _request, stream=_stream, **kwargs
2767
- )
2768
- )
2769
-
2770
- response = pipeline_response.http_response
2771
-
2772
- if response.status_code not in [200]:
2773
- map_error(
2774
- status_code=response.status_code, response=response, error_map=error_map
2775
- )
2776
- raise HttpResponseError(response=response)
2777
-
2778
- deserialized = self._deserialize("object", pipeline_response.http_response)
2779
-
2780
- if cls:
2781
- return cls(pipeline_response, deserialized, {}) # type: ignore
2782
-
2783
- return deserialized # type: ignore
2784
-
2785
- @distributed_trace
2786
- def reschedule_single_job(self, job_id: int, **kwargs: Any) -> Any:
2787
- """Reschedule Single Job.
2788
-
2789
- Reschedule Single Job.
2790
-
2791
- :param job_id: Required.
2792
- :type job_id: int
2793
- :return: any
2794
- :rtype: any
2795
- :raises ~azure.core.exceptions.HttpResponseError:
2796
- """
2797
- error_map: MutableMapping = {
2798
- 401: ClientAuthenticationError,
2799
- 404: ResourceNotFoundError,
2800
- 409: ResourceExistsError,
2801
- 304: ResourceNotModifiedError,
2802
- }
2803
- error_map.update(kwargs.pop("error_map", {}) or {})
2804
-
2805
- _headers = kwargs.pop("headers", {}) or {}
2806
- _params = kwargs.pop("params", {}) or {}
2807
-
2808
- cls: ClsType[Any] = kwargs.pop("cls", None)
2809
-
2810
- _request = build_jobs_reschedule_single_job_request(
2811
- job_id=job_id,
2812
- headers=_headers,
2813
- params=_params,
2814
- )
2815
- _request.url = self._client.format_url(_request.url)
2816
-
2817
- _stream = False
2818
- pipeline_response: PipelineResponse = (
2819
- self._client._pipeline.run( # pylint: disable=protected-access
2820
- _request, stream=_stream, **kwargs
2821
- )
2822
- )
2823
-
2824
- response = pipeline_response.http_response
2825
-
2826
- if response.status_code not in [200]:
2827
- map_error(
2828
- status_code=response.status_code, response=response, error_map=error_map
2829
- )
2830
- raise HttpResponseError(response=response)
2831
-
2832
- deserialized = self._deserialize("object", pipeline_response.http_response)
2833
-
2834
- if cls:
2835
- return cls(pipeline_response, deserialized, {}) # type: ignore
2836
-
2837
- return deserialized # type: ignore
2838
-
2839
- @overload
2840
- def search(
2841
- self,
2842
- body: Optional[_models.JobSearchParams] = None,
2843
- *,
2844
- page: int = 1,
2845
- per_page: int = 100,
2846
- content_type: str = "application/json",
2847
- **kwargs: Any,
2848
- ) -> List[JSON]:
2849
- """Search.
2850
-
2851
- Retrieve information about jobs.
2852
-
2853
- **TODO: Add more docs**.
2854
-
2855
- :param body: Default value is None.
2856
- :type body: ~generated.models.JobSearchParams
2857
- :keyword page: Default value is 1.
2858
- :paramtype page: int
2859
- :keyword per_page: Default value is 100.
2860
- :paramtype per_page: int
2861
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2862
- Default value is "application/json".
2863
- :paramtype content_type: str
2864
- :return: list of JSON
2865
- :rtype: list[JSON]
2866
- :raises ~azure.core.exceptions.HttpResponseError:
2867
- """
2868
-
2869
- @overload
2870
- def search(
2871
- self,
2872
- body: Optional[IO[bytes]] = None,
2873
- *,
2874
- page: int = 1,
2875
- per_page: int = 100,
2876
- content_type: str = "application/json",
2877
- **kwargs: Any,
2878
- ) -> List[JSON]:
2879
- """Search.
2880
-
2881
- Retrieve information about jobs.
2882
-
2883
- **TODO: Add more docs**.
2884
-
2885
- :param body: Default value is None.
2886
- :type body: IO[bytes]
2887
- :keyword page: Default value is 1.
2888
- :paramtype page: int
2889
- :keyword per_page: Default value is 100.
2890
- :paramtype per_page: int
2891
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
2892
- Default value is "application/json".
2893
- :paramtype content_type: str
2894
- :return: list of JSON
2895
- :rtype: list[JSON]
2896
- :raises ~azure.core.exceptions.HttpResponseError:
2897
- """
2898
-
2899
- @distributed_trace
2900
- def search(
2901
- self,
2902
- body: Optional[Union[_models.JobSearchParams, IO[bytes]]] = None,
2903
- *,
2904
- page: int = 1,
2905
- per_page: int = 100,
2906
- **kwargs: Any,
2907
- ) -> List[JSON]:
2908
- """Search.
2909
-
2910
- Retrieve information about jobs.
2911
-
2912
- **TODO: Add more docs**.
2913
-
2914
- :param body: Is either a JobSearchParams type or a IO[bytes] type. Default value is None.
2915
- :type body: ~generated.models.JobSearchParams or IO[bytes]
2916
- :keyword page: Default value is 1.
2917
- :paramtype page: int
2918
- :keyword per_page: Default value is 100.
2919
- :paramtype per_page: int
2920
- :return: list of JSON
2921
- :rtype: list[JSON]
2922
- :raises ~azure.core.exceptions.HttpResponseError:
2923
- """
2924
- error_map: MutableMapping = {
2925
- 401: ClientAuthenticationError,
2926
- 404: ResourceNotFoundError,
2927
- 409: ResourceExistsError,
2928
- 304: ResourceNotModifiedError,
2929
- }
2930
- error_map.update(kwargs.pop("error_map", {}) or {})
2931
-
2932
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
1690
+ _headers = kwargs.pop("headers", {}) or {}
2933
1691
  _params = kwargs.pop("params", {}) or {}
2934
1692
 
2935
- content_type: Optional[str] = kwargs.pop(
2936
- "content_type", _headers.pop("Content-Type", None)
2937
- )
2938
- cls: ClsType[List[JSON]] = kwargs.pop("cls", None)
2939
-
2940
- content_type = content_type or "application/json"
2941
- _json = None
2942
- _content = None
2943
- if isinstance(body, (IOBase, bytes)):
2944
- _content = body
2945
- else:
2946
- if body is not None:
2947
- _json = self._serialize.body(body, "JobSearchParams")
2948
- else:
2949
- _json = None
1693
+ cls: ClsType[Any] = kwargs.pop("cls", None)
2950
1694
 
2951
- _request = build_jobs_search_request(
2952
- page=page,
2953
- per_page=per_page,
2954
- content_type=content_type,
2955
- json=_json,
2956
- content=_content,
1695
+ _request = build_jobs_unassign_bulk_jobs_sandboxes_request(
1696
+ jobs_ids=jobs_ids,
2957
1697
  headers=_headers,
2958
1698
  params=_params,
2959
1699
  )
@@ -2968,77 +1708,29 @@ class JobsOperations: # pylint: disable=too-many-public-methods
2968
1708
 
2969
1709
  response = pipeline_response.http_response
2970
1710
 
2971
- if response.status_code not in [200, 206]:
1711
+ if response.status_code not in [200]:
2972
1712
  map_error(
2973
1713
  status_code=response.status_code, response=response, error_map=error_map
2974
1714
  )
2975
1715
  raise HttpResponseError(response=response)
2976
1716
 
2977
- response_headers = {}
2978
- if response.status_code == 206:
2979
- response_headers["Content-Range"] = self._deserialize(
2980
- "str", response.headers.get("Content-Range")
2981
- )
2982
-
2983
- deserialized = self._deserialize("[object]", pipeline_response.http_response)
1717
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2984
1718
 
2985
1719
  if cls:
2986
- return cls(pipeline_response, deserialized, response_headers) # type: ignore
1720
+ return cls(pipeline_response, deserialized, {}) # type: ignore
2987
1721
 
2988
1722
  return deserialized # type: ignore
2989
1723
 
2990
- @overload
2991
- def summary(
2992
- self,
2993
- body: _models.JobSummaryParams,
2994
- *,
2995
- content_type: str = "application/json",
2996
- **kwargs: Any,
2997
- ) -> Any:
2998
- """Summary.
2999
-
3000
- Show information suitable for plotting.
3001
-
3002
- :param body: Required.
3003
- :type body: ~generated.models.JobSummaryParams
3004
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
3005
- Default value is "application/json".
3006
- :paramtype content_type: str
3007
- :return: any
3008
- :rtype: any
3009
- :raises ~azure.core.exceptions.HttpResponseError:
3010
- """
3011
-
3012
- @overload
3013
- def summary(
3014
- self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
3015
- ) -> Any:
3016
- """Summary.
3017
-
3018
- Show information suitable for plotting.
3019
-
3020
- :param body: Required.
3021
- :type body: IO[bytes]
3022
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
3023
- Default value is "application/json".
3024
- :paramtype content_type: str
3025
- :return: any
3026
- :rtype: any
3027
- :raises ~azure.core.exceptions.HttpResponseError:
3028
- """
3029
-
3030
1724
  @distributed_trace
3031
- def summary(
3032
- self, body: Union[_models.JobSummaryParams, IO[bytes]], **kwargs: Any
3033
- ) -> Any:
3034
- """Summary.
1725
+ def get_job_sandboxes(self, job_id: int, **kwargs: Any) -> Dict[str, List[Any]]:
1726
+ """Get Job Sandboxes.
3035
1727
 
3036
- Show information suitable for plotting.
1728
+ Get input and output sandboxes of given job.
3037
1729
 
3038
- :param body: Is either a JobSummaryParams type or a IO[bytes] type. Required.
3039
- :type body: ~generated.models.JobSummaryParams or IO[bytes]
3040
- :return: any
3041
- :rtype: any
1730
+ :param job_id: Required.
1731
+ :type job_id: int
1732
+ :return: dict mapping str to list of any
1733
+ :rtype: dict[str, list[any]]
3042
1734
  :raises ~azure.core.exceptions.HttpResponseError:
3043
1735
  """
3044
1736
  error_map: MutableMapping = {
@@ -3049,26 +1741,13 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3049
1741
  }
3050
1742
  error_map.update(kwargs.pop("error_map", {}) or {})
3051
1743
 
3052
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
1744
+ _headers = kwargs.pop("headers", {}) or {}
3053
1745
  _params = kwargs.pop("params", {}) or {}
3054
1746
 
3055
- content_type: Optional[str] = kwargs.pop(
3056
- "content_type", _headers.pop("Content-Type", None)
3057
- )
3058
- cls: ClsType[Any] = kwargs.pop("cls", None)
3059
-
3060
- content_type = content_type or "application/json"
3061
- _json = None
3062
- _content = None
3063
- if isinstance(body, (IOBase, bytes)):
3064
- _content = body
3065
- else:
3066
- _json = self._serialize.body(body, "JobSummaryParams")
1747
+ cls: ClsType[Dict[str, List[Any]]] = kwargs.pop("cls", None)
3067
1748
 
3068
- _request = build_jobs_summary_request(
3069
- content_type=content_type,
3070
- json=_json,
3071
- content=_content,
1749
+ _request = build_jobs_get_job_sandboxes_request(
1750
+ job_id=job_id,
3072
1751
  headers=_headers,
3073
1752
  params=_params,
3074
1753
  )
@@ -3089,7 +1768,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3089
1768
  )
3090
1769
  raise HttpResponseError(response=response)
3091
1770
 
3092
- deserialized = self._deserialize("object", pipeline_response.http_response)
1771
+ deserialized = self._deserialize("{[object]}", pipeline_response.http_response)
3093
1772
 
3094
1773
  if cls:
3095
1774
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -3097,10 +1776,10 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3097
1776
  return deserialized # type: ignore
3098
1777
 
3099
1778
  @distributed_trace
3100
- def get_single_job(self, job_id: int, **kwargs: Any) -> Any:
3101
- """Get Single Job.
1779
+ def unassign_job_sandboxes(self, job_id: int, **kwargs: Any) -> Any:
1780
+ """Unassign Job Sandboxes.
3102
1781
 
3103
- Get Single Job.
1782
+ Delete single job sandbox mapping.
3104
1783
 
3105
1784
  :param job_id: Required.
3106
1785
  :type job_id: int
@@ -3121,7 +1800,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3121
1800
 
3122
1801
  cls: ClsType[Any] = kwargs.pop("cls", None)
3123
1802
 
3124
- _request = build_jobs_get_single_job_request(
1803
+ _request = build_jobs_unassign_job_sandboxes_request(
3125
1804
  job_id=job_id,
3126
1805
  headers=_headers,
3127
1806
  params=_params,
@@ -3151,15 +1830,19 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3151
1830
  return deserialized # type: ignore
3152
1831
 
3153
1832
  @distributed_trace
3154
- def delete_single_job(self, job_id: int, **kwargs: Any) -> Any:
3155
- """Delete Single Job.
1833
+ def get_job_sandbox(
1834
+ self, job_id: int, sandbox_type: Union[str, _models.SandboxType], **kwargs: Any
1835
+ ) -> List[Any]:
1836
+ """Get Job Sandbox.
3156
1837
 
3157
- Delete a job by killing and setting the job status to DELETED.
1838
+ Get input or output sandbox of given job.
3158
1839
 
3159
1840
  :param job_id: Required.
3160
1841
  :type job_id: int
3161
- :return: any
3162
- :rtype: any
1842
+ :param sandbox_type: Known values are: "input" and "output". Required.
1843
+ :type sandbox_type: str or ~generated.models.SandboxType
1844
+ :return: list of any
1845
+ :rtype: list[any]
3163
1846
  :raises ~azure.core.exceptions.HttpResponseError:
3164
1847
  """
3165
1848
  error_map: MutableMapping = {
@@ -3173,10 +1856,11 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3173
1856
  _headers = kwargs.pop("headers", {}) or {}
3174
1857
  _params = kwargs.pop("params", {}) or {}
3175
1858
 
3176
- cls: ClsType[Any] = kwargs.pop("cls", None)
1859
+ cls: ClsType[List[Any]] = kwargs.pop("cls", None)
3177
1860
 
3178
- _request = build_jobs_delete_single_job_request(
1861
+ _request = build_jobs_get_job_sandbox_request(
3179
1862
  job_id=job_id,
1863
+ sandbox_type=sandbox_type,
3180
1864
  headers=_headers,
3181
1865
  params=_params,
3182
1866
  )
@@ -3197,7 +1881,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3197
1881
  )
3198
1882
  raise HttpResponseError(response=response)
3199
1883
 
3200
- deserialized = self._deserialize("object", pipeline_response.http_response)
1884
+ deserialized = self._deserialize("[object]", pipeline_response.http_response)
3201
1885
 
3202
1886
  if cls:
3203
1887
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -3205,19 +1889,15 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3205
1889
  return deserialized # type: ignore
3206
1890
 
3207
1891
  @distributed_trace
3208
- def set_single_job_properties(
3209
- self, job_id: int, body: JSON, *, update_timestamp: bool = False, **kwargs: Any
3210
- ) -> Any:
3211
- """Set Single Job Properties.
1892
+ def assign_sandbox_to_job(self, job_id: int, body: str, **kwargs: Any) -> Any:
1893
+ """Assign Sandbox To Job.
3212
1894
 
3213
- Update the given job properties (MinorStatus, ApplicationStatus, etc).
1895
+ Map the pfn as output sandbox to job.
3214
1896
 
3215
1897
  :param job_id: Required.
3216
1898
  :type job_id: int
3217
1899
  :param body: Required.
3218
- :type body: JSON
3219
- :keyword update_timestamp: Default value is False.
3220
- :paramtype update_timestamp: bool
1900
+ :type body: str
3221
1901
  :return: any
3222
1902
  :rtype: any
3223
1903
  :raises ~azure.core.exceptions.HttpResponseError:
@@ -3238,13 +1918,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3238
1918
  )
3239
1919
  cls: ClsType[Any] = kwargs.pop("cls", None)
3240
1920
 
3241
- _json = self._serialize.body(body, "object")
1921
+ _content = self._serialize.body(body, "str")
3242
1922
 
3243
- _request = build_jobs_set_single_job_properties_request(
1923
+ _request = build_jobs_assign_sandbox_to_job_request(
3244
1924
  job_id=job_id,
3245
- update_timestamp=update_timestamp,
3246
1925
  content_type=content_type,
3247
- json=_json,
1926
+ content=_content,
3248
1927
  headers=_headers,
3249
1928
  params=_params,
3250
1929
  )
@@ -3273,13 +1952,18 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3273
1952
  return deserialized # type: ignore
3274
1953
 
3275
1954
  @distributed_trace
3276
- def kill_single_job(self, job_id: int, **kwargs: Any) -> Any:
3277
- """Kill Single Job.
1955
+ def remove_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
1956
+ """Remove Bulk Jobs.
3278
1957
 
3279
- Kill a job.
1958
+ Fully remove a list of jobs from the WMS databases.
3280
1959
 
3281
- :param job_id: Required.
3282
- :type job_id: int
1960
+ WARNING: This endpoint has been implemented for the compatibility with the legacy DIRAC WMS
1961
+ and the JobCleaningAgent. However, once this agent is ported to diracx, this endpoint should
1962
+ be removed, and a status change to Deleted (PATCH /jobs/status) should be used instead for any
1963
+ other purpose.
1964
+
1965
+ :keyword job_ids: Required.
1966
+ :paramtype job_ids: list[int]
3283
1967
  :return: any
3284
1968
  :rtype: any
3285
1969
  :raises ~azure.core.exceptions.HttpResponseError:
@@ -3297,8 +1981,134 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3297
1981
 
3298
1982
  cls: ClsType[Any] = kwargs.pop("cls", None)
3299
1983
 
3300
- _request = build_jobs_kill_single_job_request(
3301
- job_id=job_id,
1984
+ _request = build_jobs_remove_bulk_jobs_request(
1985
+ job_ids=job_ids,
1986
+ headers=_headers,
1987
+ params=_params,
1988
+ )
1989
+ _request.url = self._client.format_url(_request.url)
1990
+
1991
+ _stream = False
1992
+ pipeline_response: PipelineResponse = (
1993
+ self._client._pipeline.run( # pylint: disable=protected-access
1994
+ _request, stream=_stream, **kwargs
1995
+ )
1996
+ )
1997
+
1998
+ response = pipeline_response.http_response
1999
+
2000
+ if response.status_code not in [200]:
2001
+ map_error(
2002
+ status_code=response.status_code, response=response, error_map=error_map
2003
+ )
2004
+ raise HttpResponseError(response=response)
2005
+
2006
+ deserialized = self._deserialize("object", pipeline_response.http_response)
2007
+
2008
+ if cls:
2009
+ return cls(pipeline_response, deserialized, {}) # type: ignore
2010
+
2011
+ return deserialized # type: ignore
2012
+
2013
+ @overload
2014
+ def set_job_statuses(
2015
+ self,
2016
+ body: Dict[str, Dict[str, _models.JobStatusUpdate]],
2017
+ *,
2018
+ force: bool = False,
2019
+ content_type: str = "application/json",
2020
+ **kwargs: Any,
2021
+ ) -> _models.SetJobStatusReturn:
2022
+ """Set Job Statuses.
2023
+
2024
+ Set Job Statuses.
2025
+
2026
+ :param body: Required.
2027
+ :type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]]
2028
+ :keyword force: Default value is False.
2029
+ :paramtype force: bool
2030
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2031
+ Default value is "application/json".
2032
+ :paramtype content_type: str
2033
+ :return: SetJobStatusReturn
2034
+ :rtype: ~generated.models.SetJobStatusReturn
2035
+ :raises ~azure.core.exceptions.HttpResponseError:
2036
+ """
2037
+
2038
+ @overload
2039
+ def set_job_statuses(
2040
+ self,
2041
+ body: IO[bytes],
2042
+ *,
2043
+ force: bool = False,
2044
+ content_type: str = "application/json",
2045
+ **kwargs: Any,
2046
+ ) -> _models.SetJobStatusReturn:
2047
+ """Set Job Statuses.
2048
+
2049
+ Set Job Statuses.
2050
+
2051
+ :param body: Required.
2052
+ :type body: IO[bytes]
2053
+ :keyword force: Default value is False.
2054
+ :paramtype force: bool
2055
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
2056
+ Default value is "application/json".
2057
+ :paramtype content_type: str
2058
+ :return: SetJobStatusReturn
2059
+ :rtype: ~generated.models.SetJobStatusReturn
2060
+ :raises ~azure.core.exceptions.HttpResponseError:
2061
+ """
2062
+
2063
+ @distributed_trace
2064
+ def set_job_statuses(
2065
+ self,
2066
+ body: Union[Dict[str, Dict[str, _models.JobStatusUpdate]], IO[bytes]],
2067
+ *,
2068
+ force: bool = False,
2069
+ **kwargs: Any,
2070
+ ) -> _models.SetJobStatusReturn:
2071
+ """Set Job Statuses.
2072
+
2073
+ Set Job Statuses.
2074
+
2075
+ :param body: Is either a {str: {str: JobStatusUpdate}} type or a IO[bytes] type. Required.
2076
+ :type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]] or IO[bytes]
2077
+ :keyword force: Default value is False.
2078
+ :paramtype force: bool
2079
+ :return: SetJobStatusReturn
2080
+ :rtype: ~generated.models.SetJobStatusReturn
2081
+ :raises ~azure.core.exceptions.HttpResponseError:
2082
+ """
2083
+ error_map: MutableMapping = {
2084
+ 401: ClientAuthenticationError,
2085
+ 404: ResourceNotFoundError,
2086
+ 409: ResourceExistsError,
2087
+ 304: ResourceNotModifiedError,
2088
+ }
2089
+ error_map.update(kwargs.pop("error_map", {}) or {})
2090
+
2091
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
2092
+ _params = kwargs.pop("params", {}) or {}
2093
+
2094
+ content_type: Optional[str] = kwargs.pop(
2095
+ "content_type", _headers.pop("Content-Type", None)
2096
+ )
2097
+ cls: ClsType[_models.SetJobStatusReturn] = kwargs.pop("cls", None)
2098
+
2099
+ content_type = content_type or "application/json"
2100
+ _json = None
2101
+ _content = None
2102
+ if isinstance(body, (IOBase, bytes)):
2103
+ _content = body
2104
+ else:
2105
+ _json = self._serialize.body(body, "{{JobStatusUpdate}}")
2106
+
2107
+ _request = build_jobs_set_job_statuses_request(
2108
+ force=force,
2109
+ content_type=content_type,
2110
+ json=_json,
2111
+ content=_content,
3302
2112
  headers=_headers,
3303
2113
  params=_params,
3304
2114
  )
@@ -3319,7 +2129,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3319
2129
  )
3320
2130
  raise HttpResponseError(response=response)
3321
2131
 
3322
- deserialized = self._deserialize("object", pipeline_response.http_response)
2132
+ deserialized = self._deserialize(
2133
+ "SetJobStatusReturn", pipeline_response.http_response
2134
+ )
3323
2135
 
3324
2136
  if cls:
3325
2137
  return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -3327,17 +2139,17 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3327
2139
  return deserialized # type: ignore
3328
2140
 
3329
2141
  @distributed_trace
3330
- def remove_single_job(self, job_id: int, **kwargs: Any) -> Any:
3331
- """Remove Single Job.
3332
-
3333
- Fully remove a job from the WMS databases.
2142
+ def reschedule_bulk_jobs(
2143
+ self, *, job_ids: List[int], reset_jobs: bool = False, **kwargs: Any
2144
+ ) -> Any:
2145
+ """Reschedule Bulk Jobs.
3334
2146
 
3335
- WARNING: This endpoint has been implemented for the compatibility with the legacy DIRAC WMS
3336
- and the JobCleaningAgent. However, once this agent is ported to diracx, this endpoint should
3337
- be removed, and the delete endpoint should be used instead.
2147
+ Reschedule Bulk Jobs.
3338
2148
 
3339
- :param job_id: Required.
3340
- :type job_id: int
2149
+ :keyword job_ids: Required.
2150
+ :paramtype job_ids: list[int]
2151
+ :keyword reset_jobs: Default value is False.
2152
+ :paramtype reset_jobs: bool
3341
2153
  :return: any
3342
2154
  :rtype: any
3343
2155
  :raises ~azure.core.exceptions.HttpResponseError:
@@ -3355,8 +2167,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3355
2167
 
3356
2168
  cls: ClsType[Any] = kwargs.pop("cls", None)
3357
2169
 
3358
- _request = build_jobs_remove_single_job_request(
3359
- job_id=job_id,
2170
+ _request = build_jobs_reschedule_bulk_jobs_request(
2171
+ job_ids=job_ids,
2172
+ reset_jobs=reset_jobs,
3360
2173
  headers=_headers,
3361
2174
  params=_params,
3362
2175
  )
@@ -3384,18 +2197,89 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3384
2197
 
3385
2198
  return deserialized # type: ignore
3386
2199
 
2200
+ @overload
2201
+ def search(
2202
+ self,
2203
+ body: Optional[_models.JobSearchParams] = None,
2204
+ *,
2205
+ page: int = 1,
2206
+ per_page: int = 100,
2207
+ content_type: str = "application/json",
2208
+ **kwargs: Any,
2209
+ ) -> List[JSON]:
2210
+ """Search.
2211
+
2212
+ Retrieve information about jobs.
2213
+
2214
+ **TODO: Add more docs**.
2215
+
2216
+ :param body: Default value is None.
2217
+ :type body: ~generated.models.JobSearchParams
2218
+ :keyword page: Default value is 1.
2219
+ :paramtype page: int
2220
+ :keyword per_page: Default value is 100.
2221
+ :paramtype per_page: int
2222
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2223
+ Default value is "application/json".
2224
+ :paramtype content_type: str
2225
+ :return: list of JSON
2226
+ :rtype: list[JSON]
2227
+ :raises ~azure.core.exceptions.HttpResponseError:
2228
+ """
2229
+
2230
+ @overload
2231
+ def search(
2232
+ self,
2233
+ body: Optional[IO[bytes]] = None,
2234
+ *,
2235
+ page: int = 1,
2236
+ per_page: int = 100,
2237
+ content_type: str = "application/json",
2238
+ **kwargs: Any,
2239
+ ) -> List[JSON]:
2240
+ """Search.
2241
+
2242
+ Retrieve information about jobs.
2243
+
2244
+ **TODO: Add more docs**.
2245
+
2246
+ :param body: Default value is None.
2247
+ :type body: IO[bytes]
2248
+ :keyword page: Default value is 1.
2249
+ :paramtype page: int
2250
+ :keyword per_page: Default value is 100.
2251
+ :paramtype per_page: int
2252
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
2253
+ Default value is "application/json".
2254
+ :paramtype content_type: str
2255
+ :return: list of JSON
2256
+ :rtype: list[JSON]
2257
+ :raises ~azure.core.exceptions.HttpResponseError:
2258
+ """
2259
+
3387
2260
  @distributed_trace
3388
- def get_single_job_status(
3389
- self, job_id: int, **kwargs: Any
3390
- ) -> Dict[str, _models.LimitedJobStatusReturn]:
3391
- """Get Single Job Status.
2261
+ def search(
2262
+ self,
2263
+ body: Optional[Union[_models.JobSearchParams, IO[bytes]]] = None,
2264
+ *,
2265
+ page: int = 1,
2266
+ per_page: int = 100,
2267
+ **kwargs: Any,
2268
+ ) -> List[JSON]:
2269
+ """Search.
2270
+
2271
+ Retrieve information about jobs.
3392
2272
 
3393
- Get Single Job Status.
2273
+ **TODO: Add more docs**.
3394
2274
 
3395
- :param job_id: Required.
3396
- :type job_id: int
3397
- :return: dict mapping str to LimitedJobStatusReturn
3398
- :rtype: dict[str, ~generated.models.LimitedJobStatusReturn]
2275
+ :param body: Is either a JobSearchParams type or a IO[bytes] type. Default value is None.
2276
+ :type body: ~generated.models.JobSearchParams or IO[bytes]
2277
+ :keyword page: Default value is 1.
2278
+ :paramtype page: int
2279
+ :keyword per_page: Default value is 100.
2280
+ :paramtype per_page: int
2281
+ :return: list of JSON
2282
+ :rtype: list[JSON]
3399
2283
  :raises ~azure.core.exceptions.HttpResponseError:
3400
2284
  """
3401
2285
  error_map: MutableMapping = {
@@ -3406,15 +2290,31 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3406
2290
  }
3407
2291
  error_map.update(kwargs.pop("error_map", {}) or {})
3408
2292
 
3409
- _headers = kwargs.pop("headers", {}) or {}
2293
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
3410
2294
  _params = kwargs.pop("params", {}) or {}
3411
2295
 
3412
- cls: ClsType[Dict[str, _models.LimitedJobStatusReturn]] = kwargs.pop(
3413
- "cls", None
2296
+ content_type: Optional[str] = kwargs.pop(
2297
+ "content_type", _headers.pop("Content-Type", None)
3414
2298
  )
2299
+ cls: ClsType[List[JSON]] = kwargs.pop("cls", None)
3415
2300
 
3416
- _request = build_jobs_get_single_job_status_request(
3417
- job_id=job_id,
2301
+ content_type = content_type or "application/json"
2302
+ _json = None
2303
+ _content = None
2304
+ if isinstance(body, (IOBase, bytes)):
2305
+ _content = body
2306
+ else:
2307
+ if body is not None:
2308
+ _json = self._serialize.body(body, "JobSearchParams")
2309
+ else:
2310
+ _json = None
2311
+
2312
+ _request = build_jobs_search_request(
2313
+ page=page,
2314
+ per_page=per_page,
2315
+ content_type=content_type,
2316
+ json=_json,
2317
+ content=_content,
3418
2318
  headers=_headers,
3419
2319
  params=_params,
3420
2320
  )
@@ -3429,98 +2329,77 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3429
2329
 
3430
2330
  response = pipeline_response.http_response
3431
2331
 
3432
- if response.status_code not in [200]:
2332
+ if response.status_code not in [200, 206]:
3433
2333
  map_error(
3434
2334
  status_code=response.status_code, response=response, error_map=error_map
3435
2335
  )
3436
2336
  raise HttpResponseError(response=response)
3437
2337
 
3438
- deserialized = self._deserialize(
3439
- "{LimitedJobStatusReturn}", pipeline_response.http_response
3440
- )
2338
+ response_headers = {}
2339
+ if response.status_code == 206:
2340
+ response_headers["Content-Range"] = self._deserialize(
2341
+ "str", response.headers.get("Content-Range")
2342
+ )
2343
+
2344
+ deserialized = self._deserialize("[object]", pipeline_response.http_response)
3441
2345
 
3442
2346
  if cls:
3443
- return cls(pipeline_response, deserialized, {}) # type: ignore
2347
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
3444
2348
 
3445
2349
  return deserialized # type: ignore
3446
2350
 
3447
2351
  @overload
3448
- def set_single_job_status(
2352
+ def summary(
3449
2353
  self,
3450
- job_id: int,
3451
- body: Dict[str, _models.JobStatusUpdate],
2354
+ body: _models.JobSummaryParams,
3452
2355
  *,
3453
- force: bool = False,
3454
2356
  content_type: str = "application/json",
3455
2357
  **kwargs: Any,
3456
- ) -> Dict[str, _models.SetJobStatusReturn]:
3457
- """Set Single Job Status.
2358
+ ) -> Any:
2359
+ """Summary.
3458
2360
 
3459
- Set Single Job Status.
2361
+ Show information suitable for plotting.
3460
2362
 
3461
- :param job_id: Required.
3462
- :type job_id: int
3463
2363
  :param body: Required.
3464
- :type body: dict[str, ~generated.models.JobStatusUpdate]
3465
- :keyword force: Default value is False.
3466
- :paramtype force: bool
2364
+ :type body: ~generated.models.JobSummaryParams
3467
2365
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
3468
2366
  Default value is "application/json".
3469
2367
  :paramtype content_type: str
3470
- :return: dict mapping str to SetJobStatusReturn
3471
- :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2368
+ :return: any
2369
+ :rtype: any
3472
2370
  :raises ~azure.core.exceptions.HttpResponseError:
3473
2371
  """
3474
2372
 
3475
2373
  @overload
3476
- def set_single_job_status(
3477
- self,
3478
- job_id: int,
3479
- body: IO[bytes],
3480
- *,
3481
- force: bool = False,
3482
- content_type: str = "application/json",
3483
- **kwargs: Any,
3484
- ) -> Dict[str, _models.SetJobStatusReturn]:
3485
- """Set Single Job Status.
2374
+ def summary(
2375
+ self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
2376
+ ) -> Any:
2377
+ """Summary.
3486
2378
 
3487
- Set Single Job Status.
2379
+ Show information suitable for plotting.
3488
2380
 
3489
- :param job_id: Required.
3490
- :type job_id: int
3491
2381
  :param body: Required.
3492
2382
  :type body: IO[bytes]
3493
- :keyword force: Default value is False.
3494
- :paramtype force: bool
3495
2383
  :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
3496
2384
  Default value is "application/json".
3497
2385
  :paramtype content_type: str
3498
- :return: dict mapping str to SetJobStatusReturn
3499
- :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2386
+ :return: any
2387
+ :rtype: any
3500
2388
  :raises ~azure.core.exceptions.HttpResponseError:
3501
2389
  """
3502
2390
 
3503
2391
  @distributed_trace
3504
- def set_single_job_status(
3505
- self,
3506
- job_id: int,
3507
- body: Union[Dict[str, _models.JobStatusUpdate], IO[bytes]],
3508
- *,
3509
- force: bool = False,
3510
- **kwargs: Any,
3511
- ) -> Dict[str, _models.SetJobStatusReturn]:
3512
- """Set Single Job Status.
2392
+ def summary(
2393
+ self, body: Union[_models.JobSummaryParams, IO[bytes]], **kwargs: Any
2394
+ ) -> Any:
2395
+ """Summary.
3513
2396
 
3514
- Set Single Job Status.
2397
+ Show information suitable for plotting.
3515
2398
 
3516
- :param job_id: Required.
3517
- :type job_id: int
3518
- :param body: Is either a {str: JobStatusUpdate} type or a IO[bytes] type. Required.
3519
- :type body: dict[str, ~generated.models.JobStatusUpdate] or IO[bytes]
3520
- :keyword force: Default value is False.
3521
- :paramtype force: bool
3522
- :return: dict mapping str to SetJobStatusReturn
3523
- :rtype: dict[str, ~generated.models.SetJobStatusReturn]
2399
+ :param body: Is either a JobSummaryParams type or a IO[bytes] type. Required.
2400
+ :type body: ~generated.models.JobSummaryParams or IO[bytes]
2401
+ :return: any
2402
+ :rtype: any
3524
2403
  :raises ~azure.core.exceptions.HttpResponseError:
3525
2404
  """
3526
2405
  error_map: MutableMapping = {
@@ -3537,7 +2416,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3537
2416
  content_type: Optional[str] = kwargs.pop(
3538
2417
  "content_type", _headers.pop("Content-Type", None)
3539
2418
  )
3540
- cls: ClsType[Dict[str, _models.SetJobStatusReturn]] = kwargs.pop("cls", None)
2419
+ cls: ClsType[Any] = kwargs.pop("cls", None)
3541
2420
 
3542
2421
  content_type = content_type or "application/json"
3543
2422
  _json = None
@@ -3545,11 +2424,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3545
2424
  if isinstance(body, (IOBase, bytes)):
3546
2425
  _content = body
3547
2426
  else:
3548
- _json = self._serialize.body(body, "{JobStatusUpdate}")
2427
+ _json = self._serialize.body(body, "JobSummaryParams")
3549
2428
 
3550
- _request = build_jobs_set_single_job_status_request(
3551
- job_id=job_id,
3552
- force=force,
2429
+ _request = build_jobs_summary_request(
3553
2430
  content_type=content_type,
3554
2431
  json=_json,
3555
2432
  content=_content,
@@ -3573,27 +2450,61 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3573
2450
  )
3574
2451
  raise HttpResponseError(response=response)
3575
2452
 
3576
- deserialized = self._deserialize(
3577
- "{SetJobStatusReturn}", pipeline_response.http_response
3578
- )
2453
+ deserialized = self._deserialize("object", pipeline_response.http_response)
3579
2454
 
3580
2455
  if cls:
3581
2456
  return cls(pipeline_response, deserialized, {}) # type: ignore
3582
2457
 
3583
2458
  return deserialized # type: ignore
3584
2459
 
2460
+ @overload
2461
+ def submit_bulk_jdl_jobs(
2462
+ self, body: List[str], *, content_type: str = "application/json", **kwargs: Any
2463
+ ) -> List[_models.InsertedJob]:
2464
+ """Submit Bulk Jdl Jobs.
2465
+
2466
+ Submit Bulk Jdl Jobs.
2467
+
2468
+ :param body: Required.
2469
+ :type body: list[str]
2470
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2471
+ Default value is "application/json".
2472
+ :paramtype content_type: str
2473
+ :return: list of InsertedJob
2474
+ :rtype: list[~generated.models.InsertedJob]
2475
+ :raises ~azure.core.exceptions.HttpResponseError:
2476
+ """
2477
+
2478
+ @overload
2479
+ def submit_bulk_jdl_jobs(
2480
+ self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
2481
+ ) -> List[_models.InsertedJob]:
2482
+ """Submit Bulk Jdl Jobs.
2483
+
2484
+ Submit Bulk Jdl Jobs.
2485
+
2486
+ :param body: Required.
2487
+ :type body: IO[bytes]
2488
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
2489
+ Default value is "application/json".
2490
+ :paramtype content_type: str
2491
+ :return: list of InsertedJob
2492
+ :rtype: list[~generated.models.InsertedJob]
2493
+ :raises ~azure.core.exceptions.HttpResponseError:
2494
+ """
2495
+
3585
2496
  @distributed_trace
3586
- def get_single_job_status_history(
3587
- self, job_id: int, **kwargs: Any
3588
- ) -> Dict[str, List[_models.JobStatusReturn]]:
3589
- """Get Single Job Status History.
2497
+ def submit_bulk_jdl_jobs(
2498
+ self, body: Union[List[str], IO[bytes]], **kwargs: Any
2499
+ ) -> List[_models.InsertedJob]:
2500
+ """Submit Bulk Jdl Jobs.
3590
2501
 
3591
- Get Single Job Status History.
2502
+ Submit Bulk Jdl Jobs.
3592
2503
 
3593
- :param job_id: Required.
3594
- :type job_id: int
3595
- :return: dict mapping str to list of JobStatusReturn
3596
- :rtype: dict[str, list[~generated.models.JobStatusReturn]]
2504
+ :param body: Is either a [str] type or a IO[bytes] type. Required.
2505
+ :type body: list[str] or IO[bytes]
2506
+ :return: list of InsertedJob
2507
+ :rtype: list[~generated.models.InsertedJob]
3597
2508
  :raises ~azure.core.exceptions.HttpResponseError:
3598
2509
  """
3599
2510
  error_map: MutableMapping = {
@@ -3604,13 +2515,26 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3604
2515
  }
3605
2516
  error_map.update(kwargs.pop("error_map", {}) or {})
3606
2517
 
3607
- _headers = kwargs.pop("headers", {}) or {}
2518
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
3608
2519
  _params = kwargs.pop("params", {}) or {}
3609
2520
 
3610
- cls: ClsType[Dict[str, List[_models.JobStatusReturn]]] = kwargs.pop("cls", None)
2521
+ content_type: Optional[str] = kwargs.pop(
2522
+ "content_type", _headers.pop("Content-Type", None)
2523
+ )
2524
+ cls: ClsType[List[_models.InsertedJob]] = kwargs.pop("cls", None)
2525
+
2526
+ content_type = content_type or "application/json"
2527
+ _json = None
2528
+ _content = None
2529
+ if isinstance(body, (IOBase, bytes)):
2530
+ _content = body
2531
+ else:
2532
+ _json = self._serialize.body(body, "[str]")
3611
2533
 
3612
- _request = build_jobs_get_single_job_status_history_request(
3613
- job_id=job_id,
2534
+ _request = build_jobs_submit_bulk_jdl_jobs_request(
2535
+ content_type=content_type,
2536
+ json=_json,
2537
+ content=_content,
3614
2538
  headers=_headers,
3615
2539
  params=_params,
3616
2540
  )
@@ -3632,7 +2556,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
3632
2556
  raise HttpResponseError(response=response)
3633
2557
 
3634
2558
  deserialized = self._deserialize(
3635
- "{[JobStatusReturn]}", pipeline_response.http_response
2559
+ "[InsertedJob]", pipeline_response.http_response
3636
2560
  )
3637
2561
 
3638
2562
  if cls: