コード例 #1
0
        /// <summary>Snippet for InsertAsync</summary>
        public async Task InsertAsync()
        {
            // Snippet: InsertAsync(string, SslCertificate, CallSettings)
            // Additional: InsertAsync(string, SslCertificate, CancellationToken)
            // Create client
            SslCertificatesClient sslCertificatesClient = await SslCertificatesClient.CreateAsync();

            // Initialize request argument(s)
            string         project = "";
            SslCertificate sslCertificateResource = new SslCertificate();
            // Make the request
            lro::Operation <Operation, Operation> response = await sslCertificatesClient.InsertAsync(project, sslCertificateResource);

            // Poll until the returned long-running operation is complete
            lro::Operation <Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();

            // 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 = await sslCertificatesClient.PollOnceInsertAsync(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
        }
コード例 #2
0
        /// <summary>Snippet for Insert</summary>
        public void InsertRequestObject()
        {
            // Snippet: Insert(InsertSslCertificateRequest, CallSettings)
            // Create client
            SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
            // Initialize request argument(s)
            InsertSslCertificateRequest request = new InsertSslCertificateRequest
            {
                RequestId = "",
                SslCertificateResource = new SslCertificate(),
                Project = "",
            };
            // Make the request
            lro::Operation <Operation, Operation> response = sslCertificatesClient.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 = sslCertificatesClient.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 Delete</summary>
        public void Delete()
        {
            // Snippet: Delete(string, string, CallSettings)
            // Create client
            SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
            // Initialize request argument(s)
            string project        = "";
            string sslCertificate = "";
            // Make the request
            lro::Operation <Operation, Operation> response = sslCertificatesClient.Delete(project, sslCertificate);

            // 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 = sslCertificatesClient.PollOnceDelete(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
        }
コード例 #4
0
 /// <summary>Snippet for AggregatedList</summary>
 public void AggregatedList()
 {
     // Snippet: AggregatedList(string, CallSettings)
     // Create client
     SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
     // Initialize request argument(s)
     string project = "";
     // Make the request
     SslCertificateAggregatedList response = sslCertificatesClient.AggregatedList(project);
     // End snippet
 }
コード例 #5
0
 /// <summary>Snippet for Get</summary>
 public void Get()
 {
     // Snippet: Get(string, string, CallSettings)
     // Create client
     SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
     // Initialize request argument(s)
     string project        = "";
     string sslCertificate = "";
     // Make the request
     SslCertificate response = sslCertificatesClient.Get(project, sslCertificate);
     // End snippet
 }
コード例 #6
0
 /// <summary>Snippet for Insert</summary>
 public void Insert()
 {
     // Snippet: Insert(string, SslCertificate, CallSettings)
     // Create client
     SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
     // Initialize request argument(s)
     string         project = "";
     SslCertificate sslCertificateResource = new SslCertificate();
     // Make the request
     Operation response = sslCertificatesClient.Insert(project, sslCertificateResource);
     // End snippet
 }
コード例 #7
0
        /// <summary>Snippet for AggregatedListAsync</summary>
        public async Task AggregatedListRequestObjectAsync()
        {
            // Snippet: AggregatedListAsync(AggregatedListSslCertificatesRequest, CallSettings)
            // Create client
            SslCertificatesClient sslCertificatesClient = await SslCertificatesClient.CreateAsync();

            // Initialize request argument(s)
            AggregatedListSslCertificatesRequest request = new AggregatedListSslCertificatesRequest
            {
                OrderBy              = "",
                Project              = "",
                Filter               = "",
                IncludeAllScopes     = false,
                ReturnPartialSuccess = false,
            };
            // Make the request
            PagedAsyncEnumerable <SslCertificateAggregatedList, KeyValuePair <string, SslCertificatesScopedList> > response = sslCertificatesClient.AggregatedListAsync(request);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((KeyValuePair <string, SslCertificatesScopedList> item) =>
            {
                // Do something with each item
                Console.WriteLine(item);
            });

            // Or iterate over pages (of server-defined size), performing one RPC per page
            await response.AsRawResponses().ForEachAsync((SslCertificateAggregatedList page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (KeyValuePair <string, SslCertificatesScopedList> 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, SslCertificatesScopedList> > singlePage = await response.ReadPageAsync(pageSize);

            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (KeyValuePair <string, SslCertificatesScopedList> 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
        }
コード例 #8
0
        /// <summary>Snippet for List</summary>
        public void ListRequestObject()
        {
            // Snippet: List(ListSslCertificatesRequest, CallSettings)
            // Create client
            SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
            // Initialize request argument(s)
            ListSslCertificatesRequest request = new ListSslCertificatesRequest
            {
                OrderBy = "",
                Project = "",
                Filter  = "",
                ReturnPartialSuccess = false,
            };
            // Make the request
            PagedEnumerable <SslCertificateList, SslCertificate> response = sslCertificatesClient.List(request);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (SslCertificate 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 (SslCertificateList page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (SslCertificate 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 <SslCertificate> 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 (SslCertificate 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
        }
コード例 #9
0
        /// <summary>Snippet for AggregatedListAsync</summary>
        public async Task AggregatedListAsync()
        {
            // Snippet: AggregatedListAsync(string, CallSettings)
            // Additional: AggregatedListAsync(string, CancellationToken)
            // Create client
            SslCertificatesClient sslCertificatesClient = await SslCertificatesClient.CreateAsync();

            // Initialize request argument(s)
            string project = "";
            // Make the request
            SslCertificateAggregatedList response = await sslCertificatesClient.AggregatedListAsync(project);

            // End snippet
        }
コード例 #10
0
 /// <summary>Snippet for Get</summary>
 public void GetRequestObject()
 {
     // Snippet: Get(GetSslCertificateRequest, CallSettings)
     // Create client
     SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
     // Initialize request argument(s)
     GetSslCertificateRequest request = new GetSslCertificateRequest
     {
         SslCertificate = "",
         Project        = "",
     };
     // Make the request
     SslCertificate response = sslCertificatesClient.Get(request);
     // End snippet
 }
コード例 #11
0
        /// <summary>Snippet for InsertAsync</summary>
        public async Task InsertAsync()
        {
            // Snippet: InsertAsync(string, SslCertificate, CallSettings)
            // Additional: InsertAsync(string, SslCertificate, CancellationToken)
            // Create client
            SslCertificatesClient sslCertificatesClient = await SslCertificatesClient.CreateAsync();

            // Initialize request argument(s)
            string         project = "";
            SslCertificate sslCertificateResource = new SslCertificate();
            // Make the request
            Operation response = await sslCertificatesClient.InsertAsync(project, sslCertificateResource);

            // End snippet
        }
コード例 #12
0
        /// <summary>Snippet for DeleteAsync</summary>
        public async Task DeleteAsync()
        {
            // Snippet: DeleteAsync(string, string, CallSettings)
            // Additional: DeleteAsync(string, string, CancellationToken)
            // Create client
            SslCertificatesClient sslCertificatesClient = await SslCertificatesClient.CreateAsync();

            // Initialize request argument(s)
            string project        = "";
            string sslCertificate = "";
            // Make the request
            Operation response = await sslCertificatesClient.DeleteAsync(project, sslCertificate);

            // End snippet
        }
コード例 #13
0
 /// <summary>Snippet for Insert</summary>
 public void InsertRequestObject()
 {
     // Snippet: Insert(InsertSslCertificateRequest, CallSettings)
     // Create client
     SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
     // Initialize request argument(s)
     InsertSslCertificateRequest request = new InsertSslCertificateRequest
     {
         RequestId = "",
         SslCertificateResource = new SslCertificate(),
         Project = "",
     };
     // Make the request
     Operation response = sslCertificatesClient.Insert(request);
     // End snippet
 }
コード例 #14
0
 /// <summary>Snippet for Delete</summary>
 public void DeleteRequestObject()
 {
     // Snippet: Delete(DeleteSslCertificateRequest, CallSettings)
     // Create client
     SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
     // Initialize request argument(s)
     DeleteSslCertificateRequest request = new DeleteSslCertificateRequest
     {
         RequestId      = "",
         SslCertificate = "",
         Project        = "",
     };
     // Make the request
     Operation response = sslCertificatesClient.Delete(request);
     // End snippet
 }
コード例 #15
0
        /// <summary>Snippet for ListAsync</summary>
        public async Task ListAsync()
        {
            // Snippet: ListAsync(string, string, int?, CallSettings)
            // Create client
            SslCertificatesClient sslCertificatesClient = await SslCertificatesClient.CreateAsync();

            // Initialize request argument(s)
            string project = "";
            // Make the request
            PagedAsyncEnumerable <SslCertificateList, SslCertificate> response = sslCertificatesClient.ListAsync(project);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((SslCertificate item) =>
            {
                // Do something with each item
                Console.WriteLine(item);
            });

            // Or iterate over pages (of server-defined size), performing one RPC per page
            await response.AsRawResponses().ForEachAsync((SslCertificateList page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (SslCertificate 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 <SslCertificate> singlePage = await response.ReadPageAsync(pageSize);

            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (SslCertificate 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
        }
コード例 #16
0
        /// <summary>Snippet for GetAsync</summary>
        public async Task GetRequestObjectAsync()
        {
            // Snippet: GetAsync(GetSslCertificateRequest, CallSettings)
            // Additional: GetAsync(GetSslCertificateRequest, CancellationToken)
            // Create client
            SslCertificatesClient sslCertificatesClient = await SslCertificatesClient.CreateAsync();

            // Initialize request argument(s)
            GetSslCertificateRequest request = new GetSslCertificateRequest
            {
                SslCertificate = "",
                Project        = "",
            };
            // Make the request
            SslCertificate response = await sslCertificatesClient.GetAsync(request);

            // End snippet
        }
コード例 #17
0
        /// <summary>Snippet for AggregatedList</summary>
        public void AggregatedList()
        {
            // Snippet: AggregatedList(string, string, int?, CallSettings)
            // Create client
            SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
            // Initialize request argument(s)
            string project = "";
            // Make the request
            PagedEnumerable <SslCertificateAggregatedList, KeyValuePair <string, SslCertificatesScopedList> > response = sslCertificatesClient.AggregatedList(project);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (KeyValuePair <string, SslCertificatesScopedList> 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 (SslCertificateAggregatedList page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (KeyValuePair <string, SslCertificatesScopedList> 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, SslCertificatesScopedList> > 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, SslCertificatesScopedList> 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
        }
コード例 #18
0
 /// <summary>Snippet for List</summary>
 public void ListRequestObject()
 {
     // Snippet: List(ListSslCertificatesRequest, CallSettings)
     // Create client
     SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
     // Initialize request argument(s)
     ListSslCertificatesRequest request = new ListSslCertificatesRequest
     {
         PageToken            = "",
         MaxResults           = 0U,
         Filter               = "",
         OrderBy              = "",
         Project              = "",
         ReturnPartialSuccess = false,
     };
     // Make the request
     SslCertificateList response = sslCertificatesClient.List(request);
     // End snippet
 }
コード例 #19
0
        /// <summary>Snippet for InsertAsync</summary>
        public async Task InsertRequestObjectAsync()
        {
            // Snippet: InsertAsync(InsertSslCertificateRequest, CallSettings)
            // Additional: InsertAsync(InsertSslCertificateRequest, CancellationToken)
            // Create client
            SslCertificatesClient sslCertificatesClient = await SslCertificatesClient.CreateAsync();

            // Initialize request argument(s)
            InsertSslCertificateRequest request = new InsertSslCertificateRequest
            {
                RequestId = "",
                SslCertificateResource = new SslCertificate(),
                Project = "",
            };
            // Make the request
            Operation response = await sslCertificatesClient.InsertAsync(request);

            // End snippet
        }
コード例 #20
0
        /// <summary>Snippet for DeleteAsync</summary>
        public async Task DeleteRequestObjectAsync()
        {
            // Snippet: DeleteAsync(DeleteSslCertificateRequest, CallSettings)
            // Additional: DeleteAsync(DeleteSslCertificateRequest, CancellationToken)
            // Create client
            SslCertificatesClient sslCertificatesClient = await SslCertificatesClient.CreateAsync();

            // Initialize request argument(s)
            DeleteSslCertificateRequest request = new DeleteSslCertificateRequest
            {
                RequestId      = "",
                SslCertificate = "",
                Project        = "",
            };
            // Make the request
            Operation response = await sslCertificatesClient.DeleteAsync(request);

            // End snippet
        }
コード例 #21
0
        /// <summary>Snippet for ListAsync</summary>
        public async Task ListRequestObjectAsync()
        {
            // Snippet: ListAsync(ListSslCertificatesRequest, CallSettings)
            // Additional: ListAsync(ListSslCertificatesRequest, CancellationToken)
            // Create client
            SslCertificatesClient sslCertificatesClient = await SslCertificatesClient.CreateAsync();

            // Initialize request argument(s)
            ListSslCertificatesRequest request = new ListSslCertificatesRequest
            {
                PageToken            = "",
                MaxResults           = 0U,
                Filter               = "",
                OrderBy              = "",
                Project              = "",
                ReturnPartialSuccess = false,
            };
            // Make the request
            SslCertificateList response = await sslCertificatesClient.ListAsync(request);

            // End snippet
        }