@@ -69,7 +69,7 @@ def get_artifact(self, build_id, artifact_name, project=None):
6969 query_parameters = query_parameters )
7070 return self ._deserialize ('BuildArtifact' , response )
7171
72- def get_artifact_content_zip (self , build_id , artifact_name , project = None ):
72+ def get_artifact_content_zip (self , build_id , artifact_name , project = None , ** kwargs ):
7373 """GetArtifactContentZip.
7474 Gets a specific artifact for a build.
7575 :param int build_id: The ID of the build.
@@ -89,8 +89,13 @@ def get_artifact_content_zip(self, build_id, artifact_name, project=None):
8989 location_id = '1db06c96-014e-44e1-ac91-90b2d4b3e984' ,
9090 version = '4.1' ,
9191 route_values = route_values ,
92- query_parameters = query_parameters )
93- return self ._deserialize ('object' , response )
92+ query_parameters = query_parameters ,
93+ accept_media_type = 'application/zip' )
94+ if "callback" in kwargs :
95+ callback = kwargs ["callback" ]
96+ else :
97+ callback = None
98+ return self ._client .stream_download (response , callback = callback )
9499
95100 def get_artifacts (self , build_id , project = None ):
96101 """GetArtifacts.
@@ -131,7 +136,7 @@ def get_attachments(self, project, build_id, type):
131136 route_values = route_values )
132137 return self ._deserialize ('[Attachment]' , self ._unwrap_collection (response ))
133138
134- def get_attachment (self , project , build_id , timeline_id , record_id , type , name ):
139+ def get_attachment (self , project , build_id , timeline_id , record_id , type , name , ** kwargs ):
135140 """GetAttachment.
136141 [Preview API] Gets a specific attachment.
137142 :param str project: Project ID or project name
@@ -158,8 +163,13 @@ def get_attachment(self, project, build_id, timeline_id, record_id, type, name):
158163 response = self ._send (http_method = 'GET' ,
159164 location_id = 'af5122d3-3438-485e-a25a-2dbbfde84ee6' ,
160165 version = '4.1-preview.1' ,
161- route_values = route_values )
162- return self ._deserialize ('object' , response )
166+ route_values = route_values ,
167+ accept_media_type = 'application/octet-stream' )
168+ if "callback" in kwargs :
169+ callback = kwargs ["callback" ]
170+ else :
171+ callback = None
172+ return self ._client .stream_download (response , callback = callback )
163173
164174 def get_badge (self , project , definition_id , branch_name = None ):
165175 """GetBadge.
@@ -668,54 +678,6 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor
668678 query_parameters = query_parameters )
669679 return self ._deserialize ('[BuildDefinitionReference]' , self ._unwrap_collection (response ))
670680
671- def reset_counter (self , definition_id , counter_id , project = None ):
672- """ResetCounter.
673- Resets the counter variable Value back to the Seed.
674- :param int definition_id: The ID of the definition.
675- :param int counter_id: The ID of the counter.
676- :param str project: Project ID or project name
677- """
678- route_values = {}
679- if project is not None :
680- route_values ['project' ] = self ._serialize .url ('project' , project , 'str' )
681- if definition_id is not None :
682- route_values ['definitionId' ] = self ._serialize .url ('definition_id' , definition_id , 'int' )
683- query_parameters = {}
684- if counter_id is not None :
685- query_parameters ['counterId' ] = self ._serialize .query ('counter_id' , counter_id , 'int' )
686- self ._send (http_method = 'POST' ,
687- location_id = 'dbeaf647-6167-421a-bda9-c9327b25e2e6' ,
688- version = '4.1' ,
689- route_values = route_values ,
690- query_parameters = query_parameters )
691-
692- def update_counter_seed (self , definition_id , counter_id , new_seed , reset_value , project = None ):
693- """UpdateCounterSeed.
694- Changes the counter variable Seed, and optionally resets the Value to this new Seed. Note that if Seed is being set above Value, then Value will be updated regardless.
695- :param int definition_id: The ID of the definition.
696- :param int counter_id: The ID of the counter.
697- :param long new_seed: The new Seed value.
698- :param bool reset_value: Flag indicating if Value should also be reset.
699- :param str project: Project ID or project name
700- """
701- route_values = {}
702- if project is not None :
703- route_values ['project' ] = self ._serialize .url ('project' , project , 'str' )
704- if definition_id is not None :
705- route_values ['definitionId' ] = self ._serialize .url ('definition_id' , definition_id , 'int' )
706- query_parameters = {}
707- if counter_id is not None :
708- query_parameters ['counterId' ] = self ._serialize .query ('counter_id' , counter_id , 'int' )
709- if new_seed is not None :
710- query_parameters ['newSeed' ] = self ._serialize .query ('new_seed' , new_seed , 'long' )
711- if reset_value is not None :
712- query_parameters ['resetValue' ] = self ._serialize .query ('reset_value' , reset_value , 'bool' )
713- self ._send (http_method = 'POST' ,
714- location_id = 'dbeaf647-6167-421a-bda9-c9327b25e2e6' ,
715- version = '4.1' ,
716- route_values = route_values ,
717- query_parameters = query_parameters )
718-
719681 def update_definition (self , definition , definition_id , project = None , secrets_source_definition_id = None , secrets_source_definition_revision = None ):
720682 """UpdateDefinition.
721683 Updates an existing definition.
@@ -745,7 +707,7 @@ def update_definition(self, definition, definition_id, project=None, secrets_sou
745707 content = content )
746708 return self ._deserialize ('BuildDefinition' , response )
747709
748- def get_file_contents (self , project , provider_name , service_endpoint_id = None , repository = None , commit_or_branch = None , path = None ):
710+ def get_file_contents (self , project , provider_name , service_endpoint_id = None , repository = None , commit_or_branch = None , path = None , ** kwargs ):
749711 """GetFileContents.
750712 [Preview API] Gets the contents of a file in the given source code repository.
751713 :param str project: Project ID or project name
@@ -774,8 +736,13 @@ def get_file_contents(self, project, provider_name, service_endpoint_id=None, re
774736 location_id = '29d12225-b1d9-425f-b668-6c594a981313' ,
775737 version = '4.1-preview.1' ,
776738 route_values = route_values ,
777- query_parameters = query_parameters )
778- return self ._deserialize ('object' , response )
739+ query_parameters = query_parameters ,
740+ accept_media_type = 'text/plain' )
741+ if "callback" in kwargs :
742+ callback = kwargs ["callback" ]
743+ else :
744+ callback = None
745+ return self ._client .stream_download (response , callback = callback )
779746
780747 def create_folder (self , folder , project , path ):
781748 """CreateFolder.
@@ -858,7 +825,7 @@ def update_folder(self, folder, project, path):
858825 content = content )
859826 return self ._deserialize ('Folder' , response )
860827
861- def get_build_log (self , project , build_id , log_id , start_line = None , end_line = None ):
828+ def get_build_log (self , project , build_id , log_id , start_line = None , end_line = None , ** kwargs ):
862829 """GetBuildLog.
863830 Gets an individual log file for a build.
864831 :param str project: Project ID or project name
@@ -884,8 +851,13 @@ def get_build_log(self, project, build_id, log_id, start_line=None, end_line=Non
884851 location_id = '35a80daf-7f30-45fc-86e8-6b813d9c90df' ,
885852 version = '4.1' ,
886853 route_values = route_values ,
887- query_parameters = query_parameters )
888- return self ._deserialize ('object' , response )
854+ query_parameters = query_parameters ,
855+ accept_media_type = 'text/plain' )
856+ if "callback" in kwargs :
857+ callback = kwargs ["callback" ]
858+ else :
859+ callback = None
860+ return self ._client .stream_download (response , callback = callback )
889861
890862 def get_build_log_lines (self , project , build_id , log_id , start_line = None , end_line = None ):
891863 """GetBuildLogLines.
@@ -934,7 +906,7 @@ def get_build_logs(self, project, build_id):
934906 route_values = route_values )
935907 return self ._deserialize ('[BuildLog]' , self ._unwrap_collection (response ))
936908
937- def get_build_logs_zip (self , project , build_id ):
909+ def get_build_logs_zip (self , project , build_id , ** kwargs ):
938910 """GetBuildLogsZip.
939911 Gets the logs for a build.
940912 :param str project: Project ID or project name
@@ -949,8 +921,13 @@ def get_build_logs_zip(self, project, build_id):
949921 response = self ._send (http_method = 'GET' ,
950922 location_id = '35a80daf-7f30-45fc-86e8-6b813d9c90df' ,
951923 version = '4.1' ,
952- route_values = route_values )
953- return self ._deserialize ('object' , response )
924+ route_values = route_values ,
925+ accept_media_type = 'application/zip' )
926+ if "callback" in kwargs :
927+ callback = kwargs ["callback" ]
928+ else :
929+ callback = None
930+ return self ._client .stream_download (response , callback = callback )
954931
955932 def get_project_metrics (self , project , metric_aggregation_type = None , min_metrics_time = None ):
956933 """GetProjectMetrics.
@@ -1160,7 +1137,7 @@ def get_build_report(self, project, build_id, type=None):
11601137 query_parameters = query_parameters )
11611138 return self ._deserialize ('BuildReportMetadata' , response )
11621139
1163- def get_build_report_html_content (self , project , build_id , type = None ):
1140+ def get_build_report_html_content (self , project , build_id , type = None , ** kwargs ):
11641141 """GetBuildReportHtmlContent.
11651142 [Preview API] Gets a build report.
11661143 :param str project: Project ID or project name
@@ -1180,8 +1157,13 @@ def get_build_report_html_content(self, project, build_id, type=None):
11801157 location_id = '45bcaa88-67e1-4042-a035-56d3b4a7d44c' ,
11811158 version = '4.1-preview.2' ,
11821159 route_values = route_values ,
1183- query_parameters = query_parameters )
1184- return self ._deserialize ('object' , response )
1160+ query_parameters = query_parameters ,
1161+ accept_media_type = 'text/html' )
1162+ if "callback" in kwargs :
1163+ callback = kwargs ["callback" ]
1164+ else :
1165+ callback = None
1166+ return self ._client .stream_download (response , callback = callback )
11851167
11861168 def list_repositories (self , project , provider_name , service_endpoint_id = None , repository = None , result_set = None , page_results = None , continuation_token = None ):
11871169 """ListRepositories.
@@ -1536,7 +1518,7 @@ def save_template(self, template, project, template_id):
15361518 content = content )
15371519 return self ._deserialize ('BuildDefinitionTemplate' , response )
15381520
1539- def get_ticketed_artifact_content_zip (self , build_id , project_id , artifact_name , download_ticket ):
1521+ def get_ticketed_artifact_content_zip (self , build_id , project_id , artifact_name , download_ticket , ** kwargs ):
15401522 """GetTicketedArtifactContentZip.
15411523 [Preview API] Gets a Zip file of the artifact with the given name for a build.
15421524 :param int build_id: The ID of the build.
@@ -1557,10 +1539,15 @@ def get_ticketed_artifact_content_zip(self, build_id, project_id, artifact_name,
15571539 location_id = '731b7e7a-0b6c-4912-af75-de04fe4899db' ,
15581540 version = '4.1-preview.1' ,
15591541 route_values = route_values ,
1560- query_parameters = query_parameters )
1561- return self ._deserialize ('object' , response )
1562-
1563- def get_ticketed_logs_content_zip (self , build_id , project_id , download_ticket ):
1542+ query_parameters = query_parameters ,
1543+ accept_media_type = 'application/zip' )
1544+ if "callback" in kwargs :
1545+ callback = kwargs ["callback" ]
1546+ else :
1547+ callback = None
1548+ return self ._client .stream_download (response , callback = callback )
1549+
1550+ def get_ticketed_logs_content_zip (self , build_id , project_id , download_ticket , ** kwargs ):
15641551 """GetTicketedLogsContentZip.
15651552 [Preview API] Gets a Zip file of the logs for a given build.
15661553 :param int build_id: The ID of the build.
@@ -1578,8 +1565,13 @@ def get_ticketed_logs_content_zip(self, build_id, project_id, download_ticket):
15781565 location_id = '917890d1-a6b5-432d-832a-6afcf6bb0734' ,
15791566 version = '4.1-preview.1' ,
15801567 route_values = route_values ,
1581- query_parameters = query_parameters )
1582- return self ._deserialize ('object' , response )
1568+ query_parameters = query_parameters ,
1569+ accept_media_type = 'application/zip' )
1570+ if "callback" in kwargs :
1571+ callback = kwargs ["callback" ]
1572+ else :
1573+ callback = None
1574+ return self ._client .stream_download (response , callback = callback )
15831575
15841576 def get_build_timeline (self , project , build_id , timeline_id = None , change_id = None , plan_id = None ):
15851577 """GetBuildTimeline.
0 commit comments