rapidata 2.35.2__py3-none-any.whl → 2.36.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rapidata might be problematic. Click here for more details.

Files changed (55) hide show
  1. rapidata/__init__.py +2 -1
  2. rapidata/api_client/__init__.py +21 -3
  3. rapidata/api_client/api/__init__.py +1 -0
  4. rapidata/api_client/api/benchmark_api.py +294 -0
  5. rapidata/api_client/api/campaign_api.py +268 -0
  6. rapidata/api_client/api/customer_rapid_api.py +247 -0
  7. rapidata/api_client/api/pipeline_api.py +0 -873
  8. rapidata/api_client/api/sample_api.py +299 -0
  9. rapidata/api_client/models/__init__.py +20 -3
  10. rapidata/api_client/models/and_filter.py +121 -0
  11. rapidata/api_client/models/and_filter_filters_inner.py +268 -0
  12. rapidata/api_client/models/boost_mode.py +37 -0
  13. rapidata/api_client/models/boost_query_result.py +10 -1
  14. rapidata/api_client/models/campaign_filter.py +98 -0
  15. rapidata/api_client/models/change_boost_model.py +89 -0
  16. rapidata/api_client/models/compare_rapid_blueprint.py +5 -3
  17. rapidata/api_client/models/compare_rapid_blueprint1.py +96 -0
  18. rapidata/api_client/models/country_filter.py +98 -0
  19. rapidata/api_client/models/create_leaderboard_model.py +32 -2
  20. rapidata/api_client/models/demographic_filter.py +100 -0
  21. rapidata/api_client/models/feature_flag_model.py +4 -4
  22. rapidata/api_client/models/free_text_payload.py +10 -3
  23. rapidata/api_client/models/free_text_rapid_blueprint.py +10 -3
  24. rapidata/api_client/models/get_compare_ab_summary_result.py +4 -2
  25. rapidata/api_client/models/get_leaderboard_by_id_result.py +29 -2
  26. rapidata/api_client/models/get_public_responses_result.py +95 -0
  27. rapidata/api_client/models/get_sample_by_id_result.py +126 -0
  28. rapidata/api_client/models/language_filter.py +98 -0
  29. rapidata/api_client/models/leaderboard_query_result.py +29 -2
  30. rapidata/api_client/models/new_user_filter.py +96 -0
  31. rapidata/api_client/models/not_filter.py +117 -0
  32. rapidata/api_client/models/or_filter.py +121 -0
  33. rapidata/api_client/models/public_rapid_response.py +112 -0
  34. rapidata/api_client/models/response_count_filter.py +109 -0
  35. rapidata/api_client/models/sample_by_identifier.py +126 -0
  36. rapidata/api_client/models/sample_by_identifier_paged_result.py +105 -0
  37. rapidata/api_client/models/simple_workflow_config_blueprint.py +37 -23
  38. rapidata/api_client/models/user_score_filter.py +102 -0
  39. rapidata/api_client/models/user_state.py +38 -0
  40. rapidata/api_client/models/user_state_filter.py +101 -0
  41. rapidata/api_client_README.md +24 -6
  42. rapidata/rapidata_client/__init__.py +5 -13
  43. rapidata/rapidata_client/benchmark/participant/_participant.py +45 -26
  44. rapidata/rapidata_client/benchmark/rapidata_benchmark.py +26 -2
  45. rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +73 -30
  46. rapidata/rapidata_client/config/__init__.py +1 -0
  47. rapidata/rapidata_client/config/config.py +33 -0
  48. rapidata/rapidata_client/datapoints/assets/_sessions.py +13 -8
  49. rapidata/rapidata_client/order/_rapidata_dataset.py +23 -33
  50. rapidata/rapidata_client/order/rapidata_order_manager.py +298 -219
  51. rapidata/rapidata_client/workflow/_compare_workflow.py +7 -2
  52. {rapidata-2.35.2.dist-info → rapidata-2.36.0.dist-info}/METADATA +1 -1
  53. {rapidata-2.35.2.dist-info → rapidata-2.36.0.dist-info}/RECORD +55 -31
  54. {rapidata-2.35.2.dist-info → rapidata-2.36.0.dist-info}/LICENSE +0 -0
  55. {rapidata-2.35.2.dist-info → rapidata-2.36.0.dist-info}/WHEEL +0 -0
@@ -19,13 +19,10 @@ from typing_extensions import Annotated
19
19
  from pydantic import Field, StrictBytes, StrictStr
20
20
  from typing import Optional, Tuple, Union
21
21
  from typing_extensions import Annotated
22
- from rapidata.api_client.models.add_campaign_artifact_result import AddCampaignArtifactResult
23
- from rapidata.api_client.models.add_campaign_model import AddCampaignModel
24
22
  from rapidata.api_client.models.get_pipeline_by_id_result import GetPipelineByIdResult
25
23
  from rapidata.api_client.models.pipeline_id_workflow_config_put_request import PipelineIdWorkflowConfigPutRequest
26
24
  from rapidata.api_client.models.preliminary_download_model import PreliminaryDownloadModel
27
25
  from rapidata.api_client.models.preliminary_download_result import PreliminaryDownloadResult
28
- from rapidata.api_client.models.update_campaign_model import UpdateCampaignModel
29
26
 
30
27
  from rapidata.api_client.api_client import ApiClient, RequestSerialized
31
28
  from rapidata.api_client.api_response import ApiResponse
@@ -630,876 +627,6 @@ class PipelineApi:
630
627
 
631
628
 
632
629
 
633
- @validate_call
634
- def pipeline_pipeline_id_campaign_artifact_id_put(
635
- self,
636
- pipeline_id: Annotated[StrictStr, Field(description="The id of the pipeline to update.")],
637
- artifact_id: Annotated[StrictStr, Field(description="The id of the campaign artifact to update.")],
638
- update_campaign_model: Annotated[Optional[UpdateCampaignModel], Field(description="The new campaign settings.")] = None,
639
- _request_timeout: Union[
640
- None,
641
- Annotated[StrictFloat, Field(gt=0)],
642
- Tuple[
643
- Annotated[StrictFloat, Field(gt=0)],
644
- Annotated[StrictFloat, Field(gt=0)]
645
- ]
646
- ] = None,
647
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
648
- _content_type: Optional[StrictStr] = None,
649
- _headers: Optional[Dict[StrictStr, Any]] = None,
650
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
651
- ) -> None:
652
- """Updates a specific campaign for a pipeline.
653
-
654
-
655
- :param pipeline_id: The id of the pipeline to update. (required)
656
- :type pipeline_id: str
657
- :param artifact_id: The id of the campaign artifact to update. (required)
658
- :type artifact_id: str
659
- :param update_campaign_model: The new campaign settings.
660
- :type update_campaign_model: UpdateCampaignModel
661
- :param _request_timeout: timeout setting for this request. If one
662
- number provided, it will be total request
663
- timeout. It can also be a pair (tuple) of
664
- (connection, read) timeouts.
665
- :type _request_timeout: int, tuple(int, int), optional
666
- :param _request_auth: set to override the auth_settings for an a single
667
- request; this effectively ignores the
668
- authentication in the spec for a single request.
669
- :type _request_auth: dict, optional
670
- :param _content_type: force content-type for the request.
671
- :type _content_type: str, Optional
672
- :param _headers: set to override the headers for a single
673
- request; this effectively ignores the headers
674
- in the spec for a single request.
675
- :type _headers: dict, optional
676
- :param _host_index: set to override the host_index for a single
677
- request; this effectively ignores the host_index
678
- in the spec for a single request.
679
- :type _host_index: int, optional
680
- :return: Returns the result object.
681
- """ # noqa: E501
682
-
683
- _param = self._pipeline_pipeline_id_campaign_artifact_id_put_serialize(
684
- pipeline_id=pipeline_id,
685
- artifact_id=artifact_id,
686
- update_campaign_model=update_campaign_model,
687
- _request_auth=_request_auth,
688
- _content_type=_content_type,
689
- _headers=_headers,
690
- _host_index=_host_index
691
- )
692
-
693
- _response_types_map: Dict[str, Optional[str]] = {
694
- '204': None,
695
- }
696
- response_data = self.api_client.call_api(
697
- *_param,
698
- _request_timeout=_request_timeout
699
- )
700
- response_data.read()
701
- return self.api_client.response_deserialize(
702
- response_data=response_data,
703
- response_types_map=_response_types_map,
704
- ).data
705
-
706
-
707
- @validate_call
708
- def pipeline_pipeline_id_campaign_artifact_id_put_with_http_info(
709
- self,
710
- pipeline_id: Annotated[StrictStr, Field(description="The id of the pipeline to update.")],
711
- artifact_id: Annotated[StrictStr, Field(description="The id of the campaign artifact to update.")],
712
- update_campaign_model: Annotated[Optional[UpdateCampaignModel], Field(description="The new campaign settings.")] = None,
713
- _request_timeout: Union[
714
- None,
715
- Annotated[StrictFloat, Field(gt=0)],
716
- Tuple[
717
- Annotated[StrictFloat, Field(gt=0)],
718
- Annotated[StrictFloat, Field(gt=0)]
719
- ]
720
- ] = None,
721
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
722
- _content_type: Optional[StrictStr] = None,
723
- _headers: Optional[Dict[StrictStr, Any]] = None,
724
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
725
- ) -> ApiResponse[None]:
726
- """Updates a specific campaign for a pipeline.
727
-
728
-
729
- :param pipeline_id: The id of the pipeline to update. (required)
730
- :type pipeline_id: str
731
- :param artifact_id: The id of the campaign artifact to update. (required)
732
- :type artifact_id: str
733
- :param update_campaign_model: The new campaign settings.
734
- :type update_campaign_model: UpdateCampaignModel
735
- :param _request_timeout: timeout setting for this request. If one
736
- number provided, it will be total request
737
- timeout. It can also be a pair (tuple) of
738
- (connection, read) timeouts.
739
- :type _request_timeout: int, tuple(int, int), optional
740
- :param _request_auth: set to override the auth_settings for an a single
741
- request; this effectively ignores the
742
- authentication in the spec for a single request.
743
- :type _request_auth: dict, optional
744
- :param _content_type: force content-type for the request.
745
- :type _content_type: str, Optional
746
- :param _headers: set to override the headers for a single
747
- request; this effectively ignores the headers
748
- in the spec for a single request.
749
- :type _headers: dict, optional
750
- :param _host_index: set to override the host_index for a single
751
- request; this effectively ignores the host_index
752
- in the spec for a single request.
753
- :type _host_index: int, optional
754
- :return: Returns the result object.
755
- """ # noqa: E501
756
-
757
- _param = self._pipeline_pipeline_id_campaign_artifact_id_put_serialize(
758
- pipeline_id=pipeline_id,
759
- artifact_id=artifact_id,
760
- update_campaign_model=update_campaign_model,
761
- _request_auth=_request_auth,
762
- _content_type=_content_type,
763
- _headers=_headers,
764
- _host_index=_host_index
765
- )
766
-
767
- _response_types_map: Dict[str, Optional[str]] = {
768
- '204': None,
769
- }
770
- response_data = self.api_client.call_api(
771
- *_param,
772
- _request_timeout=_request_timeout
773
- )
774
- response_data.read()
775
- return self.api_client.response_deserialize(
776
- response_data=response_data,
777
- response_types_map=_response_types_map,
778
- )
779
-
780
-
781
- @validate_call
782
- def pipeline_pipeline_id_campaign_artifact_id_put_without_preload_content(
783
- self,
784
- pipeline_id: Annotated[StrictStr, Field(description="The id of the pipeline to update.")],
785
- artifact_id: Annotated[StrictStr, Field(description="The id of the campaign artifact to update.")],
786
- update_campaign_model: Annotated[Optional[UpdateCampaignModel], Field(description="The new campaign settings.")] = None,
787
- _request_timeout: Union[
788
- None,
789
- Annotated[StrictFloat, Field(gt=0)],
790
- Tuple[
791
- Annotated[StrictFloat, Field(gt=0)],
792
- Annotated[StrictFloat, Field(gt=0)]
793
- ]
794
- ] = None,
795
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
796
- _content_type: Optional[StrictStr] = None,
797
- _headers: Optional[Dict[StrictStr, Any]] = None,
798
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
799
- ) -> RESTResponseType:
800
- """Updates a specific campaign for a pipeline.
801
-
802
-
803
- :param pipeline_id: The id of the pipeline to update. (required)
804
- :type pipeline_id: str
805
- :param artifact_id: The id of the campaign artifact to update. (required)
806
- :type artifact_id: str
807
- :param update_campaign_model: The new campaign settings.
808
- :type update_campaign_model: UpdateCampaignModel
809
- :param _request_timeout: timeout setting for this request. If one
810
- number provided, it will be total request
811
- timeout. It can also be a pair (tuple) of
812
- (connection, read) timeouts.
813
- :type _request_timeout: int, tuple(int, int), optional
814
- :param _request_auth: set to override the auth_settings for an a single
815
- request; this effectively ignores the
816
- authentication in the spec for a single request.
817
- :type _request_auth: dict, optional
818
- :param _content_type: force content-type for the request.
819
- :type _content_type: str, Optional
820
- :param _headers: set to override the headers for a single
821
- request; this effectively ignores the headers
822
- in the spec for a single request.
823
- :type _headers: dict, optional
824
- :param _host_index: set to override the host_index for a single
825
- request; this effectively ignores the host_index
826
- in the spec for a single request.
827
- :type _host_index: int, optional
828
- :return: Returns the result object.
829
- """ # noqa: E501
830
-
831
- _param = self._pipeline_pipeline_id_campaign_artifact_id_put_serialize(
832
- pipeline_id=pipeline_id,
833
- artifact_id=artifact_id,
834
- update_campaign_model=update_campaign_model,
835
- _request_auth=_request_auth,
836
- _content_type=_content_type,
837
- _headers=_headers,
838
- _host_index=_host_index
839
- )
840
-
841
- _response_types_map: Dict[str, Optional[str]] = {
842
- '204': None,
843
- }
844
- response_data = self.api_client.call_api(
845
- *_param,
846
- _request_timeout=_request_timeout
847
- )
848
- return response_data.response
849
-
850
-
851
- def _pipeline_pipeline_id_campaign_artifact_id_put_serialize(
852
- self,
853
- pipeline_id,
854
- artifact_id,
855
- update_campaign_model,
856
- _request_auth,
857
- _content_type,
858
- _headers,
859
- _host_index,
860
- ) -> RequestSerialized:
861
-
862
- _host = None
863
-
864
- _collection_formats: Dict[str, str] = {
865
- }
866
-
867
- _path_params: Dict[str, str] = {}
868
- _query_params: List[Tuple[str, str]] = []
869
- _header_params: Dict[str, Optional[str]] = _headers or {}
870
- _form_params: List[Tuple[str, str]] = []
871
- _files: Dict[
872
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
873
- ] = {}
874
- _body_params: Optional[bytes] = None
875
-
876
- # process the path parameters
877
- if pipeline_id is not None:
878
- _path_params['pipelineId'] = pipeline_id
879
- if artifact_id is not None:
880
- _path_params['artifactId'] = artifact_id
881
- # process the query parameters
882
- # process the header parameters
883
- # process the form parameters
884
- # process the body parameter
885
- if update_campaign_model is not None:
886
- _body_params = update_campaign_model
887
-
888
-
889
-
890
- # set the HTTP header `Content-Type`
891
- if _content_type:
892
- _header_params['Content-Type'] = _content_type
893
- else:
894
- _default_content_type = (
895
- self.api_client.select_header_content_type(
896
- [
897
- 'application/json',
898
- 'text/json',
899
- 'application/*+json'
900
- ]
901
- )
902
- )
903
- if _default_content_type is not None:
904
- _header_params['Content-Type'] = _default_content_type
905
-
906
- # authentication setting
907
- _auth_settings: List[str] = [
908
- 'bearer',
909
- 'oauth2'
910
- ]
911
-
912
- return self.api_client.param_serialize(
913
- method='PUT',
914
- resource_path='/pipeline/{pipelineId}/campaign/{artifactId}',
915
- path_params=_path_params,
916
- query_params=_query_params,
917
- header_params=_header_params,
918
- body=_body_params,
919
- post_params=_form_params,
920
- files=_files,
921
- auth_settings=_auth_settings,
922
- collection_formats=_collection_formats,
923
- _host=_host,
924
- _request_auth=_request_auth
925
- )
926
-
927
-
928
-
929
-
930
- @validate_call
931
- def pipeline_pipeline_id_campaign_post(
932
- self,
933
- pipeline_id: Annotated[StrictStr, Field(description="The id of the pipeline to update")],
934
- add_campaign_model: Annotated[Optional[AddCampaignModel], Field(description="The body request")] = None,
935
- _request_timeout: Union[
936
- None,
937
- Annotated[StrictFloat, Field(gt=0)],
938
- Tuple[
939
- Annotated[StrictFloat, Field(gt=0)],
940
- Annotated[StrictFloat, Field(gt=0)]
941
- ]
942
- ] = None,
943
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
944
- _content_type: Optional[StrictStr] = None,
945
- _headers: Optional[Dict[StrictStr, Any]] = None,
946
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
947
- ) -> AddCampaignArtifactResult:
948
- """Adds a campaign to a pipeline.
949
-
950
-
951
- :param pipeline_id: The id of the pipeline to update (required)
952
- :type pipeline_id: str
953
- :param add_campaign_model: The body request
954
- :type add_campaign_model: AddCampaignModel
955
- :param _request_timeout: timeout setting for this request. If one
956
- number provided, it will be total request
957
- timeout. It can also be a pair (tuple) of
958
- (connection, read) timeouts.
959
- :type _request_timeout: int, tuple(int, int), optional
960
- :param _request_auth: set to override the auth_settings for an a single
961
- request; this effectively ignores the
962
- authentication in the spec for a single request.
963
- :type _request_auth: dict, optional
964
- :param _content_type: force content-type for the request.
965
- :type _content_type: str, Optional
966
- :param _headers: set to override the headers for a single
967
- request; this effectively ignores the headers
968
- in the spec for a single request.
969
- :type _headers: dict, optional
970
- :param _host_index: set to override the host_index for a single
971
- request; this effectively ignores the host_index
972
- in the spec for a single request.
973
- :type _host_index: int, optional
974
- :return: Returns the result object.
975
- """ # noqa: E501
976
-
977
- _param = self._pipeline_pipeline_id_campaign_post_serialize(
978
- pipeline_id=pipeline_id,
979
- add_campaign_model=add_campaign_model,
980
- _request_auth=_request_auth,
981
- _content_type=_content_type,
982
- _headers=_headers,
983
- _host_index=_host_index
984
- )
985
-
986
- _response_types_map: Dict[str, Optional[str]] = {
987
- '200': "AddCampaignArtifactResult",
988
- }
989
- response_data = self.api_client.call_api(
990
- *_param,
991
- _request_timeout=_request_timeout
992
- )
993
- response_data.read()
994
- return self.api_client.response_deserialize(
995
- response_data=response_data,
996
- response_types_map=_response_types_map,
997
- ).data
998
-
999
-
1000
- @validate_call
1001
- def pipeline_pipeline_id_campaign_post_with_http_info(
1002
- self,
1003
- pipeline_id: Annotated[StrictStr, Field(description="The id of the pipeline to update")],
1004
- add_campaign_model: Annotated[Optional[AddCampaignModel], Field(description="The body request")] = None,
1005
- _request_timeout: Union[
1006
- None,
1007
- Annotated[StrictFloat, Field(gt=0)],
1008
- Tuple[
1009
- Annotated[StrictFloat, Field(gt=0)],
1010
- Annotated[StrictFloat, Field(gt=0)]
1011
- ]
1012
- ] = None,
1013
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1014
- _content_type: Optional[StrictStr] = None,
1015
- _headers: Optional[Dict[StrictStr, Any]] = None,
1016
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1017
- ) -> ApiResponse[AddCampaignArtifactResult]:
1018
- """Adds a campaign to a pipeline.
1019
-
1020
-
1021
- :param pipeline_id: The id of the pipeline to update (required)
1022
- :type pipeline_id: str
1023
- :param add_campaign_model: The body request
1024
- :type add_campaign_model: AddCampaignModel
1025
- :param _request_timeout: timeout setting for this request. If one
1026
- number provided, it will be total request
1027
- timeout. It can also be a pair (tuple) of
1028
- (connection, read) timeouts.
1029
- :type _request_timeout: int, tuple(int, int), optional
1030
- :param _request_auth: set to override the auth_settings for an a single
1031
- request; this effectively ignores the
1032
- authentication in the spec for a single request.
1033
- :type _request_auth: dict, optional
1034
- :param _content_type: force content-type for the request.
1035
- :type _content_type: str, Optional
1036
- :param _headers: set to override the headers for a single
1037
- request; this effectively ignores the headers
1038
- in the spec for a single request.
1039
- :type _headers: dict, optional
1040
- :param _host_index: set to override the host_index for a single
1041
- request; this effectively ignores the host_index
1042
- in the spec for a single request.
1043
- :type _host_index: int, optional
1044
- :return: Returns the result object.
1045
- """ # noqa: E501
1046
-
1047
- _param = self._pipeline_pipeline_id_campaign_post_serialize(
1048
- pipeline_id=pipeline_id,
1049
- add_campaign_model=add_campaign_model,
1050
- _request_auth=_request_auth,
1051
- _content_type=_content_type,
1052
- _headers=_headers,
1053
- _host_index=_host_index
1054
- )
1055
-
1056
- _response_types_map: Dict[str, Optional[str]] = {
1057
- '200': "AddCampaignArtifactResult",
1058
- }
1059
- response_data = self.api_client.call_api(
1060
- *_param,
1061
- _request_timeout=_request_timeout
1062
- )
1063
- response_data.read()
1064
- return self.api_client.response_deserialize(
1065
- response_data=response_data,
1066
- response_types_map=_response_types_map,
1067
- )
1068
-
1069
-
1070
- @validate_call
1071
- def pipeline_pipeline_id_campaign_post_without_preload_content(
1072
- self,
1073
- pipeline_id: Annotated[StrictStr, Field(description="The id of the pipeline to update")],
1074
- add_campaign_model: Annotated[Optional[AddCampaignModel], Field(description="The body request")] = None,
1075
- _request_timeout: Union[
1076
- None,
1077
- Annotated[StrictFloat, Field(gt=0)],
1078
- Tuple[
1079
- Annotated[StrictFloat, Field(gt=0)],
1080
- Annotated[StrictFloat, Field(gt=0)]
1081
- ]
1082
- ] = None,
1083
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1084
- _content_type: Optional[StrictStr] = None,
1085
- _headers: Optional[Dict[StrictStr, Any]] = None,
1086
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1087
- ) -> RESTResponseType:
1088
- """Adds a campaign to a pipeline.
1089
-
1090
-
1091
- :param pipeline_id: The id of the pipeline to update (required)
1092
- :type pipeline_id: str
1093
- :param add_campaign_model: The body request
1094
- :type add_campaign_model: AddCampaignModel
1095
- :param _request_timeout: timeout setting for this request. If one
1096
- number provided, it will be total request
1097
- timeout. It can also be a pair (tuple) of
1098
- (connection, read) timeouts.
1099
- :type _request_timeout: int, tuple(int, int), optional
1100
- :param _request_auth: set to override the auth_settings for an a single
1101
- request; this effectively ignores the
1102
- authentication in the spec for a single request.
1103
- :type _request_auth: dict, optional
1104
- :param _content_type: force content-type for the request.
1105
- :type _content_type: str, Optional
1106
- :param _headers: set to override the headers for a single
1107
- request; this effectively ignores the headers
1108
- in the spec for a single request.
1109
- :type _headers: dict, optional
1110
- :param _host_index: set to override the host_index for a single
1111
- request; this effectively ignores the host_index
1112
- in the spec for a single request.
1113
- :type _host_index: int, optional
1114
- :return: Returns the result object.
1115
- """ # noqa: E501
1116
-
1117
- _param = self._pipeline_pipeline_id_campaign_post_serialize(
1118
- pipeline_id=pipeline_id,
1119
- add_campaign_model=add_campaign_model,
1120
- _request_auth=_request_auth,
1121
- _content_type=_content_type,
1122
- _headers=_headers,
1123
- _host_index=_host_index
1124
- )
1125
-
1126
- _response_types_map: Dict[str, Optional[str]] = {
1127
- '200': "AddCampaignArtifactResult",
1128
- }
1129
- response_data = self.api_client.call_api(
1130
- *_param,
1131
- _request_timeout=_request_timeout
1132
- )
1133
- return response_data.response
1134
-
1135
-
1136
- def _pipeline_pipeline_id_campaign_post_serialize(
1137
- self,
1138
- pipeline_id,
1139
- add_campaign_model,
1140
- _request_auth,
1141
- _content_type,
1142
- _headers,
1143
- _host_index,
1144
- ) -> RequestSerialized:
1145
-
1146
- _host = None
1147
-
1148
- _collection_formats: Dict[str, str] = {
1149
- }
1150
-
1151
- _path_params: Dict[str, str] = {}
1152
- _query_params: List[Tuple[str, str]] = []
1153
- _header_params: Dict[str, Optional[str]] = _headers or {}
1154
- _form_params: List[Tuple[str, str]] = []
1155
- _files: Dict[
1156
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1157
- ] = {}
1158
- _body_params: Optional[bytes] = None
1159
-
1160
- # process the path parameters
1161
- if pipeline_id is not None:
1162
- _path_params['pipelineId'] = pipeline_id
1163
- # process the query parameters
1164
- # process the header parameters
1165
- # process the form parameters
1166
- # process the body parameter
1167
- if add_campaign_model is not None:
1168
- _body_params = add_campaign_model
1169
-
1170
-
1171
- # set the HTTP header `Accept`
1172
- if 'Accept' not in _header_params:
1173
- _header_params['Accept'] = self.api_client.select_header_accept(
1174
- [
1175
- 'text/plain',
1176
- 'application/json',
1177
- 'text/json'
1178
- ]
1179
- )
1180
-
1181
- # set the HTTP header `Content-Type`
1182
- if _content_type:
1183
- _header_params['Content-Type'] = _content_type
1184
- else:
1185
- _default_content_type = (
1186
- self.api_client.select_header_content_type(
1187
- [
1188
- 'application/json',
1189
- 'text/json',
1190
- 'application/*+json'
1191
- ]
1192
- )
1193
- )
1194
- if _default_content_type is not None:
1195
- _header_params['Content-Type'] = _default_content_type
1196
-
1197
- # authentication setting
1198
- _auth_settings: List[str] = [
1199
- 'bearer',
1200
- 'oauth2'
1201
- ]
1202
-
1203
- return self.api_client.param_serialize(
1204
- method='POST',
1205
- resource_path='/pipeline/{pipelineId}/campaign',
1206
- path_params=_path_params,
1207
- query_params=_query_params,
1208
- header_params=_header_params,
1209
- body=_body_params,
1210
- post_params=_form_params,
1211
- files=_files,
1212
- auth_settings=_auth_settings,
1213
- collection_formats=_collection_formats,
1214
- _host=_host,
1215
- _request_auth=_request_auth
1216
- )
1217
-
1218
-
1219
-
1220
-
1221
- @validate_call
1222
- def pipeline_pipeline_id_campaign_put(
1223
- self,
1224
- pipeline_id: Annotated[StrictStr, Field(description="The id of the pipeline to update.")],
1225
- update_campaign_model: Annotated[Optional[UpdateCampaignModel], Field(description="The new campaign settings.")] = None,
1226
- _request_timeout: Union[
1227
- None,
1228
- Annotated[StrictFloat, Field(gt=0)],
1229
- Tuple[
1230
- Annotated[StrictFloat, Field(gt=0)],
1231
- Annotated[StrictFloat, Field(gt=0)]
1232
- ]
1233
- ] = None,
1234
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1235
- _content_type: Optional[StrictStr] = None,
1236
- _headers: Optional[Dict[StrictStr, Any]] = None,
1237
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1238
- ) -> None:
1239
- """Updates a specific campaign for a pipeline.
1240
-
1241
-
1242
- :param pipeline_id: The id of the pipeline to update. (required)
1243
- :type pipeline_id: str
1244
- :param update_campaign_model: The new campaign settings.
1245
- :type update_campaign_model: UpdateCampaignModel
1246
- :param _request_timeout: timeout setting for this request. If one
1247
- number provided, it will be total request
1248
- timeout. It can also be a pair (tuple) of
1249
- (connection, read) timeouts.
1250
- :type _request_timeout: int, tuple(int, int), optional
1251
- :param _request_auth: set to override the auth_settings for an a single
1252
- request; this effectively ignores the
1253
- authentication in the spec for a single request.
1254
- :type _request_auth: dict, optional
1255
- :param _content_type: force content-type for the request.
1256
- :type _content_type: str, Optional
1257
- :param _headers: set to override the headers for a single
1258
- request; this effectively ignores the headers
1259
- in the spec for a single request.
1260
- :type _headers: dict, optional
1261
- :param _host_index: set to override the host_index for a single
1262
- request; this effectively ignores the host_index
1263
- in the spec for a single request.
1264
- :type _host_index: int, optional
1265
- :return: Returns the result object.
1266
- """ # noqa: E501
1267
-
1268
- _param = self._pipeline_pipeline_id_campaign_put_serialize(
1269
- pipeline_id=pipeline_id,
1270
- update_campaign_model=update_campaign_model,
1271
- _request_auth=_request_auth,
1272
- _content_type=_content_type,
1273
- _headers=_headers,
1274
- _host_index=_host_index
1275
- )
1276
-
1277
- _response_types_map: Dict[str, Optional[str]] = {
1278
- '204': None,
1279
- }
1280
- response_data = self.api_client.call_api(
1281
- *_param,
1282
- _request_timeout=_request_timeout
1283
- )
1284
- response_data.read()
1285
- return self.api_client.response_deserialize(
1286
- response_data=response_data,
1287
- response_types_map=_response_types_map,
1288
- ).data
1289
-
1290
-
1291
- @validate_call
1292
- def pipeline_pipeline_id_campaign_put_with_http_info(
1293
- self,
1294
- pipeline_id: Annotated[StrictStr, Field(description="The id of the pipeline to update.")],
1295
- update_campaign_model: Annotated[Optional[UpdateCampaignModel], Field(description="The new campaign settings.")] = None,
1296
- _request_timeout: Union[
1297
- None,
1298
- Annotated[StrictFloat, Field(gt=0)],
1299
- Tuple[
1300
- Annotated[StrictFloat, Field(gt=0)],
1301
- Annotated[StrictFloat, Field(gt=0)]
1302
- ]
1303
- ] = None,
1304
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1305
- _content_type: Optional[StrictStr] = None,
1306
- _headers: Optional[Dict[StrictStr, Any]] = None,
1307
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1308
- ) -> ApiResponse[None]:
1309
- """Updates a specific campaign for a pipeline.
1310
-
1311
-
1312
- :param pipeline_id: The id of the pipeline to update. (required)
1313
- :type pipeline_id: str
1314
- :param update_campaign_model: The new campaign settings.
1315
- :type update_campaign_model: UpdateCampaignModel
1316
- :param _request_timeout: timeout setting for this request. If one
1317
- number provided, it will be total request
1318
- timeout. It can also be a pair (tuple) of
1319
- (connection, read) timeouts.
1320
- :type _request_timeout: int, tuple(int, int), optional
1321
- :param _request_auth: set to override the auth_settings for an a single
1322
- request; this effectively ignores the
1323
- authentication in the spec for a single request.
1324
- :type _request_auth: dict, optional
1325
- :param _content_type: force content-type for the request.
1326
- :type _content_type: str, Optional
1327
- :param _headers: set to override the headers for a single
1328
- request; this effectively ignores the headers
1329
- in the spec for a single request.
1330
- :type _headers: dict, optional
1331
- :param _host_index: set to override the host_index for a single
1332
- request; this effectively ignores the host_index
1333
- in the spec for a single request.
1334
- :type _host_index: int, optional
1335
- :return: Returns the result object.
1336
- """ # noqa: E501
1337
-
1338
- _param = self._pipeline_pipeline_id_campaign_put_serialize(
1339
- pipeline_id=pipeline_id,
1340
- update_campaign_model=update_campaign_model,
1341
- _request_auth=_request_auth,
1342
- _content_type=_content_type,
1343
- _headers=_headers,
1344
- _host_index=_host_index
1345
- )
1346
-
1347
- _response_types_map: Dict[str, Optional[str]] = {
1348
- '204': None,
1349
- }
1350
- response_data = self.api_client.call_api(
1351
- *_param,
1352
- _request_timeout=_request_timeout
1353
- )
1354
- response_data.read()
1355
- return self.api_client.response_deserialize(
1356
- response_data=response_data,
1357
- response_types_map=_response_types_map,
1358
- )
1359
-
1360
-
1361
- @validate_call
1362
- def pipeline_pipeline_id_campaign_put_without_preload_content(
1363
- self,
1364
- pipeline_id: Annotated[StrictStr, Field(description="The id of the pipeline to update.")],
1365
- update_campaign_model: Annotated[Optional[UpdateCampaignModel], Field(description="The new campaign settings.")] = None,
1366
- _request_timeout: Union[
1367
- None,
1368
- Annotated[StrictFloat, Field(gt=0)],
1369
- Tuple[
1370
- Annotated[StrictFloat, Field(gt=0)],
1371
- Annotated[StrictFloat, Field(gt=0)]
1372
- ]
1373
- ] = None,
1374
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1375
- _content_type: Optional[StrictStr] = None,
1376
- _headers: Optional[Dict[StrictStr, Any]] = None,
1377
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1378
- ) -> RESTResponseType:
1379
- """Updates a specific campaign for a pipeline.
1380
-
1381
-
1382
- :param pipeline_id: The id of the pipeline to update. (required)
1383
- :type pipeline_id: str
1384
- :param update_campaign_model: The new campaign settings.
1385
- :type update_campaign_model: UpdateCampaignModel
1386
- :param _request_timeout: timeout setting for this request. If one
1387
- number provided, it will be total request
1388
- timeout. It can also be a pair (tuple) of
1389
- (connection, read) timeouts.
1390
- :type _request_timeout: int, tuple(int, int), optional
1391
- :param _request_auth: set to override the auth_settings for an a single
1392
- request; this effectively ignores the
1393
- authentication in the spec for a single request.
1394
- :type _request_auth: dict, optional
1395
- :param _content_type: force content-type for the request.
1396
- :type _content_type: str, Optional
1397
- :param _headers: set to override the headers for a single
1398
- request; this effectively ignores the headers
1399
- in the spec for a single request.
1400
- :type _headers: dict, optional
1401
- :param _host_index: set to override the host_index for a single
1402
- request; this effectively ignores the host_index
1403
- in the spec for a single request.
1404
- :type _host_index: int, optional
1405
- :return: Returns the result object.
1406
- """ # noqa: E501
1407
-
1408
- _param = self._pipeline_pipeline_id_campaign_put_serialize(
1409
- pipeline_id=pipeline_id,
1410
- update_campaign_model=update_campaign_model,
1411
- _request_auth=_request_auth,
1412
- _content_type=_content_type,
1413
- _headers=_headers,
1414
- _host_index=_host_index
1415
- )
1416
-
1417
- _response_types_map: Dict[str, Optional[str]] = {
1418
- '204': None,
1419
- }
1420
- response_data = self.api_client.call_api(
1421
- *_param,
1422
- _request_timeout=_request_timeout
1423
- )
1424
- return response_data.response
1425
-
1426
-
1427
- def _pipeline_pipeline_id_campaign_put_serialize(
1428
- self,
1429
- pipeline_id,
1430
- update_campaign_model,
1431
- _request_auth,
1432
- _content_type,
1433
- _headers,
1434
- _host_index,
1435
- ) -> RequestSerialized:
1436
-
1437
- _host = None
1438
-
1439
- _collection_formats: Dict[str, str] = {
1440
- }
1441
-
1442
- _path_params: Dict[str, str] = {}
1443
- _query_params: List[Tuple[str, str]] = []
1444
- _header_params: Dict[str, Optional[str]] = _headers or {}
1445
- _form_params: List[Tuple[str, str]] = []
1446
- _files: Dict[
1447
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1448
- ] = {}
1449
- _body_params: Optional[bytes] = None
1450
-
1451
- # process the path parameters
1452
- if pipeline_id is not None:
1453
- _path_params['pipelineId'] = pipeline_id
1454
- # process the query parameters
1455
- # process the header parameters
1456
- # process the form parameters
1457
- # process the body parameter
1458
- if update_campaign_model is not None:
1459
- _body_params = update_campaign_model
1460
-
1461
-
1462
-
1463
- # set the HTTP header `Content-Type`
1464
- if _content_type:
1465
- _header_params['Content-Type'] = _content_type
1466
- else:
1467
- _default_content_type = (
1468
- self.api_client.select_header_content_type(
1469
- [
1470
- 'application/json',
1471
- 'text/json',
1472
- 'application/*+json'
1473
- ]
1474
- )
1475
- )
1476
- if _default_content_type is not None:
1477
- _header_params['Content-Type'] = _default_content_type
1478
-
1479
- # authentication setting
1480
- _auth_settings: List[str] = [
1481
- 'bearer',
1482
- 'oauth2'
1483
- ]
1484
-
1485
- return self.api_client.param_serialize(
1486
- method='PUT',
1487
- resource_path='/pipeline/{pipelineId}/campaign',
1488
- path_params=_path_params,
1489
- query_params=_query_params,
1490
- header_params=_header_params,
1491
- body=_body_params,
1492
- post_params=_form_params,
1493
- files=_files,
1494
- auth_settings=_auth_settings,
1495
- collection_formats=_collection_formats,
1496
- _host=_host,
1497
- _request_auth=_request_auth
1498
- )
1499
-
1500
-
1501
-
1502
-
1503
630
  @validate_call
1504
631
  def pipeline_pipeline_id_get(
1505
632
  self,