/// <summary> /// Starts asynchronous cancellation on a long-running operation. The server /// makes a best effort to cancel the operation, but success is not /// guaranteed. If the server doesn't support this method, it returns /// `google.rpc.Code.UNIMPLEMENTED`. Clients can use /// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or /// other methods to check whether the cancellation succeeded or whether the /// operation completed despite cancellation. On successful cancellation, /// the operation is not deleted; instead, it becomes an operation with /// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, /// corresponding to `Code.CANCELLED`. /// </summary> /// <param name="name"> /// The name of the operation resource to be cancelled. /// </param> /// <param name="callSettings"> /// If not null, applies overrides to this RPC call. /// </param> /// <returns> /// A Task containing the RPC response. /// </returns> public override Task CancelOperationAsync( string name, CallSettings callSettings = null) { CancelOperationRequest request = new CancelOperationRequest { Name = name, }; Modify_CancelOperationRequest(ref request, ref callSettings); return(_callCancelOperation.Async(request, callSettings)); }
/// <summary> /// Starts asynchronous cancellation on a long-running operation. The server /// makes a best effort to cancel the operation, but success is not /// guaranteed. If the server doesn't support this method, it returns /// `google.rpc.Code.UNIMPLEMENTED`. Clients can use /// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or /// other methods to check whether the cancellation succeeded or whether the /// operation completed despite cancellation. On successful cancellation, /// the operation is not deleted; instead, it becomes an operation with /// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, /// corresponding to `Code.CANCELLED`. /// </summary> /// <param name="name"> /// The name of the operation resource to be cancelled. /// </param> /// <param name="callSettings"> /// If not null, applies overrides to this RPC call. /// </param> /// <returns> /// The RPC response. /// </returns> public override void CancelOperation( string name, CallSettings callSettings = null) { CancelOperationRequest request = new CancelOperationRequest { Name = name, }; Modify_CancelOperationRequest(ref request, ref callSettings); _callCancelOperation.Sync(request, callSettings); }
partial void Modify_CancelOperationRequest(ref CancelOperationRequest request, ref CallSettings settings);