/// <summary>Snippet for SetUrlMap</summary> public void SetUrlMap() { // Snippet: SetUrlMap(string, string, UrlMapReference, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) string project = ""; string targetHttpProxy = ""; UrlMapReference urlMapReferenceResource = new UrlMapReference(); // Make the request lro::Operation <Operation, Operation> response = targetHttpProxiesClient.SetUrlMap(project, targetHttpProxy, urlMapReferenceResource); // Poll until the returned long-running operation is complete lro::Operation <Operation, Operation> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result Operation 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 lro::Operation <Operation, Operation> retrievedResponse = targetHttpProxiesClient.PollOnceSetUrlMap(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Operation retrievedResult = retrievedResponse.Result; } // End snippet }
/// <summary>Snippet for Patch</summary> public void PatchRequestObject() { // Snippet: Patch(PatchTargetHttpProxyRequest, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) PatchTargetHttpProxyRequest request = new PatchTargetHttpProxyRequest { TargetHttpProxyResource = new TargetHttpProxy(), RequestId = "", TargetHttpProxy = "", Project = "", }; // Make the request lro::Operation <Operation, Operation> response = targetHttpProxiesClient.Patch(request); // Poll until the returned long-running operation is complete lro::Operation <Operation, Operation> completedResponse = response.PollUntilCompleted(); // Retrieve the operation result Operation 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 lro::Operation <Operation, Operation> retrievedResponse = targetHttpProxiesClient.PollOncePatch(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result Operation retrievedResult = retrievedResponse.Result; } // End snippet }
/// <summary>Snippet for AggregatedList</summary> public void AggregatedList() { // Snippet: AggregatedList(string, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) string project = ""; // Make the request TargetHttpProxyAggregatedList response = targetHttpProxiesClient.AggregatedList(project); // End snippet }
/// <summary>Snippet for Insert</summary> public void Insert() { // Snippet: Insert(string, TargetHttpProxy, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) string project = ""; TargetHttpProxy targetHttpProxyResource = new TargetHttpProxy(); // Make the request Operation response = targetHttpProxiesClient.Insert(project, targetHttpProxyResource); // End snippet }
/// <summary>Snippet for Get</summary> public void Get() { // Snippet: Get(string, string, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) string project = ""; string targetHttpProxy = ""; // Make the request TargetHttpProxy response = targetHttpProxiesClient.Get(project, targetHttpProxy); // End snippet }
/// <summary>Snippet for SetUrlMap</summary> public void SetUrlMap() { // Snippet: SetUrlMap(string, string, UrlMapReference, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) string project = ""; string targetHttpProxy = ""; UrlMapReference urlMapReferenceResource = new UrlMapReference(); // Make the request Operation response = targetHttpProxiesClient.SetUrlMap(project, targetHttpProxy, urlMapReferenceResource); // End snippet }
/// <summary>Snippet for AggregatedList</summary> public void AggregatedListRequestObject() { // Snippet: AggregatedList(AggregatedListTargetHttpProxiesRequest, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) AggregatedListTargetHttpProxiesRequest request = new AggregatedListTargetHttpProxiesRequest { OrderBy = "", Project = "", Filter = "", IncludeAllScopes = false, ReturnPartialSuccess = false, }; // Make the request PagedEnumerable <TargetHttpProxyAggregatedList, KeyValuePair <string, TargetHttpProxiesScopedList> > response = targetHttpProxiesClient.AggregatedList(request); // Iterate over all response items, lazily performing RPCs as required foreach (KeyValuePair <string, TargetHttpProxiesScopedList> item in response) { // Do something with each item Console.WriteLine(item); } // Or iterate over pages (of server-defined size), performing one RPC per page foreach (TargetHttpProxyAggregatedList page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (KeyValuePair <string, TargetHttpProxiesScopedList> item in page) { // Do something with each item Console.WriteLine(item); } } // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required int pageSize = 10; Page <KeyValuePair <string, TargetHttpProxiesScopedList> > singlePage = response.ReadPage(pageSize); // Do something with the page of items Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); foreach (KeyValuePair <string, TargetHttpProxiesScopedList> item in singlePage) { // Do something with each item Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
/// <summary>Snippet for Get</summary> public void GetRequestObject() { // Snippet: Get(GetTargetHttpProxyRequest, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) GetTargetHttpProxyRequest request = new GetTargetHttpProxyRequest { TargetHttpProxy = "", Project = "", }; // Make the request TargetHttpProxy response = targetHttpProxiesClient.Get(request); // End snippet }
/// <summary>Snippet for Insert</summary> public void InsertRequestObject() { // Snippet: Insert(InsertTargetHttpProxyRequest, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) InsertTargetHttpProxyRequest request = new InsertTargetHttpProxyRequest { TargetHttpProxyResource = new TargetHttpProxy(), RequestId = "", Project = "", }; // Make the request Operation response = targetHttpProxiesClient.Insert(request); // End snippet }
/// <summary>Snippet for Delete</summary> public void DeleteRequestObject() { // Snippet: Delete(DeleteTargetHttpProxyRequest, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) DeleteTargetHttpProxyRequest request = new DeleteTargetHttpProxyRequest { RequestId = "", TargetHttpProxy = "", Project = "", }; // Make the request Operation response = targetHttpProxiesClient.Delete(request); // End snippet }
/// <summary>Snippet for SetUrlMap</summary> public void SetUrlMapRequestObject() { // Snippet: SetUrlMap(SetUrlMapTargetHttpProxyRequest, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) SetUrlMapTargetHttpProxyRequest request = new SetUrlMapTargetHttpProxyRequest { RequestId = "", TargetHttpProxy = "", Project = "", UrlMapReferenceResource = new UrlMapReference(), }; // Make the request Operation response = targetHttpProxiesClient.SetUrlMap(request); // End snippet }
/// <summary>Snippet for List</summary> public void List() { // Snippet: List(string, string, int?, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) string project = ""; // Make the request PagedEnumerable <TargetHttpProxyList, TargetHttpProxy> response = targetHttpProxiesClient.List(project); // Iterate over all response items, lazily performing RPCs as required foreach (TargetHttpProxy item in response) { // Do something with each item Console.WriteLine(item); } // Or iterate over pages (of server-defined size), performing one RPC per page foreach (TargetHttpProxyList page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (TargetHttpProxy item in page) { // Do something with each item Console.WriteLine(item); } } // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required int pageSize = 10; Page <TargetHttpProxy> singlePage = response.ReadPage(pageSize); // Do something with the page of items Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); foreach (TargetHttpProxy item in singlePage) { // Do something with each item Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
/// <summary>Snippet for List</summary> public void ListRequestObject() { // Snippet: List(ListTargetHttpProxiesRequest, CallSettings) // Create client TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.Create(); // Initialize request argument(s) ListTargetHttpProxiesRequest request = new ListTargetHttpProxiesRequest { PageToken = "", MaxResults = 0U, OrderBy = "", Project = "", Filter = "", ReturnPartialSuccess = false, }; // Make the request TargetHttpProxyList response = targetHttpProxiesClient.List(request); // End snippet }