/// <summary>Snippet for Patch</summary> public void Patch() { // Snippet: Patch(string, string, string, InterconnectAttachment, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) string project = ""; string region = ""; string interconnectAttachment = ""; InterconnectAttachment interconnectAttachmentResource = new InterconnectAttachment(); // Make the request lro::Operation <Operation, Operation> response = interconnectAttachmentsClient.Patch(project, region, interconnectAttachment, interconnectAttachmentResource); // 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 = interconnectAttachmentsClient.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 Insert</summary> public void InsertRequestObject() { // Snippet: Insert(InsertInterconnectAttachmentRequest, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) InsertInterconnectAttachmentRequest request = new InsertInterconnectAttachmentRequest { RequestId = "", Region = "", InterconnectAttachmentResource = new InterconnectAttachment(), Project = "", ValidateOnly = false, }; // Make the request lro::Operation <Operation, Operation> response = interconnectAttachmentsClient.Insert(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 = interconnectAttachmentsClient.PollOnceInsert(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 InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) string project = ""; // Make the request InterconnectAttachmentAggregatedList response = interconnectAttachmentsClient.AggregatedList(project); // End snippet }
/// <summary>Snippet for Insert</summary> public void Insert() { // Snippet: Insert(string, string, InterconnectAttachment, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) string project = ""; string region = ""; InterconnectAttachment interconnectAttachmentResource = new InterconnectAttachment(); // Make the request Operation response = interconnectAttachmentsClient.Insert(project, region, interconnectAttachmentResource); // End snippet }
/// <summary>Snippet for Get</summary> public void Get() { // Snippet: Get(string, string, string, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) string project = ""; string region = ""; string interconnectAttachment = ""; // Make the request InterconnectAttachment response = interconnectAttachmentsClient.Get(project, region, interconnectAttachment); // End snippet }
/// <summary>Snippet for List</summary> public void ListRequestObject() { // Snippet: List(ListInterconnectAttachmentsRequest, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) ListInterconnectAttachmentsRequest request = new ListInterconnectAttachmentsRequest { Region = "", OrderBy = "", Project = "", Filter = "", ReturnPartialSuccess = false, }; // Make the request PagedEnumerable <InterconnectAttachmentList, InterconnectAttachment> response = interconnectAttachmentsClient.List(request); // Iterate over all response items, lazily performing RPCs as required foreach (InterconnectAttachment 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 (InterconnectAttachmentList page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (InterconnectAttachment 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 <InterconnectAttachment> 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 (InterconnectAttachment 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(GetInterconnectAttachmentRequest, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) GetInterconnectAttachmentRequest request = new GetInterconnectAttachmentRequest { Region = "", Project = "", InterconnectAttachment = "", }; // Make the request InterconnectAttachment response = interconnectAttachmentsClient.Get(request); // End snippet }
/// <summary>Snippet for Delete</summary> public void DeleteRequestObject() { // Snippet: Delete(DeleteInterconnectAttachmentRequest, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) DeleteInterconnectAttachmentRequest request = new DeleteInterconnectAttachmentRequest { RequestId = "", Region = "", Project = "", InterconnectAttachment = "", }; // Make the request Operation response = interconnectAttachmentsClient.Delete(request); // End snippet }
/// <summary>Snippet for Patch</summary> public void PatchRequestObject() { // Snippet: Patch(PatchInterconnectAttachmentRequest, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) PatchInterconnectAttachmentRequest request = new PatchInterconnectAttachmentRequest { RequestId = "", Region = "", InterconnectAttachmentResource = new InterconnectAttachment(), Project = "", InterconnectAttachment = "", }; // Make the request Operation response = interconnectAttachmentsClient.Patch(request); // End snippet }
/// <summary>Snippet for Insert</summary> public void InsertRequestObject() { // Snippet: Insert(InsertInterconnectAttachmentRequest, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) InsertInterconnectAttachmentRequest request = new InsertInterconnectAttachmentRequest { RequestId = "", Region = "", InterconnectAttachmentResource = new InterconnectAttachment(), Project = "", ValidateOnly = false, }; // Make the request Operation response = interconnectAttachmentsClient.Insert(request); // End snippet }
/// <summary>Snippet for AggregatedList</summary> public void AggregatedList() { // Snippet: AggregatedList(string, string, int?, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) string project = ""; // Make the request PagedEnumerable <InterconnectAttachmentAggregatedList, KeyValuePair <string, InterconnectAttachmentsScopedList> > response = interconnectAttachmentsClient.AggregatedList(project); // Iterate over all response items, lazily performing RPCs as required foreach (KeyValuePair <string, InterconnectAttachmentsScopedList> 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 (InterconnectAttachmentAggregatedList page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (KeyValuePair <string, InterconnectAttachmentsScopedList> 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, InterconnectAttachmentsScopedList> > 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, InterconnectAttachmentsScopedList> 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(ListInterconnectAttachmentsRequest, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) ListInterconnectAttachmentsRequest request = new ListInterconnectAttachmentsRequest { PageToken = "", MaxResults = 0U, Region = "", OrderBy = "", Project = "", Filter = "", ReturnPartialSuccess = false, }; // Make the request InterconnectAttachmentList response = interconnectAttachmentsClient.List(request); // End snippet }
/// <summary>Snippet for AggregatedList</summary> public void AggregatedListRequestObject() { // Snippet: AggregatedList(AggregatedListInterconnectAttachmentsRequest, CallSettings) // Create client InterconnectAttachmentsClient interconnectAttachmentsClient = InterconnectAttachmentsClient.Create(); // Initialize request argument(s) AggregatedListInterconnectAttachmentsRequest request = new AggregatedListInterconnectAttachmentsRequest { PageToken = "", MaxResults = 0U, OrderBy = "", Project = "", Filter = "", IncludeAllScopes = false, ReturnPartialSuccess = false, }; // Make the request InterconnectAttachmentAggregatedList response = interconnectAttachmentsClient.AggregatedList(request); // End snippet }