/// <summary>Snippet for GetApprovalRequest</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetApprovalRequest() { // Create client AccessApprovalClient accessApprovalClient = AccessApprovalClient.Create(); // Initialize request argument(s) string name = ""; // Make the request ApprovalRequest response = accessApprovalClient.GetApprovalRequest(name); }
/// <summary>Snippet for GetAccessApprovalSettingsAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task GetAccessApprovalSettingsAsync() { // Create client AccessApprovalClient accessApprovalClient = await AccessApprovalClient.CreateAsync(); // Initialize request argument(s) string name = ""; // Make the request AccessApprovalSettings response = await accessApprovalClient.GetAccessApprovalSettingsAsync(name); }
/// <summary>Snippet for UpdateAccessApprovalSettings</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void UpdateAccessApprovalSettings() { // Create client AccessApprovalClient accessApprovalClient = AccessApprovalClient.Create(); // Initialize request argument(s) AccessApprovalSettings settings = new AccessApprovalSettings(); FieldMask updateMask = new FieldMask(); // Make the request AccessApprovalSettings response = accessApprovalClient.UpdateAccessApprovalSettings(settings, updateMask); }
/// <summary>Snippet for DeleteAccessApprovalSettings</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void DeleteAccessApprovalSettings() { // Create client AccessApprovalClient accessApprovalClient = AccessApprovalClient.Create(); // Initialize request argument(s) string name = ""; // Make the request accessApprovalClient.DeleteAccessApprovalSettings(name); }
/// <summary>Snippet for GetAccessApprovalSettings</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetAccessApprovalSettingsRequestObject() { // Create client AccessApprovalClient accessApprovalClient = AccessApprovalClient.Create(); // Initialize request argument(s) GetAccessApprovalSettingsMessage request = new GetAccessApprovalSettingsMessage { Name = "", }; // Make the request AccessApprovalSettings response = accessApprovalClient.GetAccessApprovalSettings(request); }
/// <summary>Snippet for DismissApprovalRequest</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void DismissApprovalRequestRequestObject() { // Create client AccessApprovalClient accessApprovalClient = AccessApprovalClient.Create(); // Initialize request argument(s) DismissApprovalRequestMessage request = new DismissApprovalRequestMessage { Name = "", }; // Make the request ApprovalRequest response = accessApprovalClient.DismissApprovalRequest(request); }
/// <summary>Snippet for GetApprovalRequestAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task GetApprovalRequestRequestObjectAsync() { // Create client AccessApprovalClient accessApprovalClient = await AccessApprovalClient.CreateAsync(); // Initialize request argument(s) GetApprovalRequestMessage request = new GetApprovalRequestMessage { Name = "", }; // Make the request ApprovalRequest response = await accessApprovalClient.GetApprovalRequestAsync(request); }
/// <summary>Snippet for DeleteAccessApprovalSettingsAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task DeleteAccessApprovalSettingsRequestObjectAsync() { // Create client AccessApprovalClient accessApprovalClient = await AccessApprovalClient.CreateAsync(); // Initialize request argument(s) DeleteAccessApprovalSettingsMessage request = new DeleteAccessApprovalSettingsMessage { Name = "", }; // Make the request await accessApprovalClient.DeleteAccessApprovalSettingsAsync(request); }
/// <summary>Snippet for DeleteAccessApprovalSettings</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void DeleteAccessApprovalSettingsRequestObject() { // Create client AccessApprovalClient accessApprovalClient = AccessApprovalClient.Create(); // Initialize request argument(s) DeleteAccessApprovalSettingsMessage request = new DeleteAccessApprovalSettingsMessage { Name = "", }; // Make the request accessApprovalClient.DeleteAccessApprovalSettings(request); }
/// <summary>Snippet for ApproveApprovalRequest</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ApproveApprovalRequestRequestObject() { // Create client AccessApprovalClient accessApprovalClient = AccessApprovalClient.Create(); // Initialize request argument(s) ApproveApprovalRequestMessage request = new ApproveApprovalRequestMessage { Name = "", ExpireTime = new Timestamp(), }; // Make the request ApprovalRequest response = accessApprovalClient.ApproveApprovalRequest(request); }
/// <summary>Snippet for UpdateAccessApprovalSettings</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void UpdateAccessApprovalSettingsRequestObject() { // Create client AccessApprovalClient accessApprovalClient = AccessApprovalClient.Create(); // Initialize request argument(s) UpdateAccessApprovalSettingsMessage request = new UpdateAccessApprovalSettingsMessage { Settings = new AccessApprovalSettings(), UpdateMask = new FieldMask(), }; // Make the request AccessApprovalSettings response = accessApprovalClient.UpdateAccessApprovalSettings(request); }
/// <summary>Snippet for ApproveApprovalRequestAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task ApproveApprovalRequestRequestObjectAsync() { // Create client AccessApprovalClient accessApprovalClient = await AccessApprovalClient.CreateAsync(); // Initialize request argument(s) ApproveApprovalRequestMessage request = new ApproveApprovalRequestMessage { Name = "", ExpireTime = new Timestamp(), }; // Make the request ApprovalRequest response = await accessApprovalClient.ApproveApprovalRequestAsync(request); }
/// <summary>Snippet for ListApprovalRequests</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListApprovalRequestsRequestObject() { // Create client AccessApprovalClient accessApprovalClient = AccessApprovalClient.Create(); // Initialize request argument(s) ListApprovalRequestsMessage request = new ListApprovalRequestsMessage { Parent = "", Filter = "", }; // Make the request PagedEnumerable <ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalClient.ListApprovalRequests(request); // Iterate over all response items, lazily performing RPCs as required foreach (ApprovalRequest 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 (ListApprovalRequestsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (ApprovalRequest 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 <ApprovalRequest> 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 (ApprovalRequest 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 ListApprovalRequestsAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task ListApprovalRequestsAsync() { // Create client AccessApprovalClient accessApprovalClient = await AccessApprovalClient.CreateAsync(); // Initialize request argument(s) string parent = ""; // Make the request PagedAsyncEnumerable <ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalClient.ListApprovalRequestsAsync(parent); // Iterate over all response items, lazily performing RPCs as required await response.ForEachAsync((ApprovalRequest 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((ListApprovalRequestsResponse page) => { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (ApprovalRequest 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 <ApprovalRequest> 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 (ApprovalRequest 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; }