| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | // <auto-generated/> |
| | | 5 | | |
| | | 6 | | #nullable disable |
| | | 7 | | |
| | | 8 | | using System; |
| | | 9 | | using System.Text.Json; |
| | | 10 | | using System.Threading; |
| | | 11 | | using System.Threading.Tasks; |
| | | 12 | | using Azure; |
| | | 13 | | using Azure.Analytics.Synapse.Artifacts.Models; |
| | | 14 | | using Azure.Core; |
| | | 15 | | using Azure.Core.Pipeline; |
| | | 16 | | |
| | | 17 | | namespace Azure.Analytics.Synapse.Artifacts |
| | | 18 | | { |
| | | 19 | | /// <summary> Debug the spark job definition. </summary> |
| | | 20 | | public partial class SparkJobDefinitionDebugSparkJobDefinitionOperation : Operation<SparkBatchJob>, IOperationSource |
| | | 21 | | { |
| | | 22 | | private readonly ArmOperationHelpers<SparkBatchJob> _operation; |
| | 0 | 23 | | internal SparkJobDefinitionDebugSparkJobDefinitionOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pi |
| | | 24 | | { |
| | 0 | 25 | | _operation = new ArmOperationHelpers<SparkBatchJob>(this, clientDiagnostics, pipeline, request, response, Op |
| | 0 | 26 | | } |
| | | 27 | | /// <inheritdoc /> |
| | 0 | 28 | | public override string Id => _operation.Id; |
| | | 29 | | |
| | | 30 | | /// <inheritdoc /> |
| | 0 | 31 | | public override SparkBatchJob Value => _operation.Value; |
| | | 32 | | |
| | | 33 | | /// <inheritdoc /> |
| | 0 | 34 | | public override bool HasCompleted => _operation.HasCompleted; |
| | | 35 | | |
| | | 36 | | /// <inheritdoc /> |
| | 0 | 37 | | public override bool HasValue => _operation.HasValue; |
| | | 38 | | |
| | | 39 | | /// <inheritdoc /> |
| | 0 | 40 | | public override Response GetRawResponse() => _operation.GetRawResponse(); |
| | | 41 | | |
| | | 42 | | /// <inheritdoc /> |
| | 0 | 43 | | public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus( |
| | | 44 | | |
| | | 45 | | /// <inheritdoc /> |
| | 0 | 46 | | public override ValueTask<Response> UpdateStatusAsync(CancellationToken cancellationToken = default) => _operati |
| | | 47 | | |
| | | 48 | | /// <inheritdoc /> |
| | 0 | 49 | | public override ValueTask<Response<SparkBatchJob>> WaitForCompletionAsync(CancellationToken cancellationToken = |
| | | 50 | | |
| | | 51 | | /// <inheritdoc /> |
| | 0 | 52 | | public override ValueTask<Response<SparkBatchJob>> WaitForCompletionAsync(TimeSpan pollingInterval, Cancellation |
| | | 53 | | |
| | | 54 | | SparkBatchJob IOperationSource<SparkBatchJob>.CreateResult(Response response, CancellationToken cancellationToke |
| | | 55 | | { |
| | 0 | 56 | | using var document = JsonDocument.Parse(response.ContentStream); |
| | 0 | 57 | | return SparkBatchJob.DeserializeSparkBatchJob(document.RootElement); |
| | 0 | 58 | | } |
| | | 59 | | |
| | | 60 | | async ValueTask<SparkBatchJob> IOperationSource<SparkBatchJob>.CreateResultAsync(Response response, Cancellation |
| | | 61 | | { |
| | 0 | 62 | | using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).Confi |
| | 0 | 63 | | return SparkBatchJob.DeserializeSparkBatchJob(document.RootElement); |
| | 0 | 64 | | } |
| | | 65 | | } |
| | | 66 | | } |