|  |  | 1 |  | // <auto-generated> | 
|  |  | 2 |  | // Copyright (c) Microsoft Corporation. All rights reserved. | 
|  |  | 3 |  | // Licensed under the MIT License. See License.txt in the project root for | 
|  |  | 4 |  | // license information. | 
|  |  | 5 |  | // | 
|  |  | 6 |  | // Code generated by Microsoft (R) AutoRest Code Generator. | 
|  |  | 7 |  | // Changes may cause incorrect behavior and will be lost if the code is | 
|  |  | 8 |  | // regenerated. | 
|  |  | 9 |  | // </auto-generated> | 
|  |  | 10 |  |  | 
|  |  | 11 |  | namespace Microsoft.Azure.HDInsight.Job | 
|  |  | 12 |  | { | 
|  |  | 13 |  |     using Microsoft.Rest; | 
|  |  | 14 |  |     using Microsoft.Rest.Azure; | 
|  |  | 15 |  |     using Models; | 
|  |  | 16 |  |     using System.Collections; | 
|  |  | 17 |  |     using System.Collections.Generic; | 
|  |  | 18 |  |     using System.IO; | 
|  |  | 19 |  |     using System.Threading; | 
|  |  | 20 |  |     using System.Threading.Tasks; | 
|  |  | 21 |  |  | 
|  |  | 22 |  |     /// <summary> | 
|  |  | 23 |  |     /// Extension methods for JobOperations. | 
|  |  | 24 |  |     /// </summary> | 
|  |  | 25 |  |     public static partial class JobOperationsExtensions | 
|  |  | 26 |  |     { | 
|  |  | 27 |  |             /// <summary> | 
|  |  | 28 |  |             /// Gets job details from the specified HDInsight cluster. | 
|  |  | 29 |  |             /// </summary> | 
|  |  | 30 |  |             /// <param name='operations'> | 
|  |  | 31 |  |             /// The operations group for this extension method. | 
|  |  | 32 |  |             /// </param> | 
|  |  | 33 |  |             /// <param name='jobId'> | 
|  |  | 34 |  |             /// The id of the job. | 
|  |  | 35 |  |             /// </param> | 
|  |  | 36 |  |             public static JobDetailRootJsonObject Get(this IJobOperations operations, string jobId) | 
|  |  | 37 |  |             { | 
|  | 2 | 38 |  |                 return operations.GetAsync(jobId).GetAwaiter().GetResult(); | 
|  |  | 39 |  |             } | 
|  |  | 40 |  |  | 
|  |  | 41 |  |             /// <summary> | 
|  |  | 42 |  |             /// Gets job details from the specified HDInsight cluster. | 
|  |  | 43 |  |             /// </summary> | 
|  |  | 44 |  |             /// <param name='operations'> | 
|  |  | 45 |  |             /// The operations group for this extension method. | 
|  |  | 46 |  |             /// </param> | 
|  |  | 47 |  |             /// <param name='jobId'> | 
|  |  | 48 |  |             /// The id of the job. | 
|  |  | 49 |  |             /// </param> | 
|  |  | 50 |  |             /// <param name='cancellationToken'> | 
|  |  | 51 |  |             /// The cancellation token. | 
|  |  | 52 |  |             /// </param> | 
|  |  | 53 |  |             public static async Task<JobDetailRootJsonObject> GetAsync(this IJobOperations operations, string jobId, Can | 
|  |  | 54 |  |             { | 
|  | 2 | 55 |  |                 using (var _result = await operations.GetWithHttpMessagesAsync(jobId, null, cancellationToken).Configure | 
|  |  | 56 |  |                 { | 
|  | 0 | 57 |  |                     return _result.Body; | 
|  |  | 58 |  |                 } | 
|  | 0 | 59 |  |             } | 
|  |  | 60 |  |  | 
|  |  | 61 |  |             /// <summary> | 
|  |  | 62 |  |             /// Initiates cancel on given running job in the specified HDInsight. | 
|  |  | 63 |  |             /// </summary> | 
|  |  | 64 |  |             /// <param name='operations'> | 
|  |  | 65 |  |             /// The operations group for this extension method. | 
|  |  | 66 |  |             /// </param> | 
|  |  | 67 |  |             /// <param name='jobId'> | 
|  |  | 68 |  |             /// The id of the job. | 
|  |  | 69 |  |             /// </param> | 
|  |  | 70 |  |             public static JobDetailRootJsonObject Kill(this IJobOperations operations, string jobId) | 
|  |  | 71 |  |             { | 
|  | 4 | 72 |  |                 return operations.KillAsync(jobId).GetAwaiter().GetResult(); | 
|  |  | 73 |  |             } | 
|  |  | 74 |  |  | 
|  |  | 75 |  |             /// <summary> | 
|  |  | 76 |  |             /// Initiates cancel on given running job in the specified HDInsight. | 
|  |  | 77 |  |             /// </summary> | 
|  |  | 78 |  |             /// <param name='operations'> | 
|  |  | 79 |  |             /// The operations group for this extension method. | 
|  |  | 80 |  |             /// </param> | 
|  |  | 81 |  |             /// <param name='jobId'> | 
|  |  | 82 |  |             /// The id of the job. | 
|  |  | 83 |  |             /// </param> | 
|  |  | 84 |  |             /// <param name='cancellationToken'> | 
|  |  | 85 |  |             /// The cancellation token. | 
|  |  | 86 |  |             /// </param> | 
|  |  | 87 |  |             public static async Task<JobDetailRootJsonObject> KillAsync(this IJobOperations operations, string jobId, Ca | 
|  |  | 88 |  |             { | 
|  | 4 | 89 |  |                 using (var _result = await operations.KillWithHttpMessagesAsync(jobId, null, cancellationToken).Configur | 
|  |  | 90 |  |                 { | 
|  | 2 | 91 |  |                     return _result.Body; | 
|  |  | 92 |  |                 } | 
|  | 2 | 93 |  |             } | 
|  |  | 94 |  |  | 
|  |  | 95 |  |             /// <summary> | 
|  |  | 96 |  |             /// Gets the list of jobs from the specified HDInsight cluster. | 
|  |  | 97 |  |             /// </summary> | 
|  |  | 98 |  |             /// <param name='operations'> | 
|  |  | 99 |  |             /// The operations group for this extension method. | 
|  |  | 100 |  |             /// </param> | 
|  |  | 101 |  |             public static IList<JobListJsonObject> List(this IJobOperations operations) | 
|  |  | 102 |  |             { | 
|  | 6 | 103 |  |                 return operations.ListAsync().GetAwaiter().GetResult(); | 
|  |  | 104 |  |             } | 
|  |  | 105 |  |  | 
|  |  | 106 |  |             /// <summary> | 
|  |  | 107 |  |             /// Gets the list of jobs from the specified HDInsight cluster. | 
|  |  | 108 |  |             /// </summary> | 
|  |  | 109 |  |             /// <param name='operations'> | 
|  |  | 110 |  |             /// The operations group for this extension method. | 
|  |  | 111 |  |             /// </param> | 
|  |  | 112 |  |             /// <param name='cancellationToken'> | 
|  |  | 113 |  |             /// The cancellation token. | 
|  |  | 114 |  |             /// </param> | 
|  |  | 115 |  |             public static async Task<IList<JobListJsonObject>> ListAsync(this IJobOperations operations, CancellationTok | 
|  |  | 116 |  |             { | 
|  | 6 | 117 |  |                 using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait( | 
|  |  | 118 |  |                 { | 
|  | 6 | 119 |  |                     return _result.Body; | 
|  |  | 120 |  |                 } | 
|  | 6 | 121 |  |             } | 
|  |  | 122 |  |  | 
|  |  | 123 |  |             /// <summary> | 
|  |  | 124 |  |             /// Gets numrecords Of Jobs after jobid from the specified HDInsight cluster. | 
|  |  | 125 |  |             /// </summary> | 
|  |  | 126 |  |             /// <param name='operations'> | 
|  |  | 127 |  |             /// The operations group for this extension method. | 
|  |  | 128 |  |             /// </param> | 
|  |  | 129 |  |             /// <param name='jobid'> | 
|  |  | 130 |  |             /// JobId from where to list jobs. | 
|  |  | 131 |  |             /// </param> | 
|  |  | 132 |  |             /// <param name='numrecords'> | 
|  |  | 133 |  |             /// Number of jobs to fetch. | 
|  |  | 134 |  |             /// </param> | 
|  |  | 135 |  |             public static IList<JobListJsonObject> ListAfterJobId(this IJobOperations operations, string jobid = default | 
|  |  | 136 |  |             { | 
|  | 18 | 137 |  |                 return operations.ListAfterJobIdAsync(jobid, numrecords).GetAwaiter().GetResult(); | 
|  |  | 138 |  |             } | 
|  |  | 139 |  |  | 
|  |  | 140 |  |             /// <summary> | 
|  |  | 141 |  |             /// Gets numrecords Of Jobs after jobid from the specified HDInsight cluster. | 
|  |  | 142 |  |             /// </summary> | 
|  |  | 143 |  |             /// <param name='operations'> | 
|  |  | 144 |  |             /// The operations group for this extension method. | 
|  |  | 145 |  |             /// </param> | 
|  |  | 146 |  |             /// <param name='jobid'> | 
|  |  | 147 |  |             /// JobId from where to list jobs. | 
|  |  | 148 |  |             /// </param> | 
|  |  | 149 |  |             /// <param name='numrecords'> | 
|  |  | 150 |  |             /// Number of jobs to fetch. | 
|  |  | 151 |  |             /// </param> | 
|  |  | 152 |  |             /// <param name='cancellationToken'> | 
|  |  | 153 |  |             /// The cancellation token. | 
|  |  | 154 |  |             /// </param> | 
|  |  | 155 |  |             public static async Task<IList<JobListJsonObject>> ListAfterJobIdAsync(this IJobOperations operations, strin | 
|  |  | 156 |  |             { | 
|  | 18 | 157 |  |                 using (var _result = await operations.ListAfterJobIdWithHttpMessagesAsync(jobid, numrecords, null, cance | 
|  |  | 158 |  |                 { | 
|  | 18 | 159 |  |                     return _result.Body; | 
|  |  | 160 |  |                 } | 
|  | 18 | 161 |  |             } | 
|  |  | 162 |  |  | 
|  |  | 163 |  |             /// <summary> | 
|  |  | 164 |  |             /// Submits a Hive job to an HDInsight cluster. | 
|  |  | 165 |  |             /// </summary> | 
|  |  | 166 |  |             /// <param name='operations'> | 
|  |  | 167 |  |             /// The operations group for this extension method. | 
|  |  | 168 |  |             /// </param> | 
|  |  | 169 |  |             /// <param name='content'> | 
|  |  | 170 |  |             /// The content of the Hive job request. | 
|  |  | 171 |  |             /// </param> | 
|  |  | 172 |  |             public static JobSubmissionJsonResponse SubmitHiveJob(this IJobOperations operations, Stream content) | 
|  |  | 173 |  |             { | 
|  | 0 | 174 |  |                 return operations.SubmitHiveJobAsync(content).GetAwaiter().GetResult(); | 
|  |  | 175 |  |             } | 
|  |  | 176 |  |  | 
|  |  | 177 |  |             /// <summary> | 
|  |  | 178 |  |             /// Submits a Hive job to an HDInsight cluster. | 
|  |  | 179 |  |             /// </summary> | 
|  |  | 180 |  |             /// <param name='operations'> | 
|  |  | 181 |  |             /// The operations group for this extension method. | 
|  |  | 182 |  |             /// </param> | 
|  |  | 183 |  |             /// <param name='content'> | 
|  |  | 184 |  |             /// The content of the Hive job request. | 
|  |  | 185 |  |             /// </param> | 
|  |  | 186 |  |             /// <param name='cancellationToken'> | 
|  |  | 187 |  |             /// The cancellation token. | 
|  |  | 188 |  |             /// </param> | 
|  |  | 189 |  |             public static async Task<JobSubmissionJsonResponse> SubmitHiveJobAsync(this IJobOperations operations, Strea | 
|  |  | 190 |  |             { | 
|  | 0 | 191 |  |                 using (var _result = await operations.SubmitHiveJobWithHttpMessagesAsync(content, null, cancellationToke | 
|  |  | 192 |  |                 { | 
|  | 0 | 193 |  |                     return _result.Body; | 
|  |  | 194 |  |                 } | 
|  | 0 | 195 |  |             } | 
|  |  | 196 |  |  | 
|  |  | 197 |  |             /// <summary> | 
|  |  | 198 |  |             /// Submits a MapReduce job to an HDInsight cluster. | 
|  |  | 199 |  |             /// </summary> | 
|  |  | 200 |  |             /// <param name='operations'> | 
|  |  | 201 |  |             /// The operations group for this extension method. | 
|  |  | 202 |  |             /// </param> | 
|  |  | 203 |  |             /// <param name='content'> | 
|  |  | 204 |  |             /// The content of the MapReduce job request. | 
|  |  | 205 |  |             /// </param> | 
|  |  | 206 |  |             public static JobSubmissionJsonResponse SubmitMapReduceJob(this IJobOperations operations, Stream content) | 
|  |  | 207 |  |             { | 
|  | 0 | 208 |  |                 return operations.SubmitMapReduceJobAsync(content).GetAwaiter().GetResult(); | 
|  |  | 209 |  |             } | 
|  |  | 210 |  |  | 
|  |  | 211 |  |             /// <summary> | 
|  |  | 212 |  |             /// Submits a MapReduce job to an HDInsight cluster. | 
|  |  | 213 |  |             /// </summary> | 
|  |  | 214 |  |             /// <param name='operations'> | 
|  |  | 215 |  |             /// The operations group for this extension method. | 
|  |  | 216 |  |             /// </param> | 
|  |  | 217 |  |             /// <param name='content'> | 
|  |  | 218 |  |             /// The content of the MapReduce job request. | 
|  |  | 219 |  |             /// </param> | 
|  |  | 220 |  |             /// <param name='cancellationToken'> | 
|  |  | 221 |  |             /// The cancellation token. | 
|  |  | 222 |  |             /// </param> | 
|  |  | 223 |  |             public static async Task<JobSubmissionJsonResponse> SubmitMapReduceJobAsync(this IJobOperations operations,  | 
|  |  | 224 |  |             { | 
|  | 0 | 225 |  |                 using (var _result = await operations.SubmitMapReduceJobWithHttpMessagesAsync(content, null, cancellatio | 
|  |  | 226 |  |                 { | 
|  | 0 | 227 |  |                     return _result.Body; | 
|  |  | 228 |  |                 } | 
|  | 0 | 229 |  |             } | 
|  |  | 230 |  |  | 
|  |  | 231 |  |             /// <summary> | 
|  |  | 232 |  |             /// Submits a MapReduce streaming job to an HDInsight cluster. | 
|  |  | 233 |  |             /// </summary> | 
|  |  | 234 |  |             /// <param name='operations'> | 
|  |  | 235 |  |             /// The operations group for this extension method. | 
|  |  | 236 |  |             /// </param> | 
|  |  | 237 |  |             /// <param name='content'> | 
|  |  | 238 |  |             /// The content of the MapReduce job request. | 
|  |  | 239 |  |             /// </param> | 
|  |  | 240 |  |             public static JobSubmissionJsonResponse SubmitMapReduceStreamingJob(this IJobOperations operations, Stream c | 
|  |  | 241 |  |             { | 
|  | 0 | 242 |  |                 return operations.SubmitMapReduceStreamingJobAsync(content).GetAwaiter().GetResult(); | 
|  |  | 243 |  |             } | 
|  |  | 244 |  |  | 
|  |  | 245 |  |             /// <summary> | 
|  |  | 246 |  |             /// Submits a MapReduce streaming job to an HDInsight cluster. | 
|  |  | 247 |  |             /// </summary> | 
|  |  | 248 |  |             /// <param name='operations'> | 
|  |  | 249 |  |             /// The operations group for this extension method. | 
|  |  | 250 |  |             /// </param> | 
|  |  | 251 |  |             /// <param name='content'> | 
|  |  | 252 |  |             /// The content of the MapReduce job request. | 
|  |  | 253 |  |             /// </param> | 
|  |  | 254 |  |             /// <param name='cancellationToken'> | 
|  |  | 255 |  |             /// The cancellation token. | 
|  |  | 256 |  |             /// </param> | 
|  |  | 257 |  |             public static async Task<JobSubmissionJsonResponse> SubmitMapReduceStreamingJobAsync(this IJobOperations ope | 
|  |  | 258 |  |             { | 
|  | 0 | 259 |  |                 using (var _result = await operations.SubmitMapReduceStreamingJobWithHttpMessagesAsync(content, null, ca | 
|  |  | 260 |  |                 { | 
|  | 0 | 261 |  |                     return _result.Body; | 
|  |  | 262 |  |                 } | 
|  | 0 | 263 |  |             } | 
|  |  | 264 |  |  | 
|  |  | 265 |  |             /// <summary> | 
|  |  | 266 |  |             /// Submits a Pig job to an HDInsight cluster. | 
|  |  | 267 |  |             /// </summary> | 
|  |  | 268 |  |             /// <param name='operations'> | 
|  |  | 269 |  |             /// The operations group for this extension method. | 
|  |  | 270 |  |             /// </param> | 
|  |  | 271 |  |             /// <param name='content'> | 
|  |  | 272 |  |             /// The content of the Pig job request. | 
|  |  | 273 |  |             /// </param> | 
|  |  | 274 |  |             public static JobSubmissionJsonResponse SubmitPigJob(this IJobOperations operations, Stream content) | 
|  |  | 275 |  |             { | 
|  | 0 | 276 |  |                 return operations.SubmitPigJobAsync(content).GetAwaiter().GetResult(); | 
|  |  | 277 |  |             } | 
|  |  | 278 |  |  | 
|  |  | 279 |  |             /// <summary> | 
|  |  | 280 |  |             /// Submits a Pig job to an HDInsight cluster. | 
|  |  | 281 |  |             /// </summary> | 
|  |  | 282 |  |             /// <param name='operations'> | 
|  |  | 283 |  |             /// The operations group for this extension method. | 
|  |  | 284 |  |             /// </param> | 
|  |  | 285 |  |             /// <param name='content'> | 
|  |  | 286 |  |             /// The content of the Pig job request. | 
|  |  | 287 |  |             /// </param> | 
|  |  | 288 |  |             /// <param name='cancellationToken'> | 
|  |  | 289 |  |             /// The cancellation token. | 
|  |  | 290 |  |             /// </param> | 
|  |  | 291 |  |             public static async Task<JobSubmissionJsonResponse> SubmitPigJobAsync(this IJobOperations operations, Stream | 
|  |  | 292 |  |             { | 
|  | 0 | 293 |  |                 using (var _result = await operations.SubmitPigJobWithHttpMessagesAsync(content, null, cancellationToken | 
|  |  | 294 |  |                 { | 
|  | 0 | 295 |  |                     return _result.Body; | 
|  |  | 296 |  |                 } | 
|  | 0 | 297 |  |             } | 
|  |  | 298 |  |  | 
|  |  | 299 |  |             /// <summary> | 
|  |  | 300 |  |             /// Submits a Sqoop job to an HDInsight cluster. | 
|  |  | 301 |  |             /// </summary> | 
|  |  | 302 |  |             /// <param name='operations'> | 
|  |  | 303 |  |             /// The operations group for this extension method. | 
|  |  | 304 |  |             /// </param> | 
|  |  | 305 |  |             /// <param name='content'> | 
|  |  | 306 |  |             /// The content of the Sqoop job request. | 
|  |  | 307 |  |             /// </param> | 
|  |  | 308 |  |             public static JobSubmissionJsonResponse SubmitSqoopJob(this IJobOperations operations, Stream content) | 
|  |  | 309 |  |             { | 
|  | 0 | 310 |  |                 return operations.SubmitSqoopJobAsync(content).GetAwaiter().GetResult(); | 
|  |  | 311 |  |             } | 
|  |  | 312 |  |  | 
|  |  | 313 |  |             /// <summary> | 
|  |  | 314 |  |             /// Submits a Sqoop job to an HDInsight cluster. | 
|  |  | 315 |  |             /// </summary> | 
|  |  | 316 |  |             /// <param name='operations'> | 
|  |  | 317 |  |             /// The operations group for this extension method. | 
|  |  | 318 |  |             /// </param> | 
|  |  | 319 |  |             /// <param name='content'> | 
|  |  | 320 |  |             /// The content of the Sqoop job request. | 
|  |  | 321 |  |             /// </param> | 
|  |  | 322 |  |             /// <param name='cancellationToken'> | 
|  |  | 323 |  |             /// The cancellation token. | 
|  |  | 324 |  |             /// </param> | 
|  |  | 325 |  |             public static async Task<JobSubmissionJsonResponse> SubmitSqoopJobAsync(this IJobOperations operations, Stre | 
|  |  | 326 |  |             { | 
|  | 0 | 327 |  |                 using (var _result = await operations.SubmitSqoopJobWithHttpMessagesAsync(content, null, cancellationTok | 
|  |  | 328 |  |                 { | 
|  | 0 | 329 |  |                     return _result.Body; | 
|  |  | 330 |  |                 } | 
|  | 0 | 331 |  |             } | 
|  |  | 332 |  |  | 
|  |  | 333 |  |             /// <summary> | 
|  |  | 334 |  |             /// Gets application state from the specified HDInsight cluster. | 
|  |  | 335 |  |             /// </summary> | 
|  |  | 336 |  |             /// <param name='operations'> | 
|  |  | 337 |  |             /// The operations group for this extension method. | 
|  |  | 338 |  |             /// </param> | 
|  |  | 339 |  |             /// <param name='appId'> | 
|  |  | 340 |  |             /// The id of the job. | 
|  |  | 341 |  |             /// </param> | 
|  |  | 342 |  |             public static AppState GetAppState(this IJobOperations operations, string appId) | 
|  |  | 343 |  |             { | 
|  | 0 | 344 |  |                 return operations.GetAppStateAsync(appId).GetAwaiter().GetResult(); | 
|  |  | 345 |  |             } | 
|  |  | 346 |  |  | 
|  |  | 347 |  |             /// <summary> | 
|  |  | 348 |  |             /// Gets application state from the specified HDInsight cluster. | 
|  |  | 349 |  |             /// </summary> | 
|  |  | 350 |  |             /// <param name='operations'> | 
|  |  | 351 |  |             /// The operations group for this extension method. | 
|  |  | 352 |  |             /// </param> | 
|  |  | 353 |  |             /// <param name='appId'> | 
|  |  | 354 |  |             /// The id of the job. | 
|  |  | 355 |  |             /// </param> | 
|  |  | 356 |  |             /// <param name='cancellationToken'> | 
|  |  | 357 |  |             /// The cancellation token. | 
|  |  | 358 |  |             /// </param> | 
|  |  | 359 |  |             public static async Task<AppState> GetAppStateAsync(this IJobOperations operations, string appId, Cancellati | 
|  |  | 360 |  |             { | 
|  | 406 | 361 |  |                 using (var _result = await operations.GetAppStateWithHttpMessagesAsync(appId, null, cancellationToken).C | 
|  |  | 362 |  |                 { | 
|  | 406 | 363 |  |                     return _result.Body; | 
|  |  | 364 |  |                 } | 
|  | 406 | 365 |  |             } | 
|  |  | 366 |  |  | 
|  |  | 367 |  |             /// <summary> | 
|  |  | 368 |  |             /// List all spark batch jobs | 
|  |  | 369 |  |             /// </summary> | 
|  |  | 370 |  |             /// <param name='operations'> | 
|  |  | 371 |  |             /// The operations group for this extension method. | 
|  |  | 372 |  |             /// </param> | 
|  |  | 373 |  |             /// <param name='fromParameter'> | 
|  |  | 374 |  |             /// Optional param specifying which index the list should begin from. | 
|  |  | 375 |  |             /// </param> | 
|  |  | 376 |  |             /// <param name='size'> | 
|  |  | 377 |  |             /// Optional param specifying the size of the returned list. | 
|  |  | 378 |  |             /// By default it is 20 and that is the maximum. | 
|  |  | 379 |  |             /// </param> | 
|  |  | 380 |  |             public static SparkBatchJobCollection ListSparkBatchJob(this IJobOperations operations, int? fromParameter = | 
|  |  | 381 |  |             { | 
|  | 10 | 382 |  |                 return operations.ListSparkBatchJobAsync(fromParameter, size).GetAwaiter().GetResult(); | 
|  |  | 383 |  |             } | 
|  |  | 384 |  |  | 
|  |  | 385 |  |             /// <summary> | 
|  |  | 386 |  |             /// List all spark batch jobs | 
|  |  | 387 |  |             /// </summary> | 
|  |  | 388 |  |             /// <param name='operations'> | 
|  |  | 389 |  |             /// The operations group for this extension method. | 
|  |  | 390 |  |             /// </param> | 
|  |  | 391 |  |             /// <param name='fromParameter'> | 
|  |  | 392 |  |             /// Optional param specifying which index the list should begin from. | 
|  |  | 393 |  |             /// </param> | 
|  |  | 394 |  |             /// <param name='size'> | 
|  |  | 395 |  |             /// Optional param specifying the size of the returned list. | 
|  |  | 396 |  |             /// By default it is 20 and that is the maximum. | 
|  |  | 397 |  |             /// </param> | 
|  |  | 398 |  |             /// <param name='cancellationToken'> | 
|  |  | 399 |  |             /// The cancellation token. | 
|  |  | 400 |  |             /// </param> | 
|  |  | 401 |  |             public static async Task<SparkBatchJobCollection> ListSparkBatchJobAsync(this IJobOperations operations, int | 
|  |  | 402 |  |             { | 
|  | 10 | 403 |  |                 using (var _result = await operations.ListSparkBatchJobWithHttpMessagesAsync(fromParameter, size, null,  | 
|  |  | 404 |  |                 { | 
|  | 10 | 405 |  |                     return _result.Body; | 
|  |  | 406 |  |                 } | 
|  | 10 | 407 |  |             } | 
|  |  | 408 |  |  | 
|  |  | 409 |  |             /// <summary> | 
|  |  | 410 |  |             /// Create a new spark batch job. | 
|  |  | 411 |  |             /// </summary> | 
|  |  | 412 |  |             /// <param name='operations'> | 
|  |  | 413 |  |             /// The operations group for this extension method. | 
|  |  | 414 |  |             /// </param> | 
|  |  | 415 |  |             /// <param name='sparkBatchJobRequest'> | 
|  |  | 416 |  |             /// Livy compatible batch job request payload. | 
|  |  | 417 |  |             /// </param> | 
|  |  | 418 |  |             /// <param name='requestedBy'> | 
|  |  | 419 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 420 |  |             /// </param> | 
|  |  | 421 |  |             public static SparkBatchJob SubmitSparkBatchJob(this IJobOperations operations, SparkBatchJobRequest sparkBa | 
|  |  | 422 |  |             { | 
|  | 6 | 423 |  |                 return operations.SubmitSparkBatchJobAsync(sparkBatchJobRequest, requestedBy).GetAwaiter().GetResult(); | 
|  |  | 424 |  |             } | 
|  |  | 425 |  |  | 
|  |  | 426 |  |             /// <summary> | 
|  |  | 427 |  |             /// Create a new spark batch job. | 
|  |  | 428 |  |             /// </summary> | 
|  |  | 429 |  |             /// <param name='operations'> | 
|  |  | 430 |  |             /// The operations group for this extension method. | 
|  |  | 431 |  |             /// </param> | 
|  |  | 432 |  |             /// <param name='sparkBatchJobRequest'> | 
|  |  | 433 |  |             /// Livy compatible batch job request payload. | 
|  |  | 434 |  |             /// </param> | 
|  |  | 435 |  |             /// <param name='requestedBy'> | 
|  |  | 436 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 437 |  |             /// </param> | 
|  |  | 438 |  |             /// <param name='cancellationToken'> | 
|  |  | 439 |  |             /// The cancellation token. | 
|  |  | 440 |  |             /// </param> | 
|  |  | 441 |  |             public static async Task<SparkBatchJob> SubmitSparkBatchJobAsync(this IJobOperations operations, SparkBatchJ | 
|  |  | 442 |  |             { | 
|  | 6 | 443 |  |                 using (var _result = await operations.SubmitSparkBatchJobWithHttpMessagesAsync(sparkBatchJobRequest, req | 
|  |  | 444 |  |                 { | 
|  | 6 | 445 |  |                     return _result.Body; | 
|  |  | 446 |  |                 } | 
|  | 6 | 447 |  |             } | 
|  |  | 448 |  |  | 
|  |  | 449 |  |             /// <summary> | 
|  |  | 450 |  |             /// Gets a single spark batch job. | 
|  |  | 451 |  |             /// </summary> | 
|  |  | 452 |  |             /// <param name='operations'> | 
|  |  | 453 |  |             /// The operations group for this extension method. | 
|  |  | 454 |  |             /// </param> | 
|  |  | 455 |  |             /// <param name='batchId'> | 
|  |  | 456 |  |             /// Identifier for the batch job. | 
|  |  | 457 |  |             /// </param> | 
|  |  | 458 |  |             public static SparkBatchJob GetSparkBatchJob(this IJobOperations operations, int batchId) | 
|  |  | 459 |  |             { | 
|  | 2 | 460 |  |                 return operations.GetSparkBatchJobAsync(batchId).GetAwaiter().GetResult(); | 
|  |  | 461 |  |             } | 
|  |  | 462 |  |  | 
|  |  | 463 |  |             /// <summary> | 
|  |  | 464 |  |             /// Gets a single spark batch job. | 
|  |  | 465 |  |             /// </summary> | 
|  |  | 466 |  |             /// <param name='operations'> | 
|  |  | 467 |  |             /// The operations group for this extension method. | 
|  |  | 468 |  |             /// </param> | 
|  |  | 469 |  |             /// <param name='batchId'> | 
|  |  | 470 |  |             /// Identifier for the batch job. | 
|  |  | 471 |  |             /// </param> | 
|  |  | 472 |  |             /// <param name='cancellationToken'> | 
|  |  | 473 |  |             /// The cancellation token. | 
|  |  | 474 |  |             /// </param> | 
|  |  | 475 |  |             public static async Task<SparkBatchJob> GetSparkBatchJobAsync(this IJobOperations operations, int batchId, C | 
|  |  | 476 |  |             { | 
|  | 2 | 477 |  |                 using (var _result = await operations.GetSparkBatchJobWithHttpMessagesAsync(batchId, null, cancellationT | 
|  |  | 478 |  |                 { | 
|  | 2 | 479 |  |                     return _result.Body; | 
|  |  | 480 |  |                 } | 
|  | 2 | 481 |  |             } | 
|  |  | 482 |  |  | 
|  |  | 483 |  |             /// <summary> | 
|  |  | 484 |  |             /// Cancels a running spark batch job. | 
|  |  | 485 |  |             /// </summary> | 
|  |  | 486 |  |             /// <param name='operations'> | 
|  |  | 487 |  |             /// The operations group for this extension method. | 
|  |  | 488 |  |             /// </param> | 
|  |  | 489 |  |             /// <param name='batchId'> | 
|  |  | 490 |  |             /// Identifier for the batch job. | 
|  |  | 491 |  |             /// </param> | 
|  |  | 492 |  |             /// <param name='requestedBy'> | 
|  |  | 493 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 494 |  |             /// </param> | 
|  |  | 495 |  |             public static SparkJobDeletedResult DeleteSparkBatchJob(this IJobOperations operations, int batchId, string  | 
|  |  | 496 |  |             { | 
|  | 2 | 497 |  |                 return operations.DeleteSparkBatchJobAsync(batchId, requestedBy).GetAwaiter().GetResult(); | 
|  |  | 498 |  |             } | 
|  |  | 499 |  |  | 
|  |  | 500 |  |             /// <summary> | 
|  |  | 501 |  |             /// Cancels a running spark batch job. | 
|  |  | 502 |  |             /// </summary> | 
|  |  | 503 |  |             /// <param name='operations'> | 
|  |  | 504 |  |             /// The operations group for this extension method. | 
|  |  | 505 |  |             /// </param> | 
|  |  | 506 |  |             /// <param name='batchId'> | 
|  |  | 507 |  |             /// Identifier for the batch job. | 
|  |  | 508 |  |             /// </param> | 
|  |  | 509 |  |             /// <param name='requestedBy'> | 
|  |  | 510 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 511 |  |             /// </param> | 
|  |  | 512 |  |             /// <param name='cancellationToken'> | 
|  |  | 513 |  |             /// The cancellation token. | 
|  |  | 514 |  |             /// </param> | 
|  |  | 515 |  |             public static async Task<SparkJobDeletedResult> DeleteSparkBatchJobAsync(this IJobOperations operations, int | 
|  |  | 516 |  |             { | 
|  | 2 | 517 |  |                 using (var _result = await operations.DeleteSparkBatchJobWithHttpMessagesAsync(batchId, requestedBy, nul | 
|  |  | 518 |  |                 { | 
|  | 2 | 519 |  |                     return _result.Body; | 
|  |  | 520 |  |                 } | 
|  | 2 | 521 |  |             } | 
|  |  | 522 |  |  | 
|  |  | 523 |  |             /// <summary> | 
|  |  | 524 |  |             /// Gets a single spark batch job logs. | 
|  |  | 525 |  |             /// </summary> | 
|  |  | 526 |  |             /// <param name='operations'> | 
|  |  | 527 |  |             /// The operations group for this extension method. | 
|  |  | 528 |  |             /// </param> | 
|  |  | 529 |  |             /// <param name='batchId'> | 
|  |  | 530 |  |             /// Identifier for the batch job. | 
|  |  | 531 |  |             /// </param> | 
|  |  | 532 |  |             /// <param name='fromParameter'> | 
|  |  | 533 |  |             /// Optional param specifying which index the list should begin from. | 
|  |  | 534 |  |             /// </param> | 
|  |  | 535 |  |             /// <param name='size'> | 
|  |  | 536 |  |             /// Optional param specifying the size of the returned list. | 
|  |  | 537 |  |             /// By default it is 20 and that is the maximum. | 
|  |  | 538 |  |             /// </param> | 
|  |  | 539 |  |             public static SparkJobLog GetSparkBatchLog(this IJobOperations operations, int batchId, int? fromParameter = | 
|  |  | 540 |  |             { | 
|  | 0 | 541 |  |                 return operations.GetSparkBatchLogAsync(batchId, fromParameter, size).GetAwaiter().GetResult(); | 
|  |  | 542 |  |             } | 
|  |  | 543 |  |  | 
|  |  | 544 |  |             /// <summary> | 
|  |  | 545 |  |             /// Gets a single spark batch job logs. | 
|  |  | 546 |  |             /// </summary> | 
|  |  | 547 |  |             /// <param name='operations'> | 
|  |  | 548 |  |             /// The operations group for this extension method. | 
|  |  | 549 |  |             /// </param> | 
|  |  | 550 |  |             /// <param name='batchId'> | 
|  |  | 551 |  |             /// Identifier for the batch job. | 
|  |  | 552 |  |             /// </param> | 
|  |  | 553 |  |             /// <param name='fromParameter'> | 
|  |  | 554 |  |             /// Optional param specifying which index the list should begin from. | 
|  |  | 555 |  |             /// </param> | 
|  |  | 556 |  |             /// <param name='size'> | 
|  |  | 557 |  |             /// Optional param specifying the size of the returned list. | 
|  |  | 558 |  |             /// By default it is 20 and that is the maximum. | 
|  |  | 559 |  |             /// </param> | 
|  |  | 560 |  |             /// <param name='cancellationToken'> | 
|  |  | 561 |  |             /// The cancellation token. | 
|  |  | 562 |  |             /// </param> | 
|  |  | 563 |  |             public static async Task<SparkJobLog> GetSparkBatchLogAsync(this IJobOperations operations, int batchId, int | 
|  |  | 564 |  |             { | 
|  | 0 | 565 |  |                 using (var _result = await operations.GetSparkBatchLogWithHttpMessagesAsync(batchId, fromParameter, size | 
|  |  | 566 |  |                 { | 
|  | 0 | 567 |  |                     return _result.Body; | 
|  |  | 568 |  |                 } | 
|  | 0 | 569 |  |             } | 
|  |  | 570 |  |  | 
|  |  | 571 |  |             /// <summary> | 
|  |  | 572 |  |             /// Gets a single spark batch state. | 
|  |  | 573 |  |             /// </summary> | 
|  |  | 574 |  |             /// <param name='operations'> | 
|  |  | 575 |  |             /// The operations group for this extension method. | 
|  |  | 576 |  |             /// </param> | 
|  |  | 577 |  |             /// <param name='batchId'> | 
|  |  | 578 |  |             /// Identifier for the batch job. | 
|  |  | 579 |  |             /// </param> | 
|  |  | 580 |  |             public static SparkJobState GetSparkBatchState(this IJobOperations operations, int batchId) | 
|  |  | 581 |  |             { | 
|  | 0 | 582 |  |                 return operations.GetSparkBatchStateAsync(batchId).GetAwaiter().GetResult(); | 
|  |  | 583 |  |             } | 
|  |  | 584 |  |  | 
|  |  | 585 |  |             /// <summary> | 
|  |  | 586 |  |             /// Gets a single spark batch state. | 
|  |  | 587 |  |             /// </summary> | 
|  |  | 588 |  |             /// <param name='operations'> | 
|  |  | 589 |  |             /// The operations group for this extension method. | 
|  |  | 590 |  |             /// </param> | 
|  |  | 591 |  |             /// <param name='batchId'> | 
|  |  | 592 |  |             /// Identifier for the batch job. | 
|  |  | 593 |  |             /// </param> | 
|  |  | 594 |  |             /// <param name='cancellationToken'> | 
|  |  | 595 |  |             /// The cancellation token. | 
|  |  | 596 |  |             /// </param> | 
|  |  | 597 |  |             public static async Task<SparkJobState> GetSparkBatchStateAsync(this IJobOperations operations, int batchId, | 
|  |  | 598 |  |             { | 
|  | 0 | 599 |  |                 using (var _result = await operations.GetSparkBatchStateWithHttpMessagesAsync(batchId, null, cancellatio | 
|  |  | 600 |  |                 { | 
|  | 0 | 601 |  |                     return _result.Body; | 
|  |  | 602 |  |                 } | 
|  | 0 | 603 |  |             } | 
|  |  | 604 |  |  | 
|  |  | 605 |  |             /// <summary> | 
|  |  | 606 |  |             /// List all spark sessions. | 
|  |  | 607 |  |             /// </summary> | 
|  |  | 608 |  |             /// <param name='operations'> | 
|  |  | 609 |  |             /// The operations group for this extension method. | 
|  |  | 610 |  |             /// </param> | 
|  |  | 611 |  |             /// <param name='fromParameter'> | 
|  |  | 612 |  |             /// Optional param specifying which index the list should begin from. | 
|  |  | 613 |  |             /// </param> | 
|  |  | 614 |  |             /// <param name='size'> | 
|  |  | 615 |  |             /// Optional param specifying the size of the returned list. | 
|  |  | 616 |  |             /// By default it is 20 and that is the maximum. | 
|  |  | 617 |  |             /// </param> | 
|  |  | 618 |  |             public static SparkSessionCollection ListSparkSessionJob(this IJobOperations operations, int? fromParameter  | 
|  |  | 619 |  |             { | 
|  | 10 | 620 |  |                 return operations.ListSparkSessionJobAsync(fromParameter, size).GetAwaiter().GetResult(); | 
|  |  | 621 |  |             } | 
|  |  | 622 |  |  | 
|  |  | 623 |  |             /// <summary> | 
|  |  | 624 |  |             /// List all spark sessions. | 
|  |  | 625 |  |             /// </summary> | 
|  |  | 626 |  |             /// <param name='operations'> | 
|  |  | 627 |  |             /// The operations group for this extension method. | 
|  |  | 628 |  |             /// </param> | 
|  |  | 629 |  |             /// <param name='fromParameter'> | 
|  |  | 630 |  |             /// Optional param specifying which index the list should begin from. | 
|  |  | 631 |  |             /// </param> | 
|  |  | 632 |  |             /// <param name='size'> | 
|  |  | 633 |  |             /// Optional param specifying the size of the returned list. | 
|  |  | 634 |  |             /// By default it is 20 and that is the maximum. | 
|  |  | 635 |  |             /// </param> | 
|  |  | 636 |  |             /// <param name='cancellationToken'> | 
|  |  | 637 |  |             /// The cancellation token. | 
|  |  | 638 |  |             /// </param> | 
|  |  | 639 |  |             public static async Task<SparkSessionCollection> ListSparkSessionJobAsync(this IJobOperations operations, in | 
|  |  | 640 |  |             { | 
|  | 10 | 641 |  |                 using (var _result = await operations.ListSparkSessionJobWithHttpMessagesAsync(fromParameter, size, null | 
|  |  | 642 |  |                 { | 
|  | 10 | 643 |  |                     return _result.Body; | 
|  |  | 644 |  |                 } | 
|  | 10 | 645 |  |             } | 
|  |  | 646 |  |  | 
|  |  | 647 |  |             /// <summary> | 
|  |  | 648 |  |             /// Create a new spark session. | 
|  |  | 649 |  |             /// </summary> | 
|  |  | 650 |  |             /// <param name='operations'> | 
|  |  | 651 |  |             /// The operations group for this extension method. | 
|  |  | 652 |  |             /// </param> | 
|  |  | 653 |  |             /// <param name='sparkSessionJobRequest'> | 
|  |  | 654 |  |             /// Livy compatible session job request payload. | 
|  |  | 655 |  |             /// </param> | 
|  |  | 656 |  |             /// <param name='requestedBy'> | 
|  |  | 657 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 658 |  |             /// </param> | 
|  |  | 659 |  |             public static SparkSessionJob SubmitSparkSessionJob(this IJobOperations operations, SparkSessionJobRequest s | 
|  |  | 660 |  |             { | 
|  | 8 | 661 |  |                 return operations.SubmitSparkSessionJobAsync(sparkSessionJobRequest, requestedBy).GetAwaiter().GetResult | 
|  |  | 662 |  |             } | 
|  |  | 663 |  |  | 
|  |  | 664 |  |             /// <summary> | 
|  |  | 665 |  |             /// Create a new spark session. | 
|  |  | 666 |  |             /// </summary> | 
|  |  | 667 |  |             /// <param name='operations'> | 
|  |  | 668 |  |             /// The operations group for this extension method. | 
|  |  | 669 |  |             /// </param> | 
|  |  | 670 |  |             /// <param name='sparkSessionJobRequest'> | 
|  |  | 671 |  |             /// Livy compatible session job request payload. | 
|  |  | 672 |  |             /// </param> | 
|  |  | 673 |  |             /// <param name='requestedBy'> | 
|  |  | 674 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 675 |  |             /// </param> | 
|  |  | 676 |  |             /// <param name='cancellationToken'> | 
|  |  | 677 |  |             /// The cancellation token. | 
|  |  | 678 |  |             /// </param> | 
|  |  | 679 |  |             public static async Task<SparkSessionJob> SubmitSparkSessionJobAsync(this IJobOperations operations, SparkSe | 
|  |  | 680 |  |             { | 
|  | 8 | 681 |  |                 using (var _result = await operations.SubmitSparkSessionJobWithHttpMessagesAsync(sparkSessionJobRequest, | 
|  |  | 682 |  |                 { | 
|  | 8 | 683 |  |                     return _result.Body; | 
|  |  | 684 |  |                 } | 
|  | 8 | 685 |  |             } | 
|  |  | 686 |  |  | 
|  |  | 687 |  |             /// <summary> | 
|  |  | 688 |  |             /// Gets a single spark session. | 
|  |  | 689 |  |             /// </summary> | 
|  |  | 690 |  |             /// <param name='operations'> | 
|  |  | 691 |  |             /// The operations group for this extension method. | 
|  |  | 692 |  |             /// </param> | 
|  |  | 693 |  |             /// <param name='sessionId'> | 
|  |  | 694 |  |             /// Identifier for the session. | 
|  |  | 695 |  |             /// </param> | 
|  |  | 696 |  |             public static SparkSessionJob GetSparkSessionJob(this IJobOperations operations, int sessionId) | 
|  |  | 697 |  |             { | 
|  | 2 | 698 |  |                 return operations.GetSparkSessionJobAsync(sessionId).GetAwaiter().GetResult(); | 
|  |  | 699 |  |             } | 
|  |  | 700 |  |  | 
|  |  | 701 |  |             /// <summary> | 
|  |  | 702 |  |             /// Gets a single spark session. | 
|  |  | 703 |  |             /// </summary> | 
|  |  | 704 |  |             /// <param name='operations'> | 
|  |  | 705 |  |             /// The operations group for this extension method. | 
|  |  | 706 |  |             /// </param> | 
|  |  | 707 |  |             /// <param name='sessionId'> | 
|  |  | 708 |  |             /// Identifier for the session. | 
|  |  | 709 |  |             /// </param> | 
|  |  | 710 |  |             /// <param name='cancellationToken'> | 
|  |  | 711 |  |             /// The cancellation token. | 
|  |  | 712 |  |             /// </param> | 
|  |  | 713 |  |             public static async Task<SparkSessionJob> GetSparkSessionJobAsync(this IJobOperations operations, int sessio | 
|  |  | 714 |  |             { | 
|  | 2 | 715 |  |                 using (var _result = await operations.GetSparkSessionJobWithHttpMessagesAsync(sessionId, null, cancellat | 
|  |  | 716 |  |                 { | 
|  | 2 | 717 |  |                     return _result.Body; | 
|  |  | 718 |  |                 } | 
|  | 2 | 719 |  |             } | 
|  |  | 720 |  |  | 
|  |  | 721 |  |             /// <summary> | 
|  |  | 722 |  |             /// Cancels a running spark session. | 
|  |  | 723 |  |             /// </summary> | 
|  |  | 724 |  |             /// <param name='operations'> | 
|  |  | 725 |  |             /// The operations group for this extension method. | 
|  |  | 726 |  |             /// </param> | 
|  |  | 727 |  |             /// <param name='sessionId'> | 
|  |  | 728 |  |             /// Identifier for the session. | 
|  |  | 729 |  |             /// </param> | 
|  |  | 730 |  |             /// <param name='requestedBy'> | 
|  |  | 731 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 732 |  |             /// </param> | 
|  |  | 733 |  |             public static SparkJobDeletedResult DeleteSparkSessionJob(this IJobOperations operations, int sessionId, str | 
|  |  | 734 |  |             { | 
|  | 8 | 735 |  |                 return operations.DeleteSparkSessionJobAsync(sessionId, requestedBy).GetAwaiter().GetResult(); | 
|  |  | 736 |  |             } | 
|  |  | 737 |  |  | 
|  |  | 738 |  |             /// <summary> | 
|  |  | 739 |  |             /// Cancels a running spark session. | 
|  |  | 740 |  |             /// </summary> | 
|  |  | 741 |  |             /// <param name='operations'> | 
|  |  | 742 |  |             /// The operations group for this extension method. | 
|  |  | 743 |  |             /// </param> | 
|  |  | 744 |  |             /// <param name='sessionId'> | 
|  |  | 745 |  |             /// Identifier for the session. | 
|  |  | 746 |  |             /// </param> | 
|  |  | 747 |  |             /// <param name='requestedBy'> | 
|  |  | 748 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 749 |  |             /// </param> | 
|  |  | 750 |  |             /// <param name='cancellationToken'> | 
|  |  | 751 |  |             /// The cancellation token. | 
|  |  | 752 |  |             /// </param> | 
|  |  | 753 |  |             public static async Task<SparkJobDeletedResult> DeleteSparkSessionJobAsync(this IJobOperations operations, i | 
|  |  | 754 |  |             { | 
|  | 8 | 755 |  |                 using (var _result = await operations.DeleteSparkSessionJobWithHttpMessagesAsync(sessionId, requestedBy, | 
|  |  | 756 |  |                 { | 
|  | 8 | 757 |  |                     return _result.Body; | 
|  |  | 758 |  |                 } | 
|  | 8 | 759 |  |             } | 
|  |  | 760 |  |  | 
|  |  | 761 |  |             /// <summary> | 
|  |  | 762 |  |             /// Gets a single spark session job logs. | 
|  |  | 763 |  |             /// </summary> | 
|  |  | 764 |  |             /// <param name='operations'> | 
|  |  | 765 |  |             /// The operations group for this extension method. | 
|  |  | 766 |  |             /// </param> | 
|  |  | 767 |  |             /// <param name='sessionId'> | 
|  |  | 768 |  |             /// Identifier for the session job. | 
|  |  | 769 |  |             /// </param> | 
|  |  | 770 |  |             /// <param name='fromParameter'> | 
|  |  | 771 |  |             /// Optional param specifying which index the list should begin from. | 
|  |  | 772 |  |             /// </param> | 
|  |  | 773 |  |             /// <param name='size'> | 
|  |  | 774 |  |             /// Optional param specifying the size of the returned list. | 
|  |  | 775 |  |             /// By default it is 20 and that is the maximum. | 
|  |  | 776 |  |             /// </param> | 
|  |  | 777 |  |             public static SparkJobLog GetSparkSessionLog(this IJobOperations operations, int sessionId, int? fromParamet | 
|  |  | 778 |  |             { | 
|  | 0 | 779 |  |                 return operations.GetSparkSessionLogAsync(sessionId, fromParameter, size).GetAwaiter().GetResult(); | 
|  |  | 780 |  |             } | 
|  |  | 781 |  |  | 
|  |  | 782 |  |             /// <summary> | 
|  |  | 783 |  |             /// Gets a single spark session job logs. | 
|  |  | 784 |  |             /// </summary> | 
|  |  | 785 |  |             /// <param name='operations'> | 
|  |  | 786 |  |             /// The operations group for this extension method. | 
|  |  | 787 |  |             /// </param> | 
|  |  | 788 |  |             /// <param name='sessionId'> | 
|  |  | 789 |  |             /// Identifier for the session job. | 
|  |  | 790 |  |             /// </param> | 
|  |  | 791 |  |             /// <param name='fromParameter'> | 
|  |  | 792 |  |             /// Optional param specifying which index the list should begin from. | 
|  |  | 793 |  |             /// </param> | 
|  |  | 794 |  |             /// <param name='size'> | 
|  |  | 795 |  |             /// Optional param specifying the size of the returned list. | 
|  |  | 796 |  |             /// By default it is 20 and that is the maximum. | 
|  |  | 797 |  |             /// </param> | 
|  |  | 798 |  |             /// <param name='cancellationToken'> | 
|  |  | 799 |  |             /// The cancellation token. | 
|  |  | 800 |  |             /// </param> | 
|  |  | 801 |  |             public static async Task<SparkJobLog> GetSparkSessionLogAsync(this IJobOperations operations, int sessionId, | 
|  |  | 802 |  |             { | 
|  | 0 | 803 |  |                 using (var _result = await operations.GetSparkSessionLogWithHttpMessagesAsync(sessionId, fromParameter,  | 
|  |  | 804 |  |                 { | 
|  | 0 | 805 |  |                     return _result.Body; | 
|  |  | 806 |  |                 } | 
|  | 0 | 807 |  |             } | 
|  |  | 808 |  |  | 
|  |  | 809 |  |             /// <summary> | 
|  |  | 810 |  |             /// Gets a single spark session job state. | 
|  |  | 811 |  |             /// </summary> | 
|  |  | 812 |  |             /// <param name='operations'> | 
|  |  | 813 |  |             /// The operations group for this extension method. | 
|  |  | 814 |  |             /// </param> | 
|  |  | 815 |  |             /// <param name='sessionId'> | 
|  |  | 816 |  |             /// Identifier for the session job. | 
|  |  | 817 |  |             /// </param> | 
|  |  | 818 |  |             public static SparkJobState GetSparkSessionState(this IJobOperations operations, int sessionId) | 
|  |  | 819 |  |             { | 
|  | 0 | 820 |  |                 return operations.GetSparkSessionStateAsync(sessionId).GetAwaiter().GetResult(); | 
|  |  | 821 |  |             } | 
|  |  | 822 |  |  | 
|  |  | 823 |  |             /// <summary> | 
|  |  | 824 |  |             /// Gets a single spark session job state. | 
|  |  | 825 |  |             /// </summary> | 
|  |  | 826 |  |             /// <param name='operations'> | 
|  |  | 827 |  |             /// The operations group for this extension method. | 
|  |  | 828 |  |             /// </param> | 
|  |  | 829 |  |             /// <param name='sessionId'> | 
|  |  | 830 |  |             /// Identifier for the session job. | 
|  |  | 831 |  |             /// </param> | 
|  |  | 832 |  |             /// <param name='cancellationToken'> | 
|  |  | 833 |  |             /// The cancellation token. | 
|  |  | 834 |  |             /// </param> | 
|  |  | 835 |  |             public static async Task<SparkJobState> GetSparkSessionStateAsync(this IJobOperations operations, int sessio | 
|  |  | 836 |  |             { | 
|  | 0 | 837 |  |                 using (var _result = await operations.GetSparkSessionStateWithHttpMessagesAsync(sessionId, null, cancell | 
|  |  | 838 |  |                 { | 
|  | 0 | 839 |  |                     return _result.Body; | 
|  |  | 840 |  |                 } | 
|  | 0 | 841 |  |             } | 
|  |  | 842 |  |  | 
|  |  | 843 |  |             /// <summary> | 
|  |  | 844 |  |             /// Gets a list of statements within a spark session. | 
|  |  | 845 |  |             /// </summary> | 
|  |  | 846 |  |             /// <param name='operations'> | 
|  |  | 847 |  |             /// The operations group for this extension method. | 
|  |  | 848 |  |             /// </param> | 
|  |  | 849 |  |             /// <param name='sessionId'> | 
|  |  | 850 |  |             /// Identifier for the session. | 
|  |  | 851 |  |             /// </param> | 
|  |  | 852 |  |             public static SparkStatementCollection ListSparkStatementJob(this IJobOperations operations, int sessionId) | 
|  |  | 853 |  |             { | 
|  | 4 | 854 |  |                 return operations.ListSparkStatementJobAsync(sessionId).GetAwaiter().GetResult(); | 
|  |  | 855 |  |             } | 
|  |  | 856 |  |  | 
|  |  | 857 |  |             /// <summary> | 
|  |  | 858 |  |             /// Gets a list of statements within a spark session. | 
|  |  | 859 |  |             /// </summary> | 
|  |  | 860 |  |             /// <param name='operations'> | 
|  |  | 861 |  |             /// The operations group for this extension method. | 
|  |  | 862 |  |             /// </param> | 
|  |  | 863 |  |             /// <param name='sessionId'> | 
|  |  | 864 |  |             /// Identifier for the session. | 
|  |  | 865 |  |             /// </param> | 
|  |  | 866 |  |             /// <param name='cancellationToken'> | 
|  |  | 867 |  |             /// The cancellation token. | 
|  |  | 868 |  |             /// </param> | 
|  |  | 869 |  |             public static async Task<SparkStatementCollection> ListSparkStatementJobAsync(this IJobOperations operations | 
|  |  | 870 |  |             { | 
|  | 4 | 871 |  |                 using (var _result = await operations.ListSparkStatementJobWithHttpMessagesAsync(sessionId, null, cancel | 
|  |  | 872 |  |                 { | 
|  | 4 | 873 |  |                     return _result.Body; | 
|  |  | 874 |  |                 } | 
|  | 4 | 875 |  |             } | 
|  |  | 876 |  |  | 
|  |  | 877 |  |             /// <summary> | 
|  |  | 878 |  |             /// Create a statement within a spark session. | 
|  |  | 879 |  |             /// </summary> | 
|  |  | 880 |  |             /// <param name='operations'> | 
|  |  | 881 |  |             /// The operations group for this extension method. | 
|  |  | 882 |  |             /// </param> | 
|  |  | 883 |  |             /// <param name='sessionId'> | 
|  |  | 884 |  |             /// Identifier for the session. | 
|  |  | 885 |  |             /// </param> | 
|  |  | 886 |  |             /// <param name='sparkStatementRequest'> | 
|  |  | 887 |  |             /// Livy compatible batch job request payload. | 
|  |  | 888 |  |             /// </param> | 
|  |  | 889 |  |             /// <param name='requestedBy'> | 
|  |  | 890 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 891 |  |             /// </param> | 
|  |  | 892 |  |             public static SparkStatement SubmitSparkStatementJob(this IJobOperations operations, int sessionId, SparkSta | 
|  |  | 893 |  |             { | 
|  | 2 | 894 |  |                 return operations.SubmitSparkStatementJobAsync(sessionId, sparkStatementRequest, requestedBy).GetAwaiter | 
|  |  | 895 |  |             } | 
|  |  | 896 |  |  | 
|  |  | 897 |  |             /// <summary> | 
|  |  | 898 |  |             /// Create a statement within a spark session. | 
|  |  | 899 |  |             /// </summary> | 
|  |  | 900 |  |             /// <param name='operations'> | 
|  |  | 901 |  |             /// The operations group for this extension method. | 
|  |  | 902 |  |             /// </param> | 
|  |  | 903 |  |             /// <param name='sessionId'> | 
|  |  | 904 |  |             /// Identifier for the session. | 
|  |  | 905 |  |             /// </param> | 
|  |  | 906 |  |             /// <param name='sparkStatementRequest'> | 
|  |  | 907 |  |             /// Livy compatible batch job request payload. | 
|  |  | 908 |  |             /// </param> | 
|  |  | 909 |  |             /// <param name='requestedBy'> | 
|  |  | 910 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 911 |  |             /// </param> | 
|  |  | 912 |  |             /// <param name='cancellationToken'> | 
|  |  | 913 |  |             /// The cancellation token. | 
|  |  | 914 |  |             /// </param> | 
|  |  | 915 |  |             public static async Task<SparkStatement> SubmitSparkStatementJobAsync(this IJobOperations operations, int se | 
|  |  | 916 |  |             { | 
|  | 2 | 917 |  |                 using (var _result = await operations.SubmitSparkStatementJobWithHttpMessagesAsync(sessionId, sparkState | 
|  |  | 918 |  |                 { | 
|  | 2 | 919 |  |                     return _result.Body; | 
|  |  | 920 |  |                 } | 
|  | 2 | 921 |  |             } | 
|  |  | 922 |  |  | 
|  |  | 923 |  |             /// <summary> | 
|  |  | 924 |  |             /// Gets a single statement within a spark session. | 
|  |  | 925 |  |             /// </summary> | 
|  |  | 926 |  |             /// <param name='operations'> | 
|  |  | 927 |  |             /// The operations group for this extension method. | 
|  |  | 928 |  |             /// </param> | 
|  |  | 929 |  |             /// <param name='sessionId'> | 
|  |  | 930 |  |             /// Identifier for the session. | 
|  |  | 931 |  |             /// </param> | 
|  |  | 932 |  |             /// <param name='statementId'> | 
|  |  | 933 |  |             /// Identifier for the statement. | 
|  |  | 934 |  |             /// </param> | 
|  |  | 935 |  |             public static SparkStatement GetSparkStatementJob(this IJobOperations operations, int sessionId, int stateme | 
|  |  | 936 |  |             { | 
|  | 0 | 937 |  |                 return operations.GetSparkStatementJobAsync(sessionId, statementId).GetAwaiter().GetResult(); | 
|  |  | 938 |  |             } | 
|  |  | 939 |  |  | 
|  |  | 940 |  |             /// <summary> | 
|  |  | 941 |  |             /// Gets a single statement within a spark session. | 
|  |  | 942 |  |             /// </summary> | 
|  |  | 943 |  |             /// <param name='operations'> | 
|  |  | 944 |  |             /// The operations group for this extension method. | 
|  |  | 945 |  |             /// </param> | 
|  |  | 946 |  |             /// <param name='sessionId'> | 
|  |  | 947 |  |             /// Identifier for the session. | 
|  |  | 948 |  |             /// </param> | 
|  |  | 949 |  |             /// <param name='statementId'> | 
|  |  | 950 |  |             /// Identifier for the statement. | 
|  |  | 951 |  |             /// </param> | 
|  |  | 952 |  |             /// <param name='cancellationToken'> | 
|  |  | 953 |  |             /// The cancellation token. | 
|  |  | 954 |  |             /// </param> | 
|  |  | 955 |  |             public static async Task<SparkStatement> GetSparkStatementJobAsync(this IJobOperations operations, int sessi | 
|  |  | 956 |  |             { | 
|  | 0 | 957 |  |                 using (var _result = await operations.GetSparkStatementJobWithHttpMessagesAsync(sessionId, statementId,  | 
|  |  | 958 |  |                 { | 
|  | 0 | 959 |  |                     return _result.Body; | 
|  |  | 960 |  |                 } | 
|  | 0 | 961 |  |             } | 
|  |  | 962 |  |  | 
|  |  | 963 |  |             /// <summary> | 
|  |  | 964 |  |             /// Kill a statement within a session. | 
|  |  | 965 |  |             /// </summary> | 
|  |  | 966 |  |             /// <param name='operations'> | 
|  |  | 967 |  |             /// The operations group for this extension method. | 
|  |  | 968 |  |             /// </param> | 
|  |  | 969 |  |             /// <param name='sessionId'> | 
|  |  | 970 |  |             /// Identifier for the session. | 
|  |  | 971 |  |             /// </param> | 
|  |  | 972 |  |             /// <param name='statementId'> | 
|  |  | 973 |  |             /// Identifier for the statement. | 
|  |  | 974 |  |             /// </param> | 
|  |  | 975 |  |             /// <param name='requestedBy'> | 
|  |  | 976 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 977 |  |             /// </param> | 
|  |  | 978 |  |             public static SparkStatementCancellationResult DeleteSparkStatementJob(this IJobOperations operations, int s | 
|  |  | 979 |  |             { | 
|  | 2 | 980 |  |                 return operations.DeleteSparkStatementJobAsync(sessionId, statementId, requestedBy).GetAwaiter().GetResu | 
|  |  | 981 |  |             } | 
|  |  | 982 |  |  | 
|  |  | 983 |  |             /// <summary> | 
|  |  | 984 |  |             /// Kill a statement within a session. | 
|  |  | 985 |  |             /// </summary> | 
|  |  | 986 |  |             /// <param name='operations'> | 
|  |  | 987 |  |             /// The operations group for this extension method. | 
|  |  | 988 |  |             /// </param> | 
|  |  | 989 |  |             /// <param name='sessionId'> | 
|  |  | 990 |  |             /// Identifier for the session. | 
|  |  | 991 |  |             /// </param> | 
|  |  | 992 |  |             /// <param name='statementId'> | 
|  |  | 993 |  |             /// Identifier for the statement. | 
|  |  | 994 |  |             /// </param> | 
|  |  | 995 |  |             /// <param name='requestedBy'> | 
|  |  | 996 |  |             /// Add default value for X-Requested-By in header. | 
|  |  | 997 |  |             /// </param> | 
|  |  | 998 |  |             /// <param name='cancellationToken'> | 
|  |  | 999 |  |             /// The cancellation token. | 
|  |  | 1000 |  |             /// </param> | 
|  |  | 1001 |  |             public static async Task<SparkStatementCancellationResult> DeleteSparkStatementJobAsync(this IJobOperations  | 
|  |  | 1002 |  |             { | 
|  | 2 | 1003 |  |                 using (var _result = await operations.DeleteSparkStatementJobWithHttpMessagesAsync(sessionId, statementI | 
|  |  | 1004 |  |                 { | 
|  | 2 | 1005 |  |                     return _result.Body; | 
|  |  | 1006 |  |                 } | 
|  | 2 | 1007 |  |             } | 
|  |  | 1008 |  |  | 
|  |  | 1009 |  |     } | 
|  |  | 1010 |  | } |