/// <summary>Snippet for DeleteDomainMapping</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void DeleteDomainMappingRequestObject() { // Create client DomainMappingsClient domainMappingsClient = DomainMappingsClient.Create(); // Initialize request argument(s) DeleteDomainMappingRequest request = new DeleteDomainMappingRequest { Name = "", }; // Make the request Operation <Empty, OperationMetadataV1> response = domainMappingsClient.DeleteDomainMapping(request); // Poll until the returned long-running operation is complete Operation <Empty, OperationMetadataV1> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result Empty result = completedResponse.Result; // Or get the name of the operation string operationName = response.Name; // This name can be stored, then the long-running operation retrieved later by name Operation <Empty, OperationMetadataV1> retrievedResponse = domainMappingsClient.PollOnceDeleteDomainMapping(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Empty retrievedResult = retrievedResponse.Result; } }
/// <summary>Snippet for DeleteDomainMappingAsync</summary> public async Task DeleteDomainMappingRequestObjectAsync() { // Snippet: DeleteDomainMappingAsync(DeleteDomainMappingRequest, CallSettings) // Additional: DeleteDomainMappingAsync(DeleteDomainMappingRequest, CancellationToken) // Create client DomainMappingsClient domainMappingsClient = await DomainMappingsClient.CreateAsync(); // Initialize request argument(s) DeleteDomainMappingRequest request = new DeleteDomainMappingRequest { Name = "", }; // Make the request Operation <Empty, OperationMetadataV1> response = await domainMappingsClient.DeleteDomainMappingAsync(request); // Poll until the returned long-running operation is complete Operation <Empty, OperationMetadataV1> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result Empty result = completedResponse.Result; // Or get the name of the operation string operationName = response.Name; // This name can be stored, then the long-running operation retrieved later by name Operation <Empty, OperationMetadataV1> retrievedResponse = await domainMappingsClient.PollOnceDeleteDomainMappingAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Empty retrievedResult = retrievedResponse.Result; } // End snippet }
/// <summary> /// Deletes the specified domain mapping. A user must be authorized to /// administer the associated domain in order to delete a `DomainMapping` /// 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 async stt::Task <lro::Operation <wkt::Empty, OperationMetadataV1> > DeleteDomainMappingAsync(DeleteDomainMappingRequest request, gaxgrpc::CallSettings callSettings = null) { Modify_DeleteDomainMappingRequest(ref request, ref callSettings); return(new lro::Operation <wkt::Empty, OperationMetadataV1>(await _callDeleteDomainMapping.Async(request, callSettings).ConfigureAwait(false), DeleteDomainMappingOperationsClient)); }
/// <summary> /// Deletes the specified domain mapping. A user must be authorized to /// administer the associated domain in order to delete a `DomainMapping` /// 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>The RPC response.</returns> public override lro::Operation <wkt::Empty, OperationMetadataV1> DeleteDomainMapping(DeleteDomainMappingRequest request, gaxgrpc::CallSettings callSettings = null) { Modify_DeleteDomainMappingRequest(ref request, ref callSettings); return(new lro::Operation <wkt::Empty, OperationMetadataV1>(_callDeleteDomainMapping.Sync(request, callSettings), DeleteDomainMappingOperationsClient)); }
partial void Modify_DeleteDomainMappingRequest(ref DeleteDomainMappingRequest request, ref gaxgrpc::CallSettings settings);
/// <summary> /// Deletes the specified domain mapping. A user must be authorized to /// administer the associated domain in order to delete a `DomainMapping` /// 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 <lro::Operation <wkt::Empty, OperationMetadataV1> > DeleteDomainMappingAsync(DeleteDomainMappingRequest request, st::CancellationToken cancellationToken) => DeleteDomainMappingAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary> /// Deletes the specified domain mapping. A user must be authorized to /// administer the associated domain in order to delete a `DomainMapping` /// 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 <lro::Operation <wkt::Empty, OperationMetadataV1> > DeleteDomainMappingAsync(DeleteDomainMappingRequest request, gaxgrpc::CallSettings callSettings = null) => throw new sys::NotImplementedException();