/// <summary>Snippet for Delete</summary> public void DeleteRequestObject() { // Snippet: Delete(DeleteGlobalOrganizationOperationRequest, CallSettings) // Create client GlobalOrganizationOperationsClient globalOrganizationOperationsClient = GlobalOrganizationOperationsClient.Create(); // Initialize request argument(s) DeleteGlobalOrganizationOperationRequest request = new DeleteGlobalOrganizationOperationRequest { Operation = "", ParentId = "", }; // Make the request DeleteGlobalOrganizationOperationResponse response = globalOrganizationOperationsClient.Delete(request); // End snippet }
public void Delete() { moq::Mock <GlobalOrganizationOperations.GlobalOrganizationOperationsClient> mockGrpcClient = new moq::Mock <GlobalOrganizationOperations.GlobalOrganizationOperationsClient>(moq::MockBehavior.Strict); DeleteGlobalOrganizationOperationRequest request = new DeleteGlobalOrganizationOperationRequest { Operation = "operation615a23f7", }; DeleteGlobalOrganizationOperationResponse expectedResponse = new DeleteGlobalOrganizationOperationResponse { }; mockGrpcClient.Setup(x => x.Delete(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); GlobalOrganizationOperationsClient client = new GlobalOrganizationOperationsClientImpl(mockGrpcClient.Object, null); DeleteGlobalOrganizationOperationResponse response = client.Delete(request.Operation); xunit::Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
/// <summary>Snippet for DeleteAsync</summary> public async Task DeleteRequestObjectAsync() { // Snippet: DeleteAsync(DeleteGlobalOrganizationOperationRequest, CallSettings) // Additional: DeleteAsync(DeleteGlobalOrganizationOperationRequest, CancellationToken) // Create client GlobalOrganizationOperationsClient globalOrganizationOperationsClient = await GlobalOrganizationOperationsClient.CreateAsync(); // Initialize request argument(s) DeleteGlobalOrganizationOperationRequest request = new DeleteGlobalOrganizationOperationRequest { Operation = "", ParentId = "", }; // Make the request DeleteGlobalOrganizationOperationResponse response = await globalOrganizationOperationsClient.DeleteAsync(request); // End snippet }
public async stt::Task DeleteAsync() { moq::Mock <GlobalOrganizationOperations.GlobalOrganizationOperationsClient> mockGrpcClient = new moq::Mock <GlobalOrganizationOperations.GlobalOrganizationOperationsClient>(moq::MockBehavior.Strict); DeleteGlobalOrganizationOperationRequest request = new DeleteGlobalOrganizationOperationRequest { Operation = "operation615a23f7", }; DeleteGlobalOrganizationOperationResponse expectedResponse = new DeleteGlobalOrganizationOperationResponse { }; mockGrpcClient.Setup(x => x.DeleteAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <DeleteGlobalOrganizationOperationResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null)); GlobalOrganizationOperationsClient client = new GlobalOrganizationOperationsClientImpl(mockGrpcClient.Object, null); DeleteGlobalOrganizationOperationResponse responseCallSettings = await client.DeleteAsync(request.Operation, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None)); xunit::Assert.Same(expectedResponse, responseCallSettings); DeleteGlobalOrganizationOperationResponse responseCancellationToken = await client.DeleteAsync(request.Operation, st::CancellationToken.None); xunit::Assert.Same(expectedResponse, responseCancellationToken); mockGrpcClient.VerifyAll(); }
/// <summary> /// Deletes the specified Operations resource. /// </summary> /// <param name="request">The request object containing all of the parameters for the API call.</param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A Task containing the RPC response.</returns> public override stt::Task <DeleteGlobalOrganizationOperationResponse> DeleteAsync(DeleteGlobalOrganizationOperationRequest request, gaxgrpc::CallSettings callSettings = null) { Modify_DeleteGlobalOrganizationOperationRequest(ref request, ref callSettings); return(_callDelete.Async(request, callSettings)); }
partial void Modify_DeleteGlobalOrganizationOperationRequest(ref DeleteGlobalOrganizationOperationRequest request, ref gaxgrpc::CallSettings settings);
/// <summary> /// Deletes the specified Operations resource. /// </summary> /// <param name="request">The request object containing all of the parameters for the API call.</param> /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param> /// <returns>A Task containing the RPC response.</returns> public virtual stt::Task <DeleteGlobalOrganizationOperationResponse> DeleteAsync(DeleteGlobalOrganizationOperationRequest request, st::CancellationToken cancellationToken) => DeleteAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary> /// Deletes the specified Operations resource. /// </summary> /// <param name="request">The request object containing all of the parameters for the API call.</param> /// <param name="callSettings">If not null, applies overrides to this RPC call.</param> /// <returns>A Task containing the RPC response.</returns> public virtual stt::Task <DeleteGlobalOrganizationOperationResponse> DeleteAsync(DeleteGlobalOrganizationOperationRequest request, gaxgrpc::CallSettings callSettings = null) => throw new sys::NotImplementedException();