/// <summary>Snippet for GetAccessApprovalSettings</summary>
 public void GetAccessApprovalSettings()
 {
     // Snippet: GetAccessApprovalSettings(string, CallSettings)
     // Create client
     AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
     // Initialize request argument(s)
     string name = "";
     // Make the request
     AccessApprovalSettings response = accessApprovalServiceClient.GetAccessApprovalSettings(name);
     // End snippet
 }
 /// <summary>Snippet for UpdateAccessApprovalSettings</summary>
 public void UpdateAccessApprovalSettings()
 {
     // Snippet: UpdateAccessApprovalSettings(AccessApprovalSettings, FieldMask, CallSettings)
     // Create client
     AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
     // Initialize request argument(s)
     AccessApprovalSettings settings = new AccessApprovalSettings();
     FieldMask updateMask            = new FieldMask();
     // Make the request
     AccessApprovalSettings response = accessApprovalServiceClient.UpdateAccessApprovalSettings(settings, updateMask);
     // End snippet
 }
 /// <summary>Snippet for GetAccessApprovalSettings</summary>
 public void GetAccessApprovalSettingsRequestObject()
 {
     // Snippet: GetAccessApprovalSettings(GetAccessApprovalSettingsMessage, CallSettings)
     // Create client
     AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
     // Initialize request argument(s)
     GetAccessApprovalSettingsMessage request = new GetAccessApprovalSettingsMessage {
         Name = "",
     };
     // Make the request
     AccessApprovalSettings response = accessApprovalServiceClient.GetAccessApprovalSettings(request);
     // End snippet
 }
 /// <summary>Snippet for DismissApprovalRequest</summary>
 public void DismissApprovalRequestRequestObject()
 {
     // Snippet: DismissApprovalRequest(DismissApprovalRequestMessage, CallSettings)
     // Create client
     AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
     // Initialize request argument(s)
     DismissApprovalRequestMessage request = new DismissApprovalRequestMessage {
         Name = "",
     };
     // Make the request
     ApprovalRequest response = accessApprovalServiceClient.DismissApprovalRequest(request);
     // End snippet
 }
        /// <summary>Snippet for DeleteAccessApprovalSettings</summary>
        public void DeleteAccessApprovalSettingsRequestObject()
        {
            // Snippet: DeleteAccessApprovalSettings(DeleteAccessApprovalSettingsMessage, CallSettings)
            // Create client
            AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
            // Initialize request argument(s)
            DeleteAccessApprovalSettingsMessage request = new DeleteAccessApprovalSettingsMessage {
                Name = "",
            };

            // Make the request
            accessApprovalServiceClient.DeleteAccessApprovalSettings(request);
            // End snippet
        }
 /// <summary>Snippet for UpdateAccessApprovalSettings</summary>
 public void UpdateAccessApprovalSettingsRequestObject()
 {
     // Snippet: UpdateAccessApprovalSettings(UpdateAccessApprovalSettingsMessage, CallSettings)
     // Create client
     AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
     // Initialize request argument(s)
     UpdateAccessApprovalSettingsMessage request = new UpdateAccessApprovalSettingsMessage
     {
         Settings   = new AccessApprovalSettings(),
         UpdateMask = new FieldMask(),
     };
     // Make the request
     AccessApprovalSettings response = accessApprovalServiceClient.UpdateAccessApprovalSettings(request);
     // End snippet
 }
 /// <summary>Snippet for ApproveApprovalRequest</summary>
 public void ApproveApprovalRequestRequestObject()
 {
     // Snippet: ApproveApprovalRequest(ApproveApprovalRequestMessage, CallSettings)
     // Create client
     AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
     // Initialize request argument(s)
     ApproveApprovalRequestMessage request = new ApproveApprovalRequestMessage
     {
         Name       = "",
         ExpireTime = new Timestamp(),
     };
     // Make the request
     ApprovalRequest response = accessApprovalServiceClient.ApproveApprovalRequest(request);
     // End snippet
 }
        /// <summary>Snippet for ListApprovalRequests</summary>
        public void ListApprovalRequestsRequestObject()
        {
            // Snippet: ListApprovalRequests(ListApprovalRequestsMessage, CallSettings)
            // Create client
            AccessApprovalServiceClient accessApprovalServiceClient = AccessApprovalServiceClient.Create();
            // Initialize request argument(s)
            ListApprovalRequestsMessage request = new ListApprovalRequestsMessage
            {
                Parent = "",
                Filter = "",
            };
            // Make the request
            PagedEnumerable <ListApprovalRequestsResponse, ApprovalRequest> response = accessApprovalServiceClient.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;
            // End snippet
        }