internal SparkBatchOperation(SparkBatchClient client, ClientDiagnostics diagnostics, Response <SparkBatchJob> response) { _client = client; _value = response.Value ?? throw new InvalidOperationException("The response does not contain a value."); _response = response; _diagnostics = diagnostics; }
/// <summary> /// Initializes a new instance of the <see cref="SparkBatchOperation"/> class. /// </summary> /// <param name="batchId">The ID of the Spark batch job.</param> /// <param name="client">The client used to check for completion.</param> /// <param name="completionType">The operation completion type.</param> public SparkBatchOperation(int batchId, SparkBatchClient client, SparkBatchOperationCompletionType completionType = SparkBatchOperationCompletionType.JobSubmission) { _batchId = batchId; _client = client; _completionType = completionType; }
internal SparkBatchOperation(SparkBatchClient client, ClientDiagnostics diagnostics, Response <SparkBatchJob> response, SparkBatchOperationCompletionType completionType) : this(response.Value.Id, client, completionType) { _diagnostics = diagnostics; _rawResponse = response.GetRawResponse(); }