コード例 #1
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
            lro::Operation <Operation, Operation> response = sslCertificatesClient.Insert(project, sslCertificateResource);

            // 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
        }
コード例 #2
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
            lro::Operation <Operation, Operation> response = sslCertificatesClient.Delete(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.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
        }
コード例 #3
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
 }
コード例 #4
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
 }
コード例 #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 AggregatedList</summary>
        public void AggregatedListRequestObject()
        {
            // Snippet: AggregatedList(AggregatedListSslCertificatesRequest, CallSettings)
            // Create client
            SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
            // Initialize request argument(s)
            AggregatedListSslCertificatesRequest request = new AggregatedListSslCertificatesRequest
            {
                OrderBy              = "",
                Project              = "",
                Filter               = "",
                IncludeAllScopes     = false,
                ReturnPartialSuccess = false,
            };
            // Make the request
            PagedEnumerable <SslCertificateAggregatedList, KeyValuePair <string, SslCertificatesScopedList> > response = sslCertificatesClient.AggregatedList(request);

            // 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
        }
コード例 #7
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
 }
コード例 #8
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
 }
コード例 #9
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
 }
コード例 #10
0
        /// <summary>Snippet for List</summary>
        public void List()
        {
            // Snippet: List(string, string, int?, CallSettings)
            // Create client
            SslCertificatesClient sslCertificatesClient = SslCertificatesClient.Create();
            // Initialize request argument(s)
            string project = "";
            // Make the request
            PagedEnumerable <SslCertificateList, SslCertificate> response = sslCertificatesClient.List(project);

            // 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
        }
コード例 #11
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
 }