/// <summary>Snippet for GetIamPolicy</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetIamPolicyResourceNames()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
     // Make the request
     Policy response = cloudBillingClient.GetIamPolicy(resource);
 }
 /// <summary>Snippet for GetIamPolicy</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetIamPolicy()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     string resource = "a/wildcard/resource";
     // Make the request
     Policy response = cloudBillingClient.GetIamPolicy(resource);
 }
Esempio n. 3
0
 /// <summary>Snippet for GetBillingAccount</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetBillingAccountResourceNames()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     BillingAccountName name = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
     // Make the request
     BillingAccount response = cloudBillingClient.GetBillingAccount(name);
 }
 /// <summary>Snippet for GetProjectBillingInfo</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetProjectBillingInfo()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     string name = "";
     // Make the request
     ProjectBillingInfo response = cloudBillingClient.GetProjectBillingInfo(name);
 }
Esempio n. 5
0
 /// <summary>Snippet for GetBillingAccount</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetBillingAccount()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     string name = "billingAccounts/[BILLING_ACCOUNT]";
     // Make the request
     BillingAccount response = cloudBillingClient.GetBillingAccount(name);
 }
 /// <summary>Snippet for GetIamPolicyAsync</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 GetIamPolicyResourceNamesAsync()
 {
     // Create client
     CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();
     // Initialize request argument(s)
     IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
     // Make the request
     Policy response = await cloudBillingClient.GetIamPolicyAsync(resource);
 }
Esempio n. 7
0
 /// <summary>Snippet for CreateBillingAccount</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void CreateBillingAccount()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     BillingAccount billingAccount = new BillingAccount();
     // Make the request
     BillingAccount response = cloudBillingClient.CreateBillingAccount(billingAccount);
 }
Esempio n. 8
0
        /// <summary>Snippet for GetProjectBillingInfoAsync</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 GetProjectBillingInfoAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            string name = "";
            // Make the request
            ProjectBillingInfo response = await cloudBillingClient.GetProjectBillingInfoAsync(name);
        }
 /// <summary>Snippet for UpdateProjectBillingInfo</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateProjectBillingInfo()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     string             name = "";
     ProjectBillingInfo projectBillingInfo = new ProjectBillingInfo();
     // Make the request
     ProjectBillingInfo response = cloudBillingClient.UpdateProjectBillingInfo(name, projectBillingInfo);
 }
        /// <summary>Snippet for CreateBillingAccountAsync</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 CreateBillingAccountAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            BillingAccount billingAccount = new BillingAccount();
            // Make the request
            BillingAccount response = await cloudBillingClient.CreateBillingAccountAsync(billingAccount);
        }
        /// <summary>Snippet for GetBillingAccountAsync</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 GetBillingAccountAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            string name = "billingAccounts/[BILLING_ACCOUNT]";
            // Make the request
            BillingAccount response = await cloudBillingClient.GetBillingAccountAsync(name);
        }
 /// <summary>Snippet for TestIamPermissions</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void TestIamPermissions()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     string resource = "a/wildcard/resource";
     IEnumerable <string> permissions = new string[] { "", };
     // Make the request
     TestIamPermissionsResponse response = cloudBillingClient.TestIamPermissions(resource, permissions);
 }
Esempio n. 13
0
        /// <summary>Snippet for GetIamPolicyAsync</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 GetIamPolicyAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            string resource = "a/wildcard/resource";
            // Make the request
            Policy response = await cloudBillingClient.GetIamPolicyAsync(resource);
        }
        /// <summary>Snippet for GetBillingAccountAsync</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 GetBillingAccountResourceNamesAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            BillingAccountName name = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]");
            // Make the request
            BillingAccount response = await cloudBillingClient.GetBillingAccountAsync(name);
        }
Esempio n. 15
0
        /// <summary>Snippet for TestIamPermissionsAsync</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 TestIamPermissionsResourceNamesAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            IResourceName        resource    = new UnparsedResourceName("a/wildcard/resource");
            IEnumerable <string> permissions = new string[] { "", };
            // Make the request
            TestIamPermissionsResponse response = await cloudBillingClient.TestIamPermissionsAsync(resource, permissions);
        }
 /// <summary>Snippet for GetProjectBillingInfo</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetProjectBillingInfoRequestObject()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     GetProjectBillingInfoRequest request = new GetProjectBillingInfoRequest {
         Name = "",
     };
     // Make the request
     ProjectBillingInfo response = cloudBillingClient.GetProjectBillingInfo(request);
 }
Esempio n. 17
0
        /// <summary>Snippet for UpdateProjectBillingInfoAsync</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 UpdateProjectBillingInfoAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            string             name = "";
            ProjectBillingInfo projectBillingInfo = new ProjectBillingInfo();
            // Make the request
            ProjectBillingInfo response = await cloudBillingClient.UpdateProjectBillingInfoAsync(name, projectBillingInfo);
        }
        /// <summary>Snippet for GetProjectBillingInfoAsync</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 GetProjectBillingInfoRequestObjectAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            GetProjectBillingInfoRequest request = new GetProjectBillingInfoRequest {
                Name = "",
            };
            // Make the request
            ProjectBillingInfo response = await cloudBillingClient.GetProjectBillingInfoAsync(request);
        }
Esempio n. 19
0
 /// <summary>Snippet for GetBillingAccount</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetBillingAccountRequestObject()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     GetBillingAccountRequest request = new GetBillingAccountRequest
     {
         BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
     };
     // Make the request
     BillingAccount response = cloudBillingClient.GetBillingAccount(request);
 }
Esempio n. 20
0
 /// <summary>Snippet for CreateBillingAccount</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void CreateBillingAccountRequestObject()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     CreateBillingAccountRequest request = new CreateBillingAccountRequest
     {
         BillingAccount = new BillingAccount(),
     };
     // Make the request
     BillingAccount response = cloudBillingClient.CreateBillingAccount(request);
 }
 /// <summary>Snippet for GetIamPolicy</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetIamPolicyRequestObject()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     GetIamPolicyRequest request = new GetIamPolicyRequest
     {
         ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
         Options = new GetPolicyOptions(),
     };
     // Make the request
     Policy response = cloudBillingClient.GetIamPolicy(request);
 }
Esempio n. 22
0
        /// <summary>Snippet for GetBillingAccountAsync</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 GetBillingAccountRequestObjectAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            GetBillingAccountRequest request = new GetBillingAccountRequest
            {
                BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
            };
            // Make the request
            BillingAccount response = await cloudBillingClient.GetBillingAccountAsync(request);
        }
Esempio n. 23
0
        /// <summary>Snippet for CreateBillingAccountAsync</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 CreateBillingAccountRequestObjectAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            CreateBillingAccountRequest request = new CreateBillingAccountRequest
            {
                BillingAccount = new BillingAccount(),
            };
            // Make the request
            BillingAccount response = await cloudBillingClient.CreateBillingAccountAsync(request);
        }
Esempio n. 24
0
 /// <summary>Snippet for TestIamPermissions</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void TestIamPermissionsRequestObject()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     TestIamPermissionsRequest request = new TestIamPermissionsRequest
     {
         ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
         Permissions            = { "", },
     };
     // Make the request
     TestIamPermissionsResponse response = cloudBillingClient.TestIamPermissions(request);
 }
        /// <summary>Snippet for SetIamPolicyAsync</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 SetIamPolicyRequestObjectAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            SetIamPolicyRequest request = new SetIamPolicyRequest
            {
                ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
                Policy = new Policy(),
            };
            // Make the request
            Policy response = await cloudBillingClient.SetIamPolicyAsync(request);
        }
 /// <summary>Snippet for UpdateBillingAccount</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateBillingAccountRequestObject()
 {
     // Create client
     CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
     // Initialize request argument(s)
     UpdateBillingAccountRequest request = new UpdateBillingAccountRequest
     {
         BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
         Account            = new BillingAccount(),
         UpdateMask         = new FieldMask(),
     };
     // Make the request
     BillingAccount response = cloudBillingClient.UpdateBillingAccount(request);
 }
        /// <summary>Snippet for ListProjectBillingInfoAsync</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 ListProjectBillingInfoRequestObjectAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Initialize request argument(s)
            ListProjectBillingInfoRequest request = new ListProjectBillingInfoRequest
            {
                BillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
            };
            // Make the request
            PagedAsyncEnumerable <ListProjectBillingInfoResponse, ProjectBillingInfo> response = cloudBillingClient.ListProjectBillingInfoAsync(request);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((ProjectBillingInfo 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((ListProjectBillingInfoResponse page) =>
            {
                // 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 = 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 (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;
        }
Esempio n. 28
0
        /// <summary>Snippet for ListBillingAccounts</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void ListBillingAccountsRequestObject()
        {
            // Create client
            CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
            // Initialize request argument(s)
            ListBillingAccountsRequest request = new ListBillingAccountsRequest {
                Filter = "",
            };
            // Make the request
            PagedEnumerable <ListBillingAccountsResponse, BillingAccount> response = cloudBillingClient.ListBillingAccounts(request);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (BillingAccount 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 (ListBillingAccountsResponse page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (BillingAccount 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 <BillingAccount> 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 (BillingAccount 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;
        }
Esempio n. 29
0
        /// <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 ListProjectBillingInfoResourceNames()
        {
            // Create client
            CloudBillingClient cloudBillingClient = CloudBillingClient.Create();
            // Initialize request argument(s)
            BillingAccountName name = BillingAccountName.FromBillingAccount("[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;
        }
Esempio n. 30
0
        /// <summary>Snippet for ListBillingAccountsAsync</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 ListBillingAccountsAsync()
        {
            // Create client
            CloudBillingClient cloudBillingClient = await CloudBillingClient.CreateAsync();

            // Make the request
            PagedAsyncEnumerable <ListBillingAccountsResponse, BillingAccount> response = cloudBillingClient.ListBillingAccountsAsync();

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((BillingAccount 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((ListBillingAccountsResponse page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (BillingAccount 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 <BillingAccount> 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 (BillingAccount 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;
        }