/// <summary>Snippet for Patch</summary>
        public void Patch()
        {
            // Snippet: Patch(string, string, string, PacketMirroring, CallSettings)
            // Create client
            PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
            // Initialize request argument(s)
            string          project                 = "";
            string          region                  = "";
            string          packetMirroring         = "";
            PacketMirroring packetMirroringResource = new PacketMirroring();
            // Make the request
            lro::Operation <Operation, Operation> response = packetMirroringsClient.Patch(project, region, packetMirroring, packetMirroringResource);

            // 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 = packetMirroringsClient.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(InsertPacketMirroringRequest, CallSettings)
            // Create client
            PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
            // Initialize request argument(s)
            InsertPacketMirroringRequest request = new InsertPacketMirroringRequest
            {
                RequestId = "",
                Region    = "",
                Project   = "",
                PacketMirroringResource = new PacketMirroring(),
            };
            // Make the request
            lro::Operation <Operation, Operation> response = packetMirroringsClient.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 = packetMirroringsClient.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
        }
예제 #3
0
 /// <summary>Snippet for AggregatedList</summary>
 public void AggregatedList()
 {
     // Snippet: AggregatedList(string, CallSettings)
     // Create client
     PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
     // Initialize request argument(s)
     string project = "";
     // Make the request
     PacketMirroringAggregatedList response = packetMirroringsClient.AggregatedList(project);
     // End snippet
 }
예제 #4
0
 /// <summary>Snippet for Insert</summary>
 public void Insert()
 {
     // Snippet: Insert(string, string, PacketMirroring, CallSettings)
     // Create client
     PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
     // Initialize request argument(s)
     string          project = "";
     string          region  = "";
     PacketMirroring packetMirroringResource = new PacketMirroring();
     // Make the request
     Operation response = packetMirroringsClient.Insert(project, region, packetMirroringResource);
     // End snippet
 }
예제 #5
0
 /// <summary>Snippet for Get</summary>
 public void Get()
 {
     // Snippet: Get(string, string, string, CallSettings)
     // Create client
     PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
     // Initialize request argument(s)
     string project         = "";
     string region          = "";
     string packetMirroring = "";
     // Make the request
     PacketMirroring response = packetMirroringsClient.Get(project, region, packetMirroring);
     // End snippet
 }
        /// <summary>Snippet for List</summary>
        public void ListRequestObject()
        {
            // Snippet: List(ListPacketMirroringsRequest, CallSettings)
            // Create client
            PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
            // Initialize request argument(s)
            ListPacketMirroringsRequest request = new ListPacketMirroringsRequest
            {
                Region  = "",
                OrderBy = "",
                Project = "",
                Filter  = "",
                ReturnPartialSuccess = false,
            };
            // Make the request
            PagedEnumerable <PacketMirroringList, PacketMirroring> response = packetMirroringsClient.List(request);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (PacketMirroring 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 (PacketMirroringList page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (PacketMirroring 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 <PacketMirroring> 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 (PacketMirroring 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
        }
예제 #7
0
 /// <summary>Snippet for TestIamPermissions</summary>
 public void TestIamPermissions()
 {
     // Snippet: TestIamPermissions(string, string, string, TestPermissionsRequest, CallSettings)
     // Create client
     PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
     // Initialize request argument(s)
     string project  = "";
     string region   = "";
     string resource = "";
     TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
     // Make the request
     TestPermissionsResponse response = packetMirroringsClient.TestIamPermissions(project, region, resource, testPermissionsRequestResource);
     // End snippet
 }
예제 #8
0
 /// <summary>Snippet for Get</summary>
 public void GetRequestObject()
 {
     // Snippet: Get(GetPacketMirroringRequest, CallSettings)
     // Create client
     PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
     // Initialize request argument(s)
     GetPacketMirroringRequest request = new GetPacketMirroringRequest
     {
         PacketMirroring = "",
         Region          = "",
         Project         = "",
     };
     // Make the request
     PacketMirroring response = packetMirroringsClient.Get(request);
     // End snippet
 }
예제 #9
0
 /// <summary>Snippet for TestIamPermissions</summary>
 public void TestIamPermissionsRequestObject()
 {
     // Snippet: TestIamPermissions(TestIamPermissionsPacketMirroringRequest, CallSettings)
     // Create client
     PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
     // Initialize request argument(s)
     TestIamPermissionsPacketMirroringRequest request = new TestIamPermissionsPacketMirroringRequest
     {
         Region   = "",
         Resource = "",
         Project  = "",
         TestPermissionsRequestResource = new TestPermissionsRequest(),
     };
     // Make the request
     TestPermissionsResponse response = packetMirroringsClient.TestIamPermissions(request);
     // End snippet
 }
예제 #10
0
 /// <summary>Snippet for Insert</summary>
 public void InsertRequestObject()
 {
     // Snippet: Insert(InsertPacketMirroringRequest, CallSettings)
     // Create client
     PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
     // Initialize request argument(s)
     InsertPacketMirroringRequest request = new InsertPacketMirroringRequest
     {
         RequestId = "",
         Region    = "",
         Project   = "",
         PacketMirroringResource = new PacketMirroring(),
     };
     // Make the request
     Operation response = packetMirroringsClient.Insert(request);
     // End snippet
 }
예제 #11
0
 /// <summary>Snippet for Delete</summary>
 public void DeleteRequestObject()
 {
     // Snippet: Delete(DeletePacketMirroringRequest, CallSettings)
     // Create client
     PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
     // Initialize request argument(s)
     DeletePacketMirroringRequest request = new DeletePacketMirroringRequest
     {
         PacketMirroring = "",
         RequestId       = "",
         Region          = "",
         Project         = "",
     };
     // Make the request
     Operation response = packetMirroringsClient.Delete(request);
     // End snippet
 }
        /// <summary>Snippet for AggregatedList</summary>
        public void AggregatedList()
        {
            // Snippet: AggregatedList(string, string, int?, CallSettings)
            // Create client
            PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
            // Initialize request argument(s)
            string project = "";
            // Make the request
            PagedEnumerable <PacketMirroringAggregatedList, KeyValuePair <string, PacketMirroringsScopedList> > response = packetMirroringsClient.AggregatedList(project);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (KeyValuePair <string, PacketMirroringsScopedList> 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 (PacketMirroringAggregatedList page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (KeyValuePair <string, PacketMirroringsScopedList> 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, PacketMirroringsScopedList> > 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, PacketMirroringsScopedList> 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
        }
예제 #13
0
 /// <summary>Snippet for List</summary>
 public void ListRequestObject()
 {
     // Snippet: List(ListPacketMirroringsRequest, CallSettings)
     // Create client
     PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
     // Initialize request argument(s)
     ListPacketMirroringsRequest request = new ListPacketMirroringsRequest
     {
         PageToken            = "",
         MaxResults           = 0U,
         Region               = "",
         OrderBy              = "",
         Project              = "",
         Filter               = "",
         ReturnPartialSuccess = false,
     };
     // Make the request
     PacketMirroringList response = packetMirroringsClient.List(request);
     // End snippet
 }
예제 #14
0
 /// <summary>Snippet for AggregatedList</summary>
 public void AggregatedListRequestObject()
 {
     // Snippet: AggregatedList(AggregatedListPacketMirroringsRequest, CallSettings)
     // Create client
     PacketMirroringsClient packetMirroringsClient = PacketMirroringsClient.Create();
     // Initialize request argument(s)
     AggregatedListPacketMirroringsRequest request = new AggregatedListPacketMirroringsRequest
     {
         PageToken            = "",
         MaxResults           = 0U,
         OrderBy              = "",
         Project              = "",
         Filter               = "",
         IncludeAllScopes     = false,
         ReturnPartialSuccess = false,
     };
     // Make the request
     PacketMirroringAggregatedList response = packetMirroringsClient.AggregatedList(request);
     // End snippet
 }