Skip to content

Commit

Permalink
feat: [cloudbilling] added Sku.geo_taxonomy (#8787)
Browse files Browse the repository at this point in the history
* feat: added Sku.geo_taxonomy
fix: more oauth scopes

PiperOrigin-RevId: 488493014

Source-Link: googleapis/googleapis@8995a88

Source-Link: googleapis/googleapis-gen@adbfce0
Copy-Tag: eyJwIjoiamF2YS1iaWxsaW5nLy5Pd2xCb3QueWFtbCIsImgiOiJhZGJmY2UwYzBlNTliMWIzOGJiOGU4MWFlOWEzZDBiNDA4ZTdmN2MwIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Nov 17, 2022
1 parent ba8a75f commit c9b8282
Show file tree
Hide file tree
Showing 21 changed files with 2,685 additions and 1,080 deletions.
32 changes: 16 additions & 16 deletions java-billing/README.md
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-billing</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-billing:2.5.0'
implementation 'com.google.cloud:google-cloud-billing:2.6.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-billing" % "2.5.0"
libraryDependencies += "com.google.cloud" % "google-cloud-billing" % "2.6.0"
```

## Authentication
Expand Down Expand Up @@ -159,16 +159,16 @@ Java is a registered trademark of Oracle and/or its affiliates.

[product-docs]: https://cloud.google.com/billing/docs
[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-billing/latest/overview
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-billing/java7.svg
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-billing/java7.html
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-billing/java8.svg
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-billing/java8.html
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-billing/java8-osx.svg
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-billing/java8-osx.html
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-billing/java8-win.svg
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-billing/java8-win.html
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-billing/java11.svg
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-billing/java11.html
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-billing.svg
[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-billing&core=gav
Expand All @@ -180,9 +180,9 @@ Java is a registered trademark of Oracle and/or its affiliates.
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
[cloud-sdk]: https://cloud.google.com/sdk/
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
[contributing]: https://github.com/googleapis/java-billing/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/java-billing/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/java-billing/blob/main/LICENSE
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudbilling.googleapis.com
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
Expand Down
Expand Up @@ -40,7 +40,8 @@

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Service Description: Retrieves GCP Console billing accounts and associates them with projects.
* Service Description: Retrieves the Google Cloud Console billing accounts and associates them with
* projects.
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
Expand Down Expand Up @@ -570,12 +571,19 @@ public final BillingAccount updateBillingAccount(UpdateBillingAccountRequest req

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a billing account. This method can only be used to create [billing
* subaccounts](https://cloud.google.com/billing/docs/concepts) by GCP resellers. When creating a
* subaccount, the current authenticated user must have the `billing.accounts.update` IAM
* permission on the master account, which is typically given to billing account
* [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). This method will
* return an error if the master account has not been provisioned as a reseller account.
* This method creates [billing
* subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts).
*
* <p>Google Cloud resellers should use the Channel Services APIs,
* [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create)
* and
* [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create).
*
* <p>When creating a subaccount, the current authenticated user must have the
* `billing.accounts.update` IAM permission on the parent account, which is typically given to
* billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
* This method will return an error if the parent account has not been provisioned as a reseller
* account.
*
* <p>Sample code:
*
Expand All @@ -593,7 +601,7 @@ public final BillingAccount updateBillingAccount(UpdateBillingAccountRequest req
*
* @param billingAccount Required. The billing account resource to create. Currently
* CreateBillingAccount only supports subaccount creation, so any created billing accounts
* must be under a provided master billing account.
* must be under a provided parent billing account.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BillingAccount createBillingAccount(BillingAccount billingAccount) {
Expand All @@ -604,12 +612,19 @@ public final BillingAccount createBillingAccount(BillingAccount billingAccount)

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a billing account. This method can only be used to create [billing
* subaccounts](https://cloud.google.com/billing/docs/concepts) by GCP resellers. When creating a
* subaccount, the current authenticated user must have the `billing.accounts.update` IAM
* permission on the master account, which is typically given to billing account
* [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). This method will
* return an error if the master account has not been provisioned as a reseller account.
* This method creates [billing
* subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts).
*
* <p>Google Cloud resellers should use the Channel Services APIs,
* [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create)
* and
* [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create).
*
* <p>When creating a subaccount, the current authenticated user must have the
* `billing.accounts.update` IAM permission on the parent account, which is typically given to
* billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
* This method will return an error if the parent account has not been provisioned as a reseller
* account.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -637,12 +652,19 @@ public final BillingAccount createBillingAccount(CreateBillingAccountRequest req

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a billing account. This method can only be used to create [billing
* subaccounts](https://cloud.google.com/billing/docs/concepts) by GCP resellers. When creating a
* subaccount, the current authenticated user must have the `billing.accounts.update` IAM
* permission on the master account, which is typically given to billing account
* [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). This method will
* return an error if the master account has not been provisioned as a reseller account.
* This method creates [billing
* subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts).
*
* <p>Google Cloud resellers should use the Channel Services APIs,
* [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create)
* and
* [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create).
*
* <p>When creating a subaccount, the current authenticated user must have the
* `billing.accounts.update` IAM permission on the parent account, which is typically given to
* billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
* This method will return an error if the parent account has not been provisioned as a reseller
* account.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -852,9 +874,10 @@ public final ListProjectBillingInfoPagedResponse listProjectBillingInfo(

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the billing information for a project. The current authenticated user must have
* [permission to view the
* project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ).
* Gets the billing information for a project. The current authenticated user must have the
* `resourcemanager.projects.get` permission for the project, which can be granted by assigning
* the [Project Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles)
* role.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -882,9 +905,10 @@ public final ProjectBillingInfo getProjectBillingInfo(String name) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the billing information for a project. The current authenticated user must have
* [permission to view the
* project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ).
* Gets the billing information for a project. The current authenticated user must have the
* `resourcemanager.projects.get` permission for the project, which can be granted by assigning
* the [Project Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles)
* role.
*
* <p>Sample code:
*
Expand All @@ -910,9 +934,10 @@ public final ProjectBillingInfo getProjectBillingInfo(GetProjectBillingInfoReque

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the billing information for a project. The current authenticated user must have
* [permission to view the
* project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ).
* Gets the billing information for a project. The current authenticated user must have the
* `resourcemanager.projects.get` permission for the project, which can be granted by assigning
* the [Project Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles)
* role.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -946,8 +971,8 @@ public final ProjectBillingInfo getProjectBillingInfo(GetProjectBillingInfoReque
* billing account, this method changes the billing account used for resource usage charges.
*
* <p>&#42;Note:&#42; Incurred charges that have not yet been reported in the transaction history
* of the GCP Console might be billed to the new billing account, even if the charge occurred
* before the new billing account was assigned to the project.
* of the Google Cloud Console might be billed to the new billing account, even if the charge
* occurred before the new billing account was assigned to the project.
*
* <p>The current authenticated user must have ownership privileges for both the
* [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ) and the [billing
Expand Down Expand Up @@ -1010,8 +1035,8 @@ public final ProjectBillingInfo updateProjectBillingInfo(
* billing account, this method changes the billing account used for resource usage charges.
*
* <p>&#42;Note:&#42; Incurred charges that have not yet been reported in the transaction history
* of the GCP Console might be billed to the new billing account, even if the charge occurred
* before the new billing account was assigned to the project.
* of the Google Cloud Console might be billed to the new billing account, even if the charge
* occurred before the new billing account was assigned to the project.
*
* <p>The current authenticated user must have ownership privileges for both the
* [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ) and the [billing
Expand Down Expand Up @@ -1068,8 +1093,8 @@ public final ProjectBillingInfo updateProjectBillingInfo(
* billing account, this method changes the billing account used for resource usage charges.
*
* <p>&#42;Note:&#42; Incurred charges that have not yet been reported in the transaction history
* of the GCP Console might be billed to the new billing account, even if the charge occurred
* before the new billing account was assigned to the project.
* of the Google Cloud Console might be billed to the new billing account, even if the charge
* occurred before the new billing account was assigned to the project.
*
* <p>The current authenticated user must have ownership privileges for both the
* [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ) and the [billing
Expand Down
Expand Up @@ -15,11 +15,14 @@
*/

/**
* The interfaces provided are listed below, along with usage samples.
* A client to Cloud Billing API
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>======================= CloudBillingClient =======================
*
* <p>Service Description: Retrieves GCP Console billing accounts and associates them with projects.
* <p>Service Description: Retrieves the Google Cloud Console billing accounts and associates them
* with projects.
*
* <p>Sample for CloudBillingClient:
*
Expand Down
Expand Up @@ -107,7 +107,11 @@
public class CloudBillingStubSettings extends StubSettings<CloudBillingStubSettings> {
/** The default scopes of the service. */
private static final ImmutableList<String> DEFAULT_SERVICE_SCOPES =
ImmutableList.<String>builder().add("https://www.googleapis.com/auth/cloud-platform").build();
ImmutableList.<String>builder()
.add("https://www.googleapis.com/auth/cloud-billing")
.add("https://www.googleapis.com/auth/cloud-billing.readonly")
.add("https://www.googleapis.com/auth/cloud-platform")
.build();

private final UnaryCallSettings<GetBillingAccountRequest, BillingAccount>
getBillingAccountSettings;
Expand Down
Expand Up @@ -97,7 +97,11 @@
public class CloudCatalogStubSettings extends StubSettings<CloudCatalogStubSettings> {
/** The default scopes of the service. */
private static final ImmutableList<String> DEFAULT_SERVICE_SCOPES =
ImmutableList.<String>builder().add("https://www.googleapis.com/auth/cloud-platform").build();
ImmutableList.<String>builder()
.add("https://www.googleapis.com/auth/cloud-billing")
.add("https://www.googleapis.com/auth/cloud-billing.readonly")
.add("https://www.googleapis.com/auth/cloud-platform")
.build();

private final PagedCallSettings<
ListServicesRequest, ListServicesResponse, ListServicesPagedResponse>
Expand Down

0 comments on commit c9b8282

Please sign in to comment.