/// <summary>Snippet for SearchAllIamPolicies</summary> public void SearchAllIamPoliciesRequestObject() { // Snippet: SearchAllIamPolicies(SearchAllIamPoliciesRequest, CallSettings) // Create client AssetServiceClient assetServiceClient = AssetServiceClient.Create(); // Initialize request argument(s) SearchAllIamPoliciesRequest request = new SearchAllIamPoliciesRequest { Scope = "", Query = "", }; // Make the request PagedEnumerable<SearchAllIamPoliciesResponse, IamPolicySearchResult> response = assetServiceClient.SearchAllIamPolicies(request); // Iterate over all response items, lazily performing RPCs as required foreach (IamPolicySearchResult 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 (SearchAllIamPoliciesResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (IamPolicySearchResult 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<IamPolicySearchResult> 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 (IamPolicySearchResult 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 ListTables</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListTablesRequestObject() { // Create client TablesServiceClient tablesServiceClient = TablesServiceClient.Create(); // Initialize request argument(s) ListTablesRequest request = new ListTablesRequest { }; // Make the request PagedEnumerable <ListTablesResponse, Table> response = tablesServiceClient.ListTables(request); // Iterate over all response items, lazily performing RPCs as required foreach (Table 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 (ListTablesResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Table 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 <Table> 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 (Table 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; }
/// <summary>Snippet for ResourcedMethod</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ResourcedMethod2() { // Create client PaginatedClient paginatedClient = PaginatedClient.Create(); // Initialize request argument(s) string name = "items/[ITEM_ID]"; string extraString = ""; // Make the request PagedEnumerable <ResourceResponse, string> response = paginatedClient.ResourcedMethod(name, extraString: extraString); // Iterate over all response items, lazily performing RPCs as required foreach (string 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 (ResourceResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (string 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 <string> 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 (string 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; }
/// <summary>Snippet for ListSessions</summary> public void ListSessions() { // Snippet: ListSessions(string,string,int?,CallSettings) // Create client SpannerClient spannerClient = SpannerClient.Create(); // Initialize request argument(s) string formattedDatabase = new DatabaseName("[PROJECT]", "[INSTANCE]", "[DATABASE]").ToString(); // Make the request PagedEnumerable <ListSessionsResponse, Session> response = spannerClient.ListSessions(formattedDatabase); // Iterate over all response items, lazily performing RPCs as required foreach (Session 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 (ListSessionsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Session item in page) { 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 <Session> 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 (Session item in singlePage) { Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
/// <summary>Snippet for ListMonitoredResourceDescriptors</summary> public void ListMonitoredResourceDescriptors_RequestObject() { // Snippet: ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest,CallSettings) // Create client LoggingServiceV2Client loggingServiceV2Client = LoggingServiceV2Client.Create(); // Initialize request argument(s) ListMonitoredResourceDescriptorsRequest request = new ListMonitoredResourceDescriptorsRequest(); // Make the request PagedEnumerable <ListMonitoredResourceDescriptorsResponse, MonitoredResourceDescriptor> response = loggingServiceV2Client.ListMonitoredResourceDescriptors(request); // Iterate over all response items, lazily performing RPCs as required foreach (MonitoredResourceDescriptor 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 (ListMonitoredResourceDescriptorsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (MonitoredResourceDescriptor item in page) { 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 <MonitoredResourceDescriptor> 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 (MonitoredResourceDescriptor item in singlePage) { Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
/// <summary>Snippet for ListSnapshots</summary> public void ListSnapshots() { // Snippet: ListSnapshots(ClusterName,string,int?,CallSettings) // Create client BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create(); // Initialize request argument(s) ClusterName parent = new ClusterName("[PROJECT]", "[INSTANCE]", "[CLUSTER]"); // Make the request PagedEnumerable <ListSnapshotsResponse, Snapshot> response = bigtableTableAdminClient.ListSnapshots(parent); // Iterate over all response items, lazily performing RPCs as required foreach (Snapshot 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 (ListSnapshotsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Snapshot item in page) { 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 <Snapshot> 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 (Snapshot item in singlePage) { Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
/// <summary>Snippet for Search</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void Search() { // Create client GoogleAdsServiceClient googleAdsServiceClient = GoogleAdsServiceClient.Create(); // Initialize request argument(s) string customerId = ""; string query = ""; // Make the request PagedEnumerable <SearchGoogleAdsResponse, GoogleAdsRow> response = googleAdsServiceClient.Search(customerId, query); // Iterate over all response items, lazily performing RPCs as required foreach (GoogleAdsRow 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 (SearchGoogleAdsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (GoogleAdsRow 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 <GoogleAdsRow> 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 (GoogleAdsRow 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; }
/// <summary>Snippet for ListModelEvaluations</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListModelEvaluations() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]"; string filter = ""; // Make the request PagedEnumerable <ListModelEvaluationsResponse, ModelEvaluation> response = autoMlClient.ListModelEvaluations(parent, filter); // Iterate over all response items, lazily performing RPCs as required foreach (ModelEvaluation 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 (ListModelEvaluationsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (ModelEvaluation 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 <ModelEvaluation> 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 (ModelEvaluation 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; }
public void ListTraces() { // Snippet: ListTraces(string,string,int?,CallSettings) // Create client TraceServiceClient traceServiceClient = TraceServiceClient.Create(); // Initialize request argument(s) string projectId = ""; // Make the request PagedEnumerable <ListTracesResponse, Trace> response = traceServiceClient.ListTraces(projectId); // Iterate over all response items, lazily performing RPCs as required foreach (Trace 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 (ListTracesResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Trace item in page) { 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 <Trace> 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 (Trace item in singlePage) { Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
/// <summary>Snippet for ListInstances</summary> public void ListInstances() { // Snippet: ListInstances(string,string,int?,CallSettings) // Create client CloudRedisClient cloudRedisClient = CloudRedisClient.Create(); // Initialize request argument(s) string formattedParent = new LocationName("[PROJECT]", "[LOCATION]").ToString(); // Make the request PagedEnumerable <ListInstancesResponse, Instance> response = cloudRedisClient.ListInstances(formattedParent); // Iterate over all response items, lazily performing RPCs as required foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Instance item in page) { 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 <Instance> 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 (Instance item in singlePage) { Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
/// <summary>Snippet for ListNotificationChannels</summary> public void ListNotificationChannels() { // Snippet: ListNotificationChannels(ProjectName,string,int?,CallSettings) // Create client NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.Create(); // Initialize request argument(s) ProjectName name = new ProjectName("[PROJECT]"); // Make the request PagedEnumerable <ListNotificationChannelsResponse, NotificationChannel> response = notificationChannelServiceClient.ListNotificationChannels(name); // Iterate over all response items, lazily performing RPCs as required foreach (NotificationChannel 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 (ListNotificationChannelsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (NotificationChannel item in page) { 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 <NotificationChannel> 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 (NotificationChannel item in singlePage) { Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
/// <summary>Snippet for ListWorkflowTemplates</summary> public void ListWorkflowTemplates() { // Snippet: ListWorkflowTemplates(RegionName,string,int?,CallSettings) // Create client WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.Create(); // Initialize request argument(s) RegionName parent = new RegionName("[PROJECT]", "[REGION]"); // Make the request PagedEnumerable <ListWorkflowTemplatesResponse, WorkflowTemplate> response = workflowTemplateServiceClient.ListWorkflowTemplates(parent); // Iterate over all response items, lazily performing RPCs as required foreach (WorkflowTemplate 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 (ListWorkflowTemplatesResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (WorkflowTemplate item in page) { 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 <WorkflowTemplate> 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 (WorkflowTemplate item in singlePage) { Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
public void ListTopicSubscriptions() { // Snippet: ListTopicSubscriptions(TopicName,string,int?,CallSettings) // Create client PublisherClient publisherClient = PublisherClient.Create(); // Initialize request argument(s) TopicName topic = new TopicName("[PROJECT]", "[TOPIC]"); // Make the request PagedEnumerable <ListTopicSubscriptionsResponse, SubscriptionName> response = publisherClient.ListTopicSubscriptions(topic); // Iterate over all response items, lazily performing RPCs as required foreach (SubscriptionName 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 (ListTopicSubscriptionsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (SubscriptionName item in page) { 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 <SubscriptionName> 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 (SubscriptionName item in singlePage) { Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
/// <summary>Snippet for ListProjectBillingInfo</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListProjectBillingInfo() { // Create client CloudBillingClient cloudBillingClient = CloudBillingClient.Create(); // Initialize request argument(s) string name = "billingAccounts/[BILLING_ACCOUNT]"; // Make the request PagedEnumerable <ListProjectBillingInfoResponse, ProjectBillingInfo> response = cloudBillingClient.ListProjectBillingInfo(name); // Iterate over all response items, lazily performing RPCs as required foreach (ProjectBillingInfo 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 (ListProjectBillingInfoResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (ProjectBillingInfo 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 <ProjectBillingInfo> 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 (ProjectBillingInfo 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; }
/// <summary>Snippet for ListApiConfigs</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListApiConfigsResourceNames() { // Create client ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.Create(); // Initialize request argument(s) ApiName parent = ApiName.FromProjectApi("[PROJECT]", "[API]"); // Make the request PagedEnumerable <ListApiConfigsResponse, ApiConfig> response = apiGatewayServiceClient.ListApiConfigs(parent); // Iterate over all response items, lazily performing RPCs as required foreach (ApiConfig 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 (ListApiConfigsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (ApiConfig 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 <ApiConfig> 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 (ApiConfig 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; }
/// <summary>Snippet for ListTableSpecs</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListTableSpecsResourceNames() { // Create client AutoMlClient autoMlClient = AutoMlClient.Create(); // Initialize request argument(s) DatasetName parent = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"); // Make the request PagedEnumerable <ListTableSpecsResponse, TableSpec> response = autoMlClient.ListTableSpecs(parent); // Iterate over all response items, lazily performing RPCs as required foreach (TableSpec 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 (ListTableSpecsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (TableSpec 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 <TableSpec> 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 (TableSpec 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; }
/// <summary>Snippet for SignatureMethod</summary> public void SignatureMethod3() { // Snippet: SignatureMethod(string, int?, CallSettings) // Create client PaginatedClient paginatedClient = PaginatedClient.Create(); // Make the request PagedEnumerable <Response, Response.Types.NestedResult> response = paginatedClient.SignatureMethod(); // Iterate over all response items, lazily performing RPCs as required foreach (Response.Types.NestedResult 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 (Response page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Response.Types.NestedResult 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 <Response.Types.NestedResult> 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 (Response.Types.NestedResult 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 ListMeasurementProtocolSecrets</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListMeasurementProtocolSecretsResourceNames() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) WebDataStreamName parent = WebDataStreamName.FromPropertyWebDataStream("[PROPERTY]", "[WEB_DATA_STREAM]"); // Make the request PagedEnumerable <ListMeasurementProtocolSecretsResponse, MeasurementProtocolSecret> response = analyticsAdminServiceClient.ListMeasurementProtocolSecrets(parent); // Iterate over all response items, lazily performing RPCs as required foreach (MeasurementProtocolSecret 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 (ListMeasurementProtocolSecretsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (MeasurementProtocolSecret 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 <MeasurementProtocolSecret> 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 (MeasurementProtocolSecret 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; }
/// <summary>Snippet for List</summary> public void List() { // Snippet: List(string, int?, CallSettings) // Create client GlobalOrganizationOperationsClient globalOrganizationOperationsClient = GlobalOrganizationOperationsClient.Create(); // Make the request PagedEnumerable <OperationList, Operation> response = globalOrganizationOperationsClient.List(); // Iterate over all response items, lazily performing RPCs as required foreach (Operation 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 (OperationList page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Operation 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 <Operation> 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 (Operation 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 ListMigrationSubtasks</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListMigrationSubtasksResourceNames() { // Create client MigrationServiceClient migrationServiceClient = MigrationServiceClient.Create(); // Initialize request argument(s) MigrationWorkflowName parent = MigrationWorkflowName.FromProjectLocationWorkflow("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); // Make the request PagedEnumerable <ListMigrationSubtasksResponse, MigrationSubtask> response = migrationServiceClient.ListMigrationSubtasks(parent); // Iterate over all response items, lazily performing RPCs as required foreach (MigrationSubtask 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 (ListMigrationSubtasksResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (MigrationSubtask 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 <MigrationSubtask> 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 (MigrationSubtask 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; }
/// <summary>Snippet for ListTransferRuns</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListTransferRuns() { // Create client DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]/transferConfigs/[TRANSFER_CONFIG]"; // Make the request PagedEnumerable <ListTransferRunsResponse, TransferRun> response = dataTransferServiceClient.ListTransferRuns(parent); // Iterate over all response items, lazily performing RPCs as required foreach (TransferRun 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 (ListTransferRunsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (TransferRun 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 <TransferRun> 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 (TransferRun 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; }
/// <summary>Snippet for ListAnalyses</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListAnalyses() { // Create client ContactCenterInsightsClient contactCenterInsightsClient = ContactCenterInsightsClient.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]/locations/[LOCATION]/conversations/[CONVERSATION]"; // Make the request PagedEnumerable <ListAnalysesResponse, Analysis> response = contactCenterInsightsClient.ListAnalyses(parent); // Iterate over all response items, lazily performing RPCs as required foreach (Analysis 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 (ListAnalysesResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Analysis 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 <Analysis> 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 (Analysis 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; }
/// <summary>Snippet for ListGoogleAdsLinks</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListGoogleAdsLinks() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) string parent = "properties/[PROPERTY]"; // Make the request PagedEnumerable <ListGoogleAdsLinksResponse, GoogleAdsLink> response = analyticsAdminServiceClient.ListGoogleAdsLinks(parent); // Iterate over all response items, lazily performing RPCs as required foreach (GoogleAdsLink 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 (ListGoogleAdsLinksResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (GoogleAdsLink 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 <GoogleAdsLink> 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 (GoogleAdsLink 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; }
/// <summary>Snippet for ListSkus</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListSkus() { // Create client CloudCatalogClient cloudCatalogClient = CloudCatalogClient.Create(); // Initialize request argument(s) string parent = "services/[SERVICE]"; // Make the request PagedEnumerable <ListSkusResponse, Sku> response = cloudCatalogClient.ListSkus(parent); // Iterate over all response items, lazily performing RPCs as required foreach (Sku 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 (ListSkusResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Sku 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 <Sku> 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 (Sku 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; }
/// <summary>Snippet for ListBatchJobResults</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListBatchJobResults() { // Create client BatchJobServiceClient batchJobServiceClient = BatchJobServiceClient.Create(); // Initialize request argument(s) string resourceName = "customers/[CUSTOMER_ID]/batchJobs/[BATCH_JOB_ID]"; // Make the request PagedEnumerable <ListBatchJobResultsResponse, BatchJobResult> response = batchJobServiceClient.ListBatchJobResults(resourceName); // Iterate over all response items, lazily performing RPCs as required foreach (BatchJobResult 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 (ListBatchJobResultsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (BatchJobResult 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 <BatchJobResult> 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 (BatchJobResult 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; }
/// <summary>Snippet for ListBuilds</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListBuildsResourceNames() { // Create client BuildServiceClient buildServiceClient = BuildServiceClient.Create(); // Initialize request argument(s) ModelName parent = ModelName.FromBuildTargetModel("[BUILD_TARGET]", "[MODEL]"); // Make the request PagedEnumerable <ListBuildsResponse, Build> response = buildServiceClient.ListBuilds(parent); // Iterate over all response items, lazily performing RPCs as required foreach (Build 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 (ListBuildsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Build 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 <Build> 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 (Build 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; }
/// <summary>Snippet for ListAssets</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListAssetsResourceNames() { // Create client AssetServiceClient assetServiceClient = AssetServiceClient.Create(); // Initialize request argument(s) IResourceName parent = new UnparsedResourceName("a/wildcard/resource"); // Make the request PagedEnumerable <ListAssetsResponse, Asset> response = assetServiceClient.ListAssets(parent); // Iterate over all response items, lazily performing RPCs as required foreach (Asset 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 (ListAssetsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Asset 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 <Asset> 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 (Asset 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; }
/// <summary>Snippet for ListAttestors</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListAttestors() { // Create client BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = BinauthzManagementServiceV1Beta1Client.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]"; // Make the request PagedEnumerable <ListAttestorsResponse, Attestor> response = binauthzManagementServiceV1Beta1Client.ListAttestors(parent); // Iterate over all response items, lazily performing RPCs as required foreach (Attestor 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 (ListAttestorsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Attestor 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 <Attestor> 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 (Attestor 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; }
/// <summary>Snippet for ListCampaignExperimentAsyncErrors</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListCampaignExperimentAsyncErrors() { // Create client CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create(); // Initialize request argument(s) string resourceName = "customers/[CUSTOMER]/campaignExperiments/[CAMPAIGN_EXPERIMENT]"; // Make the request PagedEnumerable <ListCampaignExperimentAsyncErrorsResponse, Status> response = campaignExperimentServiceClient.ListCampaignExperimentAsyncErrors(resourceName); // Iterate over all response items, lazily performing RPCs as required foreach (Status 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 (ListCampaignExperimentAsyncErrorsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Status 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 <Status> 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 (Status 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; }
/// <summary>Snippet for ListBackups</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListBackupsResourceNames() { // Create client BigtableTableAdminClient bigtableTableAdminClient = BigtableTableAdminClient.Create(); // Initialize request argument(s) ClusterName parent = ClusterName.FromProjectInstanceCluster("[PROJECT]", "[INSTANCE]", "[CLUSTER]"); // Make the request PagedEnumerable <ListBackupsResponse, Backup> response = bigtableTableAdminClient.ListBackups(parent); // Iterate over all response items, lazily performing RPCs as required foreach (Backup 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 (ListBackupsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Backup 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 <Backup> 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 (Backup 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; }