diff --git a/java-billing/README.md b/java-billing/README.md index 37f87578d8c2..47fb8d1a6e73 100644 --- a/java-billing/README.md +++ b/java-billing/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-billing - 2.5.0 + 2.6.0 ``` 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 @@ -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 @@ -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 diff --git a/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/CloudBillingClient.java b/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/CloudBillingClient.java index eca2bf779d5d..7a049af27d51 100644 --- a/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/CloudBillingClient.java +++ b/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/CloudBillingClient.java @@ -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. * *

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: @@ -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). + * + *

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). + * + *

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. * *

Sample code: * @@ -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) { @@ -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). + * + *

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). + * + *

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. * *

Sample code: * @@ -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). + * + *

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). + * + *

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. * *

Sample code: * @@ -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. * *

Sample code: * @@ -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. * *

Sample code: * @@ -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. * *

Sample code: * @@ -946,8 +971,8 @@ public final ProjectBillingInfo getProjectBillingInfo(GetProjectBillingInfoReque * billing account, this method changes the billing account used for resource usage charges. * *

*Note:* 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. * *

The current authenticated user must have ownership privileges for both the * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ) and the [billing @@ -1010,8 +1035,8 @@ public final ProjectBillingInfo updateProjectBillingInfo( * billing account, this method changes the billing account used for resource usage charges. * *

*Note:* 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. * *

The current authenticated user must have ownership privileges for both the * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ) and the [billing @@ -1068,8 +1093,8 @@ public final ProjectBillingInfo updateProjectBillingInfo( * billing account, this method changes the billing account used for resource usage charges. * *

*Note:* 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. * *

The current authenticated user must have ownership privileges for both the * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo ) and the [billing diff --git a/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/package-info.java b/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/package-info.java index 234ddd153384..160e2fb78dfc 100644 --- a/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/package-info.java +++ b/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/package-info.java @@ -15,11 +15,14 @@ */ /** - * The interfaces provided are listed below, along with usage samples. + * A client to Cloud Billing API + * + *

The interfaces provided are listed below, along with usage samples. * *

======================= CloudBillingClient ======================= * - *

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. * *

Sample for CloudBillingClient: * diff --git a/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/stub/CloudBillingStubSettings.java b/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/stub/CloudBillingStubSettings.java index 7974d80bf5b4..3c190d3d6d90 100644 --- a/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/stub/CloudBillingStubSettings.java +++ b/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/stub/CloudBillingStubSettings.java @@ -107,7 +107,11 @@ public class CloudBillingStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.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 getBillingAccountSettings; diff --git a/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/stub/CloudCatalogStubSettings.java b/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/stub/CloudCatalogStubSettings.java index bac3c153b07c..84b16d06b09a 100644 --- a/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/stub/CloudCatalogStubSettings.java +++ b/java-billing/google-cloud-billing/src/main/java/com/google/cloud/billing/v1/stub/CloudCatalogStubSettings.java @@ -97,7 +97,11 @@ public class CloudCatalogStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.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> diff --git a/java-billing/grpc-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudBillingGrpc.java b/java-billing/grpc-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudBillingGrpc.java index fe09ea60a974..45b6f4fecd34 100644 --- a/java-billing/grpc-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudBillingGrpc.java +++ b/java-billing/grpc-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudBillingGrpc.java @@ -21,7 +21,8 @@ * * *

- * Retrieves GCP Console billing accounts and associates them with projects.
+ * Retrieves the Google Cloud Console billing accounts and associates them with
+ * projects.
  * 
*/ @javax.annotation.Generated( @@ -538,7 +539,8 @@ public CloudBillingFutureStub newStub( * * *
-   * Retrieves GCP Console billing accounts and associates them with projects.
+   * Retrieves the Google Cloud Console billing accounts and associates them with
+   * projects.
    * 
*/ public abstract static class CloudBillingImplBase implements io.grpc.BindableService { @@ -599,15 +601,18 @@ public void updateBillingAccount( * * *
-     * Creates a billing account.
-     * This method can only be used to create
-     * [billing subaccounts](https://cloud.google.com/billing/docs/concepts)
-     * by GCP resellers.
+     * This method creates [billing
+     * subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts).
+     * 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).
      * When creating a subaccount, the current authenticated user must have the
-     * `billing.accounts.update` IAM permission on the master account, which is
+     * `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 master account has not been
+     * This method will return an error if the parent account has not been
      * provisioned as a reseller account.
      * 
*/ @@ -641,9 +646,10 @@ public void listProjectBillingInfo( * *
      * 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
-     * ).
+     * 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.
      * 
*/ public void getProjectBillingInfo( @@ -666,7 +672,7 @@ public void getProjectBillingInfo( * billing account, this method changes the billing account used for resource * usage charges. * *Note:* Incurred charges that have not yet been reported in the transaction - * history of the GCP Console might be billed to the new billing + * history 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. * The current authenticated user must have ownership privileges for both the @@ -826,7 +832,8 @@ public final io.grpc.ServerServiceDefinition bindService() { * * *
-   * Retrieves GCP Console billing accounts and associates them with projects.
+   * Retrieves the Google Cloud Console billing accounts and associates them with
+   * projects.
    * 
*/ public static final class CloudBillingStub @@ -902,15 +909,18 @@ public void updateBillingAccount( * * *
-     * Creates a billing account.
-     * This method can only be used to create
-     * [billing subaccounts](https://cloud.google.com/billing/docs/concepts)
-     * by GCP resellers.
+     * This method creates [billing
+     * subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts).
+     * 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).
      * When creating a subaccount, the current authenticated user must have the
-     * `billing.accounts.update` IAM permission on the master account, which is
+     * `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 master account has not been
+     * This method will return an error if the parent account has not been
      * provisioned as a reseller account.
      * 
*/ @@ -948,9 +958,10 @@ public void listProjectBillingInfo( * *
      * 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
-     * ).
+     * 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.
      * 
*/ public void getProjectBillingInfo( @@ -975,7 +986,7 @@ public void getProjectBillingInfo( * billing account, this method changes the billing account used for resource * usage charges. * *Note:* Incurred charges that have not yet been reported in the transaction - * history of the GCP Console might be billed to the new billing + * history 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. * The current authenticated user must have ownership privileges for both the @@ -1069,7 +1080,8 @@ public void testIamPermissions( * * *
-   * Retrieves GCP Console billing accounts and associates them with projects.
+   * Retrieves the Google Cloud Console billing accounts and associates them with
+   * projects.
    * 
*/ public static final class CloudBillingBlockingStub @@ -1136,15 +1148,18 @@ public com.google.cloud.billing.v1.BillingAccount updateBillingAccount( * * *
-     * Creates a billing account.
-     * This method can only be used to create
-     * [billing subaccounts](https://cloud.google.com/billing/docs/concepts)
-     * by GCP resellers.
+     * This method creates [billing
+     * subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts).
+     * 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).
      * When creating a subaccount, the current authenticated user must have the
-     * `billing.accounts.update` IAM permission on the master account, which is
+     * `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 master account has not been
+     * This method will return an error if the parent account has not been
      * provisioned as a reseller account.
      * 
*/ @@ -1175,9 +1190,10 @@ public com.google.cloud.billing.v1.ListProjectBillingInfoResponse listProjectBil * *
      * 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
-     * ).
+     * 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.
      * 
*/ public com.google.cloud.billing.v1.ProjectBillingInfo getProjectBillingInfo( @@ -1198,7 +1214,7 @@ public com.google.cloud.billing.v1.ProjectBillingInfo getProjectBillingInfo( * billing account, this method changes the billing account used for resource * usage charges. * *Note:* Incurred charges that have not yet been reported in the transaction - * history of the GCP Console might be billed to the new billing + * history 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. * The current authenticated user must have ownership privileges for both the @@ -1276,7 +1292,8 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( * * *
-   * Retrieves GCP Console billing accounts and associates them with projects.
+   * Retrieves the Google Cloud Console billing accounts and associates them with
+   * projects.
    * 
*/ public static final class CloudBillingFutureStub @@ -1346,15 +1363,18 @@ protected CloudBillingFutureStub build( * * *
-     * Creates a billing account.
-     * This method can only be used to create
-     * [billing subaccounts](https://cloud.google.com/billing/docs/concepts)
-     * by GCP resellers.
+     * This method creates [billing
+     * subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts).
+     * 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).
      * When creating a subaccount, the current authenticated user must have the
-     * `billing.accounts.update` IAM permission on the master account, which is
+     * `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 master account has not been
+     * This method will return an error if the parent account has not been
      * provisioned as a reseller account.
      * 
*/ @@ -1387,9 +1407,10 @@ protected CloudBillingFutureStub build( * *
      * 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
-     * ).
+     * 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.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -1411,7 +1432,7 @@ protected CloudBillingFutureStub build( * billing account, this method changes the billing account used for resource * usage charges. * *Note:* Incurred charges that have not yet been reported in the transaction - * history of the GCP Console might be billed to the new billing + * history 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. * The current authenticated user must have ownership privileges for both the diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccount.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccount.java index 98d3e5b891a1..2a38f3467634 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccount.java +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccount.java @@ -22,8 +22,9 @@ * * *
- * A billing account in [GCP Console](https://console.cloud.google.com/).
- * You can assign a billing account to one or more projects.
+ * A billing account in the
+ * [Google Cloud Console](https://console.cloud.google.com/). You can assign a
+ * billing account to one or more projects.
  * 
* * Protobuf type {@code google.cloud.billing.v1.BillingAccount} @@ -76,13 +77,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The resource name of the billing account. The resource name has the form
+   * Output only. The resource name of the billing account. The resource name has the form
    * `billingAccounts/{billing_account_id}`. For example,
    * `billingAccounts/012345-567890-ABCDEF` would be the resource name for
    * billing account `012345-567890-ABCDEF`.
    * 
* - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -102,13 +105,15 @@ public java.lang.String getName() { * * *
-   * The resource name of the billing account. The resource name has the form
+   * Output only. The resource name of the billing account. The resource name has the form
    * `billingAccounts/{billing_account_id}`. For example,
    * `billingAccounts/012345-567890-ABCDEF` would be the resource name for
    * billing account `012345-567890-ABCDEF`.
    * 
* - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -152,7 +157,7 @@ public boolean getOpen() { * *
    * The display name given to the billing account, such as `My Billing
-   * Account`. This name is displayed in the GCP Console.
+   * Account`. This name is displayed in the Google Cloud Console.
    * 
* * string display_name = 3; @@ -176,7 +181,7 @@ public java.lang.String getDisplayName() { * *
    * The display name given to the billing account, such as `My Billing
-   * Account`. This name is displayed in the GCP Console.
+   * Account`. This name is displayed in the Google Cloud Console.
    * 
* * string display_name = 3; @@ -204,7 +209,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { *
    * If this account is a
    * [subaccount](https://cloud.google.com/billing/docs/concepts), then this
-   * will be the resource name of the master billing account that it is being
+   * will be the resource name of the parent billing account that it is being
    * resold through.
    * Otherwise this will be empty.
    * 
@@ -231,7 +236,7 @@ public java.lang.String getMasterBillingAccount() { *
    * If this account is a
    * [subaccount](https://cloud.google.com/billing/docs/concepts), then this
-   * will be the resource name of the master billing account that it is being
+   * will be the resource name of the parent billing account that it is being
    * resold through.
    * Otherwise this will be empty.
    * 
@@ -443,8 +448,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A billing account in [GCP Console](https://console.cloud.google.com/).
-   * You can assign a billing account to one or more projects.
+   * A billing account in the
+   * [Google Cloud Console](https://console.cloud.google.com/). You can assign a
+   * billing account to one or more projects.
    * 
* * Protobuf type {@code google.cloud.billing.v1.BillingAccount} @@ -653,13 +659,15 @@ public Builder mergeFrom( * * *
-     * The resource name of the billing account. The resource name has the form
+     * Output only. The resource name of the billing account. The resource name has the form
      * `billingAccounts/{billing_account_id}`. For example,
      * `billingAccounts/012345-567890-ABCDEF` would be the resource name for
      * billing account `012345-567890-ABCDEF`.
      * 
* - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -678,13 +686,15 @@ public java.lang.String getName() { * * *
-     * The resource name of the billing account. The resource name has the form
+     * Output only. The resource name of the billing account. The resource name has the form
      * `billingAccounts/{billing_account_id}`. For example,
      * `billingAccounts/012345-567890-ABCDEF` would be the resource name for
      * billing account `012345-567890-ABCDEF`.
      * 
* - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -703,13 +713,15 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * The resource name of the billing account. The resource name has the form
+     * Output only. The resource name of the billing account. The resource name has the form
      * `billingAccounts/{billing_account_id}`. For example,
      * `billingAccounts/012345-567890-ABCDEF` would be the resource name for
      * billing account `012345-567890-ABCDEF`.
      * 
* - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @param value The name to set. * @return This builder for chaining. @@ -727,13 +739,15 @@ public Builder setName(java.lang.String value) { * * *
-     * The resource name of the billing account. The resource name has the form
+     * Output only. The resource name of the billing account. The resource name has the form
      * `billingAccounts/{billing_account_id}`. For example,
      * `billingAccounts/012345-567890-ABCDEF` would be the resource name for
      * billing account `012345-567890-ABCDEF`.
      * 
* - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -747,13 +761,15 @@ public Builder clearName() { * * *
-     * The resource name of the billing account. The resource name has the form
+     * Output only. The resource name of the billing account. The resource name has the form
      * `billingAccounts/{billing_account_id}`. For example,
      * `billingAccounts/012345-567890-ABCDEF` would be the resource name for
      * billing account `012345-567890-ABCDEF`.
      * 
* - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for name to set. * @return This builder for chaining. @@ -833,7 +849,7 @@ public Builder clearOpen() { * *
      * The display name given to the billing account, such as `My Billing
-     * Account`. This name is displayed in the GCP Console.
+     * Account`. This name is displayed in the Google Cloud Console.
      * 
* * string display_name = 3; @@ -856,7 +872,7 @@ public java.lang.String getDisplayName() { * *
      * The display name given to the billing account, such as `My Billing
-     * Account`. This name is displayed in the GCP Console.
+     * Account`. This name is displayed in the Google Cloud Console.
      * 
* * string display_name = 3; @@ -879,7 +895,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * *
      * The display name given to the billing account, such as `My Billing
-     * Account`. This name is displayed in the GCP Console.
+     * Account`. This name is displayed in the Google Cloud Console.
      * 
* * string display_name = 3; @@ -901,7 +917,7 @@ public Builder setDisplayName(java.lang.String value) { * *
      * The display name given to the billing account, such as `My Billing
-     * Account`. This name is displayed in the GCP Console.
+     * Account`. This name is displayed in the Google Cloud Console.
      * 
* * string display_name = 3; @@ -919,7 +935,7 @@ public Builder clearDisplayName() { * *
      * The display name given to the billing account, such as `My Billing
-     * Account`. This name is displayed in the GCP Console.
+     * Account`. This name is displayed in the Google Cloud Console.
      * 
* * string display_name = 3; @@ -945,7 +961,7 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { *
      * If this account is a
      * [subaccount](https://cloud.google.com/billing/docs/concepts), then this
-     * will be the resource name of the master billing account that it is being
+     * will be the resource name of the parent billing account that it is being
      * resold through.
      * Otherwise this will be empty.
      * 
@@ -971,7 +987,7 @@ public java.lang.String getMasterBillingAccount() { *
      * If this account is a
      * [subaccount](https://cloud.google.com/billing/docs/concepts), then this
-     * will be the resource name of the master billing account that it is being
+     * will be the resource name of the parent billing account that it is being
      * resold through.
      * Otherwise this will be empty.
      * 
@@ -997,7 +1013,7 @@ public com.google.protobuf.ByteString getMasterBillingAccountBytes() { *
      * If this account is a
      * [subaccount](https://cloud.google.com/billing/docs/concepts), then this
-     * will be the resource name of the master billing account that it is being
+     * will be the resource name of the parent billing account that it is being
      * resold through.
      * Otherwise this will be empty.
      * 
@@ -1022,7 +1038,7 @@ public Builder setMasterBillingAccount(java.lang.String value) { *
      * If this account is a
      * [subaccount](https://cloud.google.com/billing/docs/concepts), then this
-     * will be the resource name of the master billing account that it is being
+     * will be the resource name of the parent billing account that it is being
      * resold through.
      * Otherwise this will be empty.
      * 
@@ -1043,7 +1059,7 @@ public Builder clearMasterBillingAccount() { *
      * If this account is a
      * [subaccount](https://cloud.google.com/billing/docs/concepts), then this
-     * will be the resource name of the master billing account that it is being
+     * will be the resource name of the parent billing account that it is being
      * resold through.
      * Otherwise this will be empty.
      * 
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccountOrBuilder.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccountOrBuilder.java index 7783928f97a4..1ee52edb35ab 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccountOrBuilder.java +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccountOrBuilder.java @@ -27,13 +27,15 @@ public interface BillingAccountOrBuilder * * *
-   * The resource name of the billing account. The resource name has the form
+   * Output only. The resource name of the billing account. The resource name has the form
    * `billingAccounts/{billing_account_id}`. For example,
    * `billingAccounts/012345-567890-ABCDEF` would be the resource name for
    * billing account `012345-567890-ABCDEF`.
    * 
* - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The name. */ @@ -42,13 +44,15 @@ public interface BillingAccountOrBuilder * * *
-   * The resource name of the billing account. The resource name has the form
+   * Output only. The resource name of the billing account. The resource name has the form
    * `billingAccounts/{billing_account_id}`. For example,
    * `billingAccounts/012345-567890-ABCDEF` would be the resource name for
    * billing account `012345-567890-ABCDEF`.
    * 
* - * string name = 1 [(.google.api.resource_reference) = { ... } + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * * * @return The bytes for name. */ @@ -74,7 +78,7 @@ public interface BillingAccountOrBuilder * *
    * The display name given to the billing account, such as `My Billing
-   * Account`. This name is displayed in the GCP Console.
+   * Account`. This name is displayed in the Google Cloud Console.
    * 
* * string display_name = 3; @@ -87,7 +91,7 @@ public interface BillingAccountOrBuilder * *
    * The display name given to the billing account, such as `My Billing
-   * Account`. This name is displayed in the GCP Console.
+   * Account`. This name is displayed in the Google Cloud Console.
    * 
* * string display_name = 3; @@ -102,7 +106,7 @@ public interface BillingAccountOrBuilder *
    * If this account is a
    * [subaccount](https://cloud.google.com/billing/docs/concepts), then this
-   * will be the resource name of the master billing account that it is being
+   * will be the resource name of the parent billing account that it is being
    * resold through.
    * Otherwise this will be empty.
    * 
@@ -118,7 +122,7 @@ public interface BillingAccountOrBuilder *
    * If this account is a
    * [subaccount](https://cloud.google.com/billing/docs/concepts), then this
-   * will be the resource name of the master billing account that it is being
+   * will be the resource name of the parent billing account that it is being
    * resold through.
    * Otherwise this will be empty.
    * 
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudBillingProto.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudBillingProto.java index c75795b99a1f..a2f49bbd8484 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudBillingProto.java +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudBillingProto.java @@ -87,90 +87,92 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "google/api/resource.proto\032\036google/iam/v1" + "/iam_policy.proto\032\032google/iam/v1/policy." + "proto\032 google/protobuf/field_mask.proto\"" - + "\230\001\n\016BillingAccount\022=\n\004name\030\001 \001(\tB/\372A,\n*c" - + "loudbilling.googleapis.com/BillingAccoun" - + "t\022\021\n\004open\030\002 \001(\010B\003\340A\003\022\024\n\014display_name\030\003 \001" - + "(\t\022\036\n\026master_billing_account\030\004 \001(\t\"m\n\022Pr" - + "ojectBillingInfo\022\014\n\004name\030\001 \001(\t\022\022\n\nprojec" - + "t_id\030\002 \001(\t\022\034\n\024billing_account_name\030\003 \001(\t" - + "\022\027\n\017billing_enabled\030\004 \001(\010\"\\\n\030GetBillingA" - + "ccountRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*clo" - + "udbilling.googleapis.com/BillingAccount\"" - + "S\n\032ListBillingAccountsRequest\022\021\n\tpage_si" - + "ze\030\001 \001(\005\022\022\n\npage_token\030\002 \001(\t\022\016\n\006filter\030\003" - + " \001(\t\"y\n\033ListBillingAccountsResponse\022A\n\020b" - + "illing_accounts\030\001 \003(\0132\'.google.cloud.bil" - + "ling.v1.BillingAccount\022\027\n\017next_page_toke" - + "n\030\002 \001(\t\"d\n\033CreateBillingAccountRequest\022E" - + "\n\017billing_account\030\001 \001(\0132\'.google.cloud.b" - + "illing.v1.BillingAccountB\003\340A\002\"\317\001\n\033Update" - + "BillingAccountRequest\022@\n\004name\030\001 \001(\tB2\340A\002" - + "\372A,\n*cloudbilling.googleapis.com/Billing" - + "Account\022=\n\007account\030\002 \001(\0132\'.google.cloud." - + "billing.v1.BillingAccountB\003\340A\002\022/\n\013update" - + "_mask\030\003 \001(\0132\032.google.protobuf.FieldMask\"" - + "\210\001\n\035ListProjectBillingInfoRequest\022@\n\004nam" - + "e\030\001 \001(\tB2\340A\002\372A,\n*cloudbilling.googleapis" - + ".com/BillingAccount\022\021\n\tpage_size\030\002 \001(\005\022\022" - + "\n\npage_token\030\003 \001(\t\"\204\001\n\036ListProjectBillin" - + "gInfoResponse\022I\n\024project_billing_info\030\001 " - + "\003(\0132+.google.cloud.billing.v1.ProjectBil" - + "lingInfo\022\027\n\017next_page_token\030\002 \001(\t\"1\n\034Get" - + "ProjectBillingInfoRequest\022\021\n\004name\030\001 \001(\tB" - + "\003\340A\002\"\177\n\037UpdateProjectBillingInfoRequest\022" - + "\021\n\004name\030\001 \001(\tB\003\340A\002\022I\n\024project_billing_in" - + "fo\030\002 \001(\0132+.google.cloud.billing.v1.Proje" - + "ctBillingInfo2\313\016\n\014CloudBilling\022\234\001\n\021GetBi" - + "llingAccount\0221.google.cloud.billing.v1.G" - + "etBillingAccountRequest\032\'.google.cloud.b" - + "illing.v1.BillingAccount\"+\202\323\344\223\002\036\022\034/v1/{n" - + "ame=billingAccounts/*}\332A\004name\022\240\001\n\023ListBi" - + "llingAccounts\0223.google.cloud.billing.v1." - + "ListBillingAccountsRequest\0324.google.clou" - + "d.billing.v1.ListBillingAccountsResponse" - + "\"\036\202\323\344\223\002\025\022\023/v1/billingAccounts\332A\000\022\263\001\n\024Upd" - + "ateBillingAccount\0224.google.cloud.billing" - + ".v1.UpdateBillingAccountRequest\032\'.google" - + ".cloud.billing.v1.BillingAccount\"<\202\323\344\223\002\'" - + "2\034/v1/{name=billingAccounts/*}:\007account\332" - + "A\014name,account\022\265\001\n\024CreateBillingAccount\022" - + "4.google.cloud.billing.v1.CreateBillingA" - + "ccountRequest\032\'.google.cloud.billing.v1." - + "BillingAccount\">\202\323\344\223\002&\"\023/v1/billingAccou" - + "nts:\017billing_account\332A\017billing_account\022\277" - + "\001\n\026ListProjectBillingInfo\0226.google.cloud" - + ".billing.v1.ListProjectBillingInfoReques" - + "t\0327.google.cloud.billing.v1.ListProjectB" - + "illingInfoResponse\"4\202\323\344\223\002\'\022%/v1/{name=bi" - + "llingAccounts/*}/projects\332A\004name\022\255\001\n\025Get" - + "ProjectBillingInfo\0225.google.cloud.billin" - + "g.v1.GetProjectBillingInfoRequest\032+.goog" - + "le.cloud.billing.v1.ProjectBillingInfo\"0" - + "\202\323\344\223\002#\022!/v1/{name=projects/*}/billingInf" - + "o\332A\004name\022\336\001\n\030UpdateProjectBillingInfo\0228." - + "google.cloud.billing.v1.UpdateProjectBil" - + "lingInfoRequest\032+.google.cloud.billing.v" - + "1.ProjectBillingInfo\"[\202\323\344\223\0029\032!/v1/{name=" - + "projects/*}/billingInfo:\024project_billing" - + "_info\332A\031name,project_billing_info\022\213\001\n\014Ge" - + "tIamPolicy\022\".google.iam.v1.GetIamPolicyR" - + "equest\032\025.google.iam.v1.Policy\"@\202\323\344\223\002/\022-/" - + "v1/{resource=billingAccounts/*}:getIamPo" - + "licy\332A\010resource\022\225\001\n\014SetIamPolicy\022\".googl" - + "e.iam.v1.SetIamPolicyRequest\032\025.google.ia" - + "m.v1.Policy\"J\202\323\344\223\0022\"-/v1/{resource=billi" - + "ngAccounts/*}:setIamPolicy:\001*\332A\017resource" - + ",policy\022\300\001\n\022TestIamPermissions\022(.google." - + "iam.v1.TestIamPermissionsRequest\032).googl" - + "e.iam.v1.TestIamPermissionsResponse\"U\202\323\344" - + "\223\0028\"3/v1/{resource=billingAccounts/*}:te" - + "stIamPermissions:\001*\332A\024resource,permissio" - + "ns\032O\312A\033cloudbilling.googleapis.com\322A.htt" - + "ps://www.googleapis.com/auth/cloud-platf" - + "ormBr\n\033com.google.cloud.billing.v1B\021Clou" - + "dBillingProtoP\001Z>google.golang.org/genpr" - + "oto/googleapis/cloud/billing/v1;billingb" - + "\006proto3" + + "\233\001\n\016BillingAccount\022@\n\004name\030\001 \001(\tB2\340A\003\372A," + + "\n*cloudbilling.googleapis.com/BillingAcc" + + "ount\022\021\n\004open\030\002 \001(\010B\003\340A\003\022\024\n\014display_name\030" + + "\003 \001(\t\022\036\n\026master_billing_account\030\004 \001(\t\"m\n" + + "\022ProjectBillingInfo\022\014\n\004name\030\001 \001(\t\022\022\n\npro" + + "ject_id\030\002 \001(\t\022\034\n\024billing_account_name\030\003 " + + "\001(\t\022\027\n\017billing_enabled\030\004 \001(\010\"\\\n\030GetBilli" + + "ngAccountRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*" + + "cloudbilling.googleapis.com/BillingAccou" + + "nt\"S\n\032ListBillingAccountsRequest\022\021\n\tpage" + + "_size\030\001 \001(\005\022\022\n\npage_token\030\002 \001(\t\022\016\n\006filte" + + "r\030\003 \001(\t\"y\n\033ListBillingAccountsResponse\022A" + + "\n\020billing_accounts\030\001 \003(\0132\'.google.cloud." + + "billing.v1.BillingAccount\022\027\n\017next_page_t" + + "oken\030\002 \001(\t\"d\n\033CreateBillingAccountReques" + + "t\022E\n\017billing_account\030\001 \001(\0132\'.google.clou" + + "d.billing.v1.BillingAccountB\003\340A\002\"\317\001\n\033Upd" + + "ateBillingAccountRequest\022@\n\004name\030\001 \001(\tB2" + + "\340A\002\372A,\n*cloudbilling.googleapis.com/Bill" + + "ingAccount\022=\n\007account\030\002 \001(\0132\'.google.clo" + + "ud.billing.v1.BillingAccountB\003\340A\002\022/\n\013upd" + + "ate_mask\030\003 \001(\0132\032.google.protobuf.FieldMa" + + "sk\"\210\001\n\035ListProjectBillingInfoRequest\022@\n\004" + + "name\030\001 \001(\tB2\340A\002\372A,\n*cloudbilling.googlea" + + "pis.com/BillingAccount\022\021\n\tpage_size\030\002 \001(" + + "\005\022\022\n\npage_token\030\003 \001(\t\"\204\001\n\036ListProjectBil" + + "lingInfoResponse\022I\n\024project_billing_info" + + "\030\001 \003(\0132+.google.cloud.billing.v1.Project" + + "BillingInfo\022\027\n\017next_page_token\030\002 \001(\t\"1\n\034" + + "GetProjectBillingInfoRequest\022\021\n\004name\030\001 \001" + + "(\tB\003\340A\002\"\177\n\037UpdateProjectBillingInfoReque" + + "st\022\021\n\004name\030\001 \001(\tB\003\340A\002\022I\n\024project_billing" + + "_info\030\002 \001(\0132+.google.cloud.billing.v1.Pr" + + "ojectBillingInfo2\262\017\n\014CloudBilling\022\234\001\n\021Ge" + + "tBillingAccount\0221.google.cloud.billing.v" + + "1.GetBillingAccountRequest\032\'.google.clou" + + "d.billing.v1.BillingAccount\"+\202\323\344\223\002\036\022\034/v1" + + "/{name=billingAccounts/*}\332A\004name\022\240\001\n\023Lis" + + "tBillingAccounts\0223.google.cloud.billing." + + "v1.ListBillingAccountsRequest\0324.google.c" + + "loud.billing.v1.ListBillingAccountsRespo" + + "nse\"\036\202\323\344\223\002\025\022\023/v1/billingAccounts\332A\000\022\263\001\n\024" + + "UpdateBillingAccount\0224.google.cloud.bill" + + "ing.v1.UpdateBillingAccountRequest\032\'.goo" + + "gle.cloud.billing.v1.BillingAccount\"<\202\323\344" + + "\223\002\'2\034/v1/{name=billingAccounts/*}:\007accou" + + "nt\332A\014name,account\022\265\001\n\024CreateBillingAccou" + + "nt\0224.google.cloud.billing.v1.CreateBilli" + + "ngAccountRequest\032\'.google.cloud.billing." + + "v1.BillingAccount\">\202\323\344\223\002&\"\023/v1/billingAc" + + "counts:\017billing_account\332A\017billing_accoun" + + "t\022\277\001\n\026ListProjectBillingInfo\0226.google.cl" + + "oud.billing.v1.ListProjectBillingInfoReq" + + "uest\0327.google.cloud.billing.v1.ListProje" + + "ctBillingInfoResponse\"4\202\323\344\223\002\'\022%/v1/{name" + + "=billingAccounts/*}/projects\332A\004name\022\255\001\n\025" + + "GetProjectBillingInfo\0225.google.cloud.bil" + + "ling.v1.GetProjectBillingInfoRequest\032+.g" + + "oogle.cloud.billing.v1.ProjectBillingInf" + + "o\"0\202\323\344\223\002#\022!/v1/{name=projects/*}/billing" + + "Info\332A\004name\022\336\001\n\030UpdateProjectBillingInfo" + + "\0228.google.cloud.billing.v1.UpdateProject" + + "BillingInfoRequest\032+.google.cloud.billin" + + "g.v1.ProjectBillingInfo\"[\202\323\344\223\0029\032!/v1/{na" + + "me=projects/*}/billingInfo:\024project_bill" + + "ing_info\332A\031name,project_billing_info\022\213\001\n" + + "\014GetIamPolicy\022\".google.iam.v1.GetIamPoli" + + "cyRequest\032\025.google.iam.v1.Policy\"@\202\323\344\223\002/" + + "\022-/v1/{resource=billingAccounts/*}:getIa" + + "mPolicy\332A\010resource\022\225\001\n\014SetIamPolicy\022\".go" + + "ogle.iam.v1.SetIamPolicyRequest\032\025.google" + + ".iam.v1.Policy\"J\202\323\344\223\0022\"-/v1/{resource=bi" + + "llingAccounts/*}:setIamPolicy:\001*\332A\017resou" + + "rce,policy\022\300\001\n\022TestIamPermissions\022(.goog" + + "le.iam.v1.TestIamPermissionsRequest\032).go" + + "ogle.iam.v1.TestIamPermissionsResponse\"U" + + "\202\323\344\223\0028\"3/v1/{resource=billingAccounts/*}" + + ":testIamPermissions:\001*\332A\024resource,permis" + + "sions\032\265\001\312A\033cloudbilling.googleapis.com\322A" + + "\223\001https://www.googleapis.com/auth/cloud-" + + "billing,https://www.googleapis.com/auth/" + + "cloud-billing.readonly,https://www.googl" + + "eapis.com/auth/cloud-platformBr\n\033com.goo" + + "gle.cloud.billing.v1B\021CloudBillingProtoP" + + "\001Z>google.golang.org/genproto/googleapis" + + "/cloud/billing/v1;billingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudCatalogProto.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudCatalogProto.java index cfc749428f52..e784597e17f2 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudCatalogProto.java +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CloudCatalogProto.java @@ -55,6 +55,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_billing_v1_AggregationInfo_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_billing_v1_AggregationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_billing_v1_GeoTaxonomy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_billing_v1_GeoTaxonomy_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_billing_v1_ListServicesRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -90,67 +94,75 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "_id\030\002 \001(\t\022\024\n\014display_name\030\003 \001(\t\022\034\n\024busin" + "ess_entity_name\030\004 \001(\t:<\352A9\n#cloudbilling" + ".googleapis.com/Service\022\022services/{servi" - + "ce}\"\246\002\n\003Sku\022\014\n\004name\030\001 \001(\t\022\016\n\006sku_id\030\002 \001(" + + "ce}\"\342\002\n\003Sku\022\014\n\004name\030\001 \001(\t\022\016\n\006sku_id\030\002 \001(" + "\t\022\023\n\013description\030\003 \001(\t\0223\n\010category\030\004 \001(\013" + "2!.google.cloud.billing.v1.Category\022\027\n\017s" + "ervice_regions\030\005 \003(\t\022:\n\014pricing_info\030\006 \003" + "(\0132$.google.cloud.billing.v1.PricingInfo" - + "\022\035\n\025service_provider_name\030\007 \001(\t:C\352A@\n\037cl" - + "oudbilling.googleapis.com/Sku\022\035services/" - + "{service}/skus/{sku}\"m\n\010Category\022\034\n\024serv" - + "ice_display_name\030\001 \001(\t\022\027\n\017resource_famil" - + "y\030\002 \001(\t\022\026\n\016resource_group\030\003 \001(\t\022\022\n\nusage" - + "_type\030\004 \001(\t\"\200\002\n\013PricingInfo\0222\n\016effective" - + "_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022" - + "\017\n\007summary\030\002 \001(\t\022F\n\022pricing_expression\030\003" - + " \001(\0132*.google.cloud.billing.v1.PricingEx" - + "pression\022B\n\020aggregation_info\030\004 \001(\0132(.goo" - + "gle.cloud.billing.v1.AggregationInfo\022 \n\030" - + "currency_conversion_rate\030\005 \001(\001\"\323\002\n\021Prici" - + "ngExpression\022\022\n\nusage_unit\030\001 \001(\t\022\036\n\026usag" - + "e_unit_description\030\004 \001(\t\022\021\n\tbase_unit\030\005 " - + "\001(\t\022\035\n\025base_unit_description\030\006 \001(\t\022#\n\033ba" - + "se_unit_conversion_factor\030\007 \001(\001\022\030\n\020displ" - + "ay_quantity\030\002 \001(\001\022I\n\014tiered_rates\030\003 \003(\0132" - + "3.google.cloud.billing.v1.PricingExpress" - + "ion.TierRate\032N\n\010TierRate\022\032\n\022start_usage_" - + "amount\030\001 \001(\001\022&\n\nunit_price\030\002 \001(\0132\022.googl" - + "e.type.Money\"\204\003\n\017AggregationInfo\022T\n\021aggr" - + "egation_level\030\001 \001(\01629.google.cloud.billi" - + "ng.v1.AggregationInfo.AggregationLevel\022Z" - + "\n\024aggregation_interval\030\002 \001(\0162<.google.cl" - + "oud.billing.v1.AggregationInfo.Aggregati" - + "onInterval\022\031\n\021aggregation_count\030\003 \001(\005\"O\n" - + "\020AggregationLevel\022!\n\035AGGREGATION_LEVEL_U" - + "NSPECIFIED\020\000\022\013\n\007ACCOUNT\020\001\022\013\n\007PROJECT\020\002\"S" - + "\n\023AggregationInterval\022$\n AGGREGATION_INT" - + "ERVAL_UNSPECIFIED\020\000\022\t\n\005DAILY\020\001\022\013\n\007MONTHL" - + "Y\020\002\"<\n\023ListServicesRequest\022\021\n\tpage_size\030" - + "\001 \001(\005\022\022\n\npage_token\030\002 \001(\t\"c\n\024ListService" - + "sResponse\0222\n\010services\030\001 \003(\0132 .google.clo" - + "ud.billing.v1.Service\022\027\n\017next_page_token" - + "\030\002 \001(\t\"\352\001\n\017ListSkusRequest\022;\n\006parent\030\001 \001" - + "(\tB+\340A\002\372A%\n#cloudbilling.googleapis.com/" - + "Service\022.\n\nstart_time\030\002 \001(\0132\032.google.pro" - + "tobuf.Timestamp\022,\n\010end_time\030\003 \001(\0132\032.goog" - + "le.protobuf.Timestamp\022\025\n\rcurrency_code\030\004" - + " \001(\t\022\021\n\tpage_size\030\005 \001(\005\022\022\n\npage_token\030\006 " - + "\001(\t\"W\n\020ListSkusResponse\022*\n\004skus\030\001 \003(\0132\034." - + "google.cloud.billing.v1.Sku\022\027\n\017next_page" - + "_token\030\002 \001(\t2\367\002\n\014CloudCatalog\022\204\001\n\014ListSe" - + "rvices\022,.google.cloud.billing.v1.ListSer" - + "vicesRequest\032-.google.cloud.billing.v1.L" - + "istServicesResponse\"\027\202\323\344\223\002\016\022\014/v1/service" - + "s\332A\000\022\216\001\n\010ListSkus\022(.google.cloud.billing" - + ".v1.ListSkusRequest\032).google.cloud.billi" - + "ng.v1.ListSkusResponse\"-\202\323\344\223\002\036\022\034/v1/{par" - + "ent=services/*}/skus\332A\006parent\032O\312A\033cloudb" - + "illing.googleapis.com\322A.https://www.goog" - + "leapis.com/auth/cloud-platformB\226\001\n\033com.g" - + "oogle.cloud.billing.v1B\021CloudCatalogProt" - + "oP\001Z>google.golang.org/genproto/googleap" - + "is/cloud/billing/v1;billing\242\002\007CLDCTLG\252\002\027" - + "Google.Cloud.Billing.V1b\006proto3" + + "\022\035\n\025service_provider_name\030\007 \001(\t\022:\n\014geo_t" + + "axonomy\030\010 \001(\0132$.google.cloud.billing.v1." + + "GeoTaxonomy:C\352A@\n\037cloudbilling.googleapi" + + "s.com/Sku\022\035services/{service}/skus/{sku}" + + "\"m\n\010Category\022\034\n\024service_display_name\030\001 \001" + + "(\t\022\027\n\017resource_family\030\002 \001(\t\022\026\n\016resource_" + + "group\030\003 \001(\t\022\022\n\nusage_type\030\004 \001(\t\"\200\002\n\013Pric" + + "ingInfo\0222\n\016effective_time\030\001 \001(\0132\032.google" + + ".protobuf.Timestamp\022\017\n\007summary\030\002 \001(\t\022F\n\022" + + "pricing_expression\030\003 \001(\0132*.google.cloud." + + "billing.v1.PricingExpression\022B\n\020aggregat" + + "ion_info\030\004 \001(\0132(.google.cloud.billing.v1" + + ".AggregationInfo\022 \n\030currency_conversion_" + + "rate\030\005 \001(\001\"\323\002\n\021PricingExpression\022\022\n\nusag" + + "e_unit\030\001 \001(\t\022\030\n\020display_quantity\030\002 \001(\001\022I" + + "\n\014tiered_rates\030\003 \003(\01323.google.cloud.bill" + + "ing.v1.PricingExpression.TierRate\022\036\n\026usa" + + "ge_unit_description\030\004 \001(\t\022\021\n\tbase_unit\030\005" + + " \001(\t\022\035\n\025base_unit_description\030\006 \001(\t\022#\n\033b" + + "ase_unit_conversion_factor\030\007 \001(\001\032N\n\010Tier" + + "Rate\022\032\n\022start_usage_amount\030\001 \001(\001\022&\n\nunit" + + "_price\030\002 \001(\0132\022.google.type.Money\"\204\003\n\017Agg" + + "regationInfo\022T\n\021aggregation_level\030\001 \001(\0162" + + "9.google.cloud.billing.v1.AggregationInf" + + "o.AggregationLevel\022Z\n\024aggregation_interv" + + "al\030\002 \001(\0162<.google.cloud.billing.v1.Aggre" + + "gationInfo.AggregationInterval\022\031\n\021aggreg" + + "ation_count\030\003 \001(\005\"O\n\020AggregationLevel\022!\n" + + "\035AGGREGATION_LEVEL_UNSPECIFIED\020\000\022\013\n\007ACCO" + + "UNT\020\001\022\013\n\007PROJECT\020\002\"S\n\023AggregationInterva" + + "l\022$\n AGGREGATION_INTERVAL_UNSPECIFIED\020\000\022" + + "\t\n\005DAILY\020\001\022\013\n\007MONTHLY\020\002\"\243\001\n\013GeoTaxonomy\022" + + "7\n\004type\030\001 \001(\0162).google.cloud.billing.v1." + + "GeoTaxonomy.Type\022\017\n\007regions\030\002 \003(\t\"J\n\004Typ" + + "e\022\024\n\020TYPE_UNSPECIFIED\020\000\022\n\n\006GLOBAL\020\001\022\014\n\010R" + + "EGIONAL\020\002\022\022\n\016MULTI_REGIONAL\020\003\"<\n\023ListSer" + + "vicesRequest\022\021\n\tpage_size\030\001 \001(\005\022\022\n\npage_" + + "token\030\002 \001(\t\"c\n\024ListServicesResponse\0222\n\010s" + + "ervices\030\001 \003(\0132 .google.cloud.billing.v1." + + "Service\022\027\n\017next_page_token\030\002 \001(\t\"\352\001\n\017Lis" + + "tSkusRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\n#cl" + + "oudbilling.googleapis.com/Service\022.\n\nsta" + + "rt_time\030\002 \001(\0132\032.google.protobuf.Timestam" + + "p\022,\n\010end_time\030\003 \001(\0132\032.google.protobuf.Ti" + + "mestamp\022\025\n\rcurrency_code\030\004 \001(\t\022\021\n\tpage_s" + + "ize\030\005 \001(\005\022\022\n\npage_token\030\006 \001(\t\"W\n\020ListSku" + + "sResponse\022*\n\004skus\030\001 \003(\0132\034.google.cloud.b" + + "illing.v1.Sku\022\027\n\017next_page_token\030\002 \001(\t2\336" + + "\003\n\014CloudCatalog\022\204\001\n\014ListServices\022,.googl" + + "e.cloud.billing.v1.ListServicesRequest\032-" + + ".google.cloud.billing.v1.ListServicesRes" + + "ponse\"\027\202\323\344\223\002\016\022\014/v1/services\332A\000\022\216\001\n\010ListS" + + "kus\022(.google.cloud.billing.v1.ListSkusRe" + + "quest\032).google.cloud.billing.v1.ListSkus" + + "Response\"-\202\323\344\223\002\036\022\034/v1/{parent=services/*" + + "}/skus\332A\006parent\032\265\001\312A\033cloudbilling.google" + + "apis.com\322A\223\001https://www.googleapis.com/a" + + "uth/cloud-billing,https://www.googleapis" + + ".com/auth/cloud-billing.readonly,https:/" + + "/www.googleapis.com/auth/cloud-platformB" + + "\226\001\n\033com.google.cloud.billing.v1B\021CloudCa" + + "talogProtoP\001Z>google.golang.org/genproto" + + "/googleapis/cloud/billing/v1;billing\242\002\007C" + + "LDCTLG\252\002\027Google.Cloud.Billing.V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -184,6 +196,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ServiceRegions", "PricingInfo", "ServiceProviderName", + "GeoTaxonomy", }); internal_static_google_cloud_billing_v1_Category_descriptor = getDescriptor().getMessageTypes().get(2); @@ -212,12 +225,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_billing_v1_PricingExpression_descriptor, new java.lang.String[] { "UsageUnit", + "DisplayQuantity", + "TieredRates", "UsageUnitDescription", "BaseUnit", "BaseUnitDescription", "BaseUnitConversionFactor", - "DisplayQuantity", - "TieredRates", }); internal_static_google_cloud_billing_v1_PricingExpression_TierRate_descriptor = internal_static_google_cloud_billing_v1_PricingExpression_descriptor @@ -237,8 +250,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "AggregationLevel", "AggregationInterval", "AggregationCount", }); - internal_static_google_cloud_billing_v1_ListServicesRequest_descriptor = + internal_static_google_cloud_billing_v1_GeoTaxonomy_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_billing_v1_GeoTaxonomy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_billing_v1_GeoTaxonomy_descriptor, + new java.lang.String[] { + "Type", "Regions", + }); + internal_static_google_cloud_billing_v1_ListServicesRequest_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_billing_v1_ListServicesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_billing_v1_ListServicesRequest_descriptor, @@ -246,7 +267,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PageSize", "PageToken", }); internal_static_google_cloud_billing_v1_ListServicesResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_billing_v1_ListServicesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_billing_v1_ListServicesResponse_descriptor, @@ -254,7 +275,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Services", "NextPageToken", }); internal_static_google_cloud_billing_v1_ListSkusRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_billing_v1_ListSkusRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_billing_v1_ListSkusRequest_descriptor, @@ -262,7 +283,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "StartTime", "EndTime", "CurrencyCode", "PageSize", "PageToken", }); internal_static_google_cloud_billing_v1_ListSkusResponse_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_billing_v1_ListSkusResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_billing_v1_ListSkusResponse_descriptor, diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequest.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequest.java index c56f22dc61d5..f6e9424dfb71 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequest.java +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequest.java @@ -73,7 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * 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
+   * any created billing accounts must be under a provided parent billing
    * account.
    * 
* @@ -93,7 +93,7 @@ public boolean hasBillingAccount() { *
    * 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
+   * any created billing accounts must be under a provided parent billing
    * account.
    * 
* @@ -115,7 +115,7 @@ public com.google.cloud.billing.v1.BillingAccount getBillingAccount() { *
    * 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
+   * any created billing accounts must be under a provided parent billing
    * account.
    * 
* @@ -483,7 +483,7 @@ public Builder mergeFrom( *
      * 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
+     * any created billing accounts must be under a provided parent billing
      * account.
      * 
* @@ -502,7 +502,7 @@ public boolean hasBillingAccount() { *
      * 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
+     * any created billing accounts must be under a provided parent billing
      * account.
      * 
* @@ -527,7 +527,7 @@ public com.google.cloud.billing.v1.BillingAccount getBillingAccount() { *
      * 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
+     * any created billing accounts must be under a provided parent billing
      * account.
      * 
* @@ -554,7 +554,7 @@ public Builder setBillingAccount(com.google.cloud.billing.v1.BillingAccount valu *
      * 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
+     * any created billing accounts must be under a provided parent billing
      * account.
      * 
* @@ -579,7 +579,7 @@ public Builder setBillingAccount( *
      * 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
+     * any created billing accounts must be under a provided parent billing
      * account.
      * 
* @@ -610,7 +610,7 @@ public Builder mergeBillingAccount(com.google.cloud.billing.v1.BillingAccount va *
      * 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
+     * any created billing accounts must be under a provided parent billing
      * account.
      * 
* @@ -635,7 +635,7 @@ public Builder clearBillingAccount() { *
      * 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
+     * any created billing accounts must be under a provided parent billing
      * account.
      * 
* @@ -654,7 +654,7 @@ public com.google.cloud.billing.v1.BillingAccount.Builder getBillingAccountBuild *
      * 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
+     * any created billing accounts must be under a provided parent billing
      * account.
      * 
* @@ -677,7 +677,7 @@ public com.google.cloud.billing.v1.BillingAccountOrBuilder getBillingAccountOrBu *
      * 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
+     * any created billing accounts must be under a provided parent billing
      * account.
      * 
* diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequestOrBuilder.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequestOrBuilder.java index 32ed78c36fab..94164251e36e 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequestOrBuilder.java +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequestOrBuilder.java @@ -29,7 +29,7 @@ public interface CreateBillingAccountRequestOrBuilder *
    * 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
+   * any created billing accounts must be under a provided parent billing
    * account.
    * 
* @@ -46,7 +46,7 @@ public interface CreateBillingAccountRequestOrBuilder *
    * 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
+   * any created billing accounts must be under a provided parent billing
    * account.
    * 
* @@ -63,7 +63,7 @@ public interface CreateBillingAccountRequestOrBuilder *
    * 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
+   * any created billing accounts must be under a provided parent billing
    * account.
    * 
* diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GeoTaxonomy.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GeoTaxonomy.java new file mode 100644 index 000000000000..6ae1ef22de70 --- /dev/null +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GeoTaxonomy.java @@ -0,0 +1,1053 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/billing/v1/cloud_catalog.proto + +package com.google.cloud.billing.v1; + +/** + * + * + *
+ * Encapsulates the geographic taxonomy data for a sku.
+ * 
+ * + * Protobuf type {@code google.cloud.billing.v1.GeoTaxonomy} + */ +public final class GeoTaxonomy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.billing.v1.GeoTaxonomy) + GeoTaxonomyOrBuilder { + private static final long serialVersionUID = 0L; + // Use GeoTaxonomy.newBuilder() to construct. + private GeoTaxonomy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GeoTaxonomy() { + type_ = 0; + regions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GeoTaxonomy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.billing.v1.CloudCatalogProto + .internal_static_google_cloud_billing_v1_GeoTaxonomy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.billing.v1.CloudCatalogProto + .internal_static_google_cloud_billing_v1_GeoTaxonomy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.billing.v1.GeoTaxonomy.class, + com.google.cloud.billing.v1.GeoTaxonomy.Builder.class); + } + + /** + * + * + *
+   * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
+   * 
+ * + * Protobuf enum {@code google.cloud.billing.v1.GeoTaxonomy.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The type is not specified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The sku is global in nature, e.g. a license sku. Global skus are
+     * available in all regions, and so have an empty region list.
+     * 
+ * + * GLOBAL = 1; + */ + GLOBAL(1), + /** + * + * + *
+     * The sku is available in a specific region, e.g. "us-west2".
+     * 
+ * + * REGIONAL = 2; + */ + REGIONAL(2), + /** + * + * + *
+     * The sku is associated with multiple regions, e.g. "us-west2" and
+     * "us-east1".
+     * 
+ * + * MULTI_REGIONAL = 3; + */ + MULTI_REGIONAL(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The type is not specified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The sku is global in nature, e.g. a license sku. Global skus are
+     * available in all regions, and so have an empty region list.
+     * 
+ * + * GLOBAL = 1; + */ + public static final int GLOBAL_VALUE = 1; + /** + * + * + *
+     * The sku is available in a specific region, e.g. "us-west2".
+     * 
+ * + * REGIONAL = 2; + */ + public static final int REGIONAL_VALUE = 2; + /** + * + * + *
+     * The sku is associated with multiple regions, e.g. "us-west2" and
+     * "us-east1".
+     * 
+ * + * MULTI_REGIONAL = 3; + */ + public static final int MULTI_REGIONAL_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return GLOBAL; + case 2: + return REGIONAL; + case 3: + return MULTI_REGIONAL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.billing.v1.GeoTaxonomy.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.billing.v1.GeoTaxonomy.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+   * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
+   * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
+   * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.billing.v1.GeoTaxonomy.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.billing.v1.GeoTaxonomy.Type result = + com.google.cloud.billing.v1.GeoTaxonomy.Type.valueOf(type_); + return result == null ? com.google.cloud.billing.v1.GeoTaxonomy.Type.UNRECOGNIZED : result; + } + + public static final int REGIONS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList regions_; + /** + * + * + *
+   * The list of regions associated with a sku. Empty for Global skus, which are
+   * associated with all Google Cloud regions.
+   * 
+ * + * repeated string regions = 2; + * + * @return A list containing the regions. + */ + public com.google.protobuf.ProtocolStringList getRegionsList() { + return regions_; + } + /** + * + * + *
+   * The list of regions associated with a sku. Empty for Global skus, which are
+   * associated with all Google Cloud regions.
+   * 
+ * + * repeated string regions = 2; + * + * @return The count of regions. + */ + public int getRegionsCount() { + return regions_.size(); + } + /** + * + * + *
+   * The list of regions associated with a sku. Empty for Global skus, which are
+   * associated with all Google Cloud regions.
+   * 
+ * + * repeated string regions = 2; + * + * @param index The index of the element to return. + * @return The regions at the given index. + */ + public java.lang.String getRegions(int index) { + return regions_.get(index); + } + /** + * + * + *
+   * The list of regions associated with a sku. Empty for Global skus, which are
+   * associated with all Google Cloud regions.
+   * 
+ * + * repeated string regions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the regions at the given index. + */ + public com.google.protobuf.ByteString getRegionsBytes(int index) { + return regions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ != com.google.cloud.billing.v1.GeoTaxonomy.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + for (int i = 0; i < regions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, regions_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.cloud.billing.v1.GeoTaxonomy.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + { + int dataSize = 0; + for (int i = 0; i < regions_.size(); i++) { + dataSize += computeStringSizeNoTag(regions_.getRaw(i)); + } + size += dataSize; + size += 1 * getRegionsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.billing.v1.GeoTaxonomy)) { + return super.equals(obj); + } + com.google.cloud.billing.v1.GeoTaxonomy other = (com.google.cloud.billing.v1.GeoTaxonomy) obj; + + if (type_ != other.type_) return false; + if (!getRegionsList().equals(other.getRegionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (getRegionsCount() > 0) { + hash = (37 * hash) + REGIONS_FIELD_NUMBER; + hash = (53 * hash) + getRegionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.billing.v1.GeoTaxonomy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Encapsulates the geographic taxonomy data for a sku.
+   * 
+ * + * Protobuf type {@code google.cloud.billing.v1.GeoTaxonomy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.billing.v1.GeoTaxonomy) + com.google.cloud.billing.v1.GeoTaxonomyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.billing.v1.CloudCatalogProto + .internal_static_google_cloud_billing_v1_GeoTaxonomy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.billing.v1.CloudCatalogProto + .internal_static_google_cloud_billing_v1_GeoTaxonomy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.billing.v1.GeoTaxonomy.class, + com.google.cloud.billing.v1.GeoTaxonomy.Builder.class); + } + + // Construct using com.google.cloud.billing.v1.GeoTaxonomy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + regions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.billing.v1.CloudCatalogProto + .internal_static_google_cloud_billing_v1_GeoTaxonomy_descriptor; + } + + @java.lang.Override + public com.google.cloud.billing.v1.GeoTaxonomy getDefaultInstanceForType() { + return com.google.cloud.billing.v1.GeoTaxonomy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.billing.v1.GeoTaxonomy build() { + com.google.cloud.billing.v1.GeoTaxonomy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.billing.v1.GeoTaxonomy buildPartial() { + com.google.cloud.billing.v1.GeoTaxonomy result = + new com.google.cloud.billing.v1.GeoTaxonomy(this); + int from_bitField0_ = bitField0_; + result.type_ = type_; + if (((bitField0_ & 0x00000001) != 0)) { + regions_ = regions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.regions_ = regions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.billing.v1.GeoTaxonomy) { + return mergeFrom((com.google.cloud.billing.v1.GeoTaxonomy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.billing.v1.GeoTaxonomy other) { + if (other == com.google.cloud.billing.v1.GeoTaxonomy.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.regions_.isEmpty()) { + if (regions_.isEmpty()) { + regions_ = other.regions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRegionsIsMutable(); + regions_.addAll(other.regions_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + type_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRegionsIsMutable(); + regions_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int type_ = 0; + /** + * + * + *
+     * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.billing.v1.GeoTaxonomy.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.billing.v1.GeoTaxonomy.Type result = + com.google.cloud.billing.v1.GeoTaxonomy.Type.valueOf(type_); + return result == null ? com.google.cloud.billing.v1.GeoTaxonomy.Type.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.billing.v1.GeoTaxonomy.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList regions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureRegionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + regions_ = new com.google.protobuf.LazyStringArrayList(regions_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The list of regions associated with a sku. Empty for Global skus, which are
+     * associated with all Google Cloud regions.
+     * 
+ * + * repeated string regions = 2; + * + * @return A list containing the regions. + */ + public com.google.protobuf.ProtocolStringList getRegionsList() { + return regions_.getUnmodifiableView(); + } + /** + * + * + *
+     * The list of regions associated with a sku. Empty for Global skus, which are
+     * associated with all Google Cloud regions.
+     * 
+ * + * repeated string regions = 2; + * + * @return The count of regions. + */ + public int getRegionsCount() { + return regions_.size(); + } + /** + * + * + *
+     * The list of regions associated with a sku. Empty for Global skus, which are
+     * associated with all Google Cloud regions.
+     * 
+ * + * repeated string regions = 2; + * + * @param index The index of the element to return. + * @return The regions at the given index. + */ + public java.lang.String getRegions(int index) { + return regions_.get(index); + } + /** + * + * + *
+     * The list of regions associated with a sku. Empty for Global skus, which are
+     * associated with all Google Cloud regions.
+     * 
+ * + * repeated string regions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the regions at the given index. + */ + public com.google.protobuf.ByteString getRegionsBytes(int index) { + return regions_.getByteString(index); + } + /** + * + * + *
+     * The list of regions associated with a sku. Empty for Global skus, which are
+     * associated with all Google Cloud regions.
+     * 
+ * + * repeated string regions = 2; + * + * @param index The index to set the value at. + * @param value The regions to set. + * @return This builder for chaining. + */ + public Builder setRegions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRegionsIsMutable(); + regions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of regions associated with a sku. Empty for Global skus, which are
+     * associated with all Google Cloud regions.
+     * 
+ * + * repeated string regions = 2; + * + * @param value The regions to add. + * @return This builder for chaining. + */ + public Builder addRegions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRegionsIsMutable(); + regions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of regions associated with a sku. Empty for Global skus, which are
+     * associated with all Google Cloud regions.
+     * 
+ * + * repeated string regions = 2; + * + * @param values The regions to add. + * @return This builder for chaining. + */ + public Builder addAllRegions(java.lang.Iterable values) { + ensureRegionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, regions_); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of regions associated with a sku. Empty for Global skus, which are
+     * associated with all Google Cloud regions.
+     * 
+ * + * repeated string regions = 2; + * + * @return This builder for chaining. + */ + public Builder clearRegions() { + regions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The list of regions associated with a sku. Empty for Global skus, which are
+     * associated with all Google Cloud regions.
+     * 
+ * + * repeated string regions = 2; + * + * @param value The bytes of the regions to add. + * @return This builder for chaining. + */ + public Builder addRegionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRegionsIsMutable(); + regions_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.billing.v1.GeoTaxonomy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.billing.v1.GeoTaxonomy) + private static final com.google.cloud.billing.v1.GeoTaxonomy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.billing.v1.GeoTaxonomy(); + } + + public static com.google.cloud.billing.v1.GeoTaxonomy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GeoTaxonomy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.billing.v1.GeoTaxonomy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GeoTaxonomyOrBuilder.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GeoTaxonomyOrBuilder.java new file mode 100644 index 000000000000..0b982f590130 --- /dev/null +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GeoTaxonomyOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/billing/v1/cloud_catalog.proto + +package com.google.cloud.billing.v1; + +public interface GeoTaxonomyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.billing.v1.GeoTaxonomy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
+   * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL.
+   * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy.Type type = 1; + * + * @return The type. + */ + com.google.cloud.billing.v1.GeoTaxonomy.Type getType(); + + /** + * + * + *
+   * The list of regions associated with a sku. Empty for Global skus, which are
+   * associated with all Google Cloud regions.
+   * 
+ * + * repeated string regions = 2; + * + * @return A list containing the regions. + */ + java.util.List getRegionsList(); + /** + * + * + *
+   * The list of regions associated with a sku. Empty for Global skus, which are
+   * associated with all Google Cloud regions.
+   * 
+ * + * repeated string regions = 2; + * + * @return The count of regions. + */ + int getRegionsCount(); + /** + * + * + *
+   * The list of regions associated with a sku. Empty for Global skus, which are
+   * associated with all Google Cloud regions.
+   * 
+ * + * repeated string regions = 2; + * + * @param index The index of the element to return. + * @return The regions at the given index. + */ + java.lang.String getRegions(int index); + /** + * + * + *
+   * The list of regions associated with a sku. Empty for Global skus, which are
+   * associated with all Google Cloud regions.
+   * 
+ * + * repeated string regions = 2; + * + * @param index The index of the value to return. + * @return The bytes of the regions at the given index. + */ + com.google.protobuf.ByteString getRegionsBytes(int index); +} diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpression.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpression.java index adc4e7c4febc..73a911391739 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpression.java +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpression.java @@ -46,10 +46,10 @@ private PricingExpression(com.google.protobuf.GeneratedMessageV3.Builder buil private PricingExpression() { usageUnit_ = ""; + tieredRates_ = java.util.Collections.emptyList(); usageUnitDescription_ = ""; baseUnit_ = ""; baseUnitDescription_ = ""; - tieredRates_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -981,6 +981,112 @@ public com.google.protobuf.ByteString getUsageUnitBytes() { } } + public static final int DISPLAY_QUANTITY_FIELD_NUMBER = 2; + private double displayQuantity_; + /** + * + * + *
+   * The recommended quantity of units for displaying pricing info. When
+   * displaying pricing info it is recommended to display:
+   * (unit_price * display_quantity) per display_quantity usage_unit.
+   * This field does not affect the pricing formula and is for display purposes
+   * only.
+   * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and
+   * the display_quantity is "1000" then the recommended way of displaying the
+   * pricing info is "0.10 USD per 1000 GB"
+   * 
+ * + * double display_quantity = 2; + * + * @return The displayQuantity. + */ + @java.lang.Override + public double getDisplayQuantity() { + return displayQuantity_; + } + + public static final int TIERED_RATES_FIELD_NUMBER = 3; + private java.util.List tieredRates_; + /** + * + * + *
+   * The list of tiered rates for this pricing. The total cost is computed by
+   * applying each of the tiered rates on usage. This repeated list is sorted
+   * by ascending order of start_usage_amount.
+   * 
+ * + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + */ + @java.lang.Override + public java.util.List + getTieredRatesList() { + return tieredRates_; + } + /** + * + * + *
+   * The list of tiered rates for this pricing. The total cost is computed by
+   * applying each of the tiered rates on usage. This repeated list is sorted
+   * by ascending order of start_usage_amount.
+   * 
+ * + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + */ + @java.lang.Override + public java.util.List + getTieredRatesOrBuilderList() { + return tieredRates_; + } + /** + * + * + *
+   * The list of tiered rates for this pricing. The total cost is computed by
+   * applying each of the tiered rates on usage. This repeated list is sorted
+   * by ascending order of start_usage_amount.
+   * 
+ * + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + */ + @java.lang.Override + public int getTieredRatesCount() { + return tieredRates_.size(); + } + /** + * + * + *
+   * The list of tiered rates for this pricing. The total cost is computed by
+   * applying each of the tiered rates on usage. This repeated list is sorted
+   * by ascending order of start_usage_amount.
+   * 
+ * + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + */ + @java.lang.Override + public com.google.cloud.billing.v1.PricingExpression.TierRate getTieredRates(int index) { + return tieredRates_.get(index); + } + /** + * + * + *
+   * The list of tiered rates for this pricing. The total cost is computed by
+   * applying each of the tiered rates on usage. This repeated list is sorted
+   * by ascending order of start_usage_amount.
+   * 
+ * + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + */ + @java.lang.Override + public com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder getTieredRatesOrBuilder( + int index) { + return tieredRates_.get(index); + } + public static final int USAGE_UNIT_DESCRIPTION_FIELD_NUMBER = 4; private volatile java.lang.Object usageUnitDescription_; /** @@ -1156,112 +1262,6 @@ public double getBaseUnitConversionFactor() { return baseUnitConversionFactor_; } - public static final int DISPLAY_QUANTITY_FIELD_NUMBER = 2; - private double displayQuantity_; - /** - * - * - *
-   * The recommended quantity of units for displaying pricing info. When
-   * displaying pricing info it is recommended to display:
-   * (unit_price * display_quantity) per display_quantity usage_unit.
-   * This field does not affect the pricing formula and is for display purposes
-   * only.
-   * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and
-   * the display_quantity is "1000" then the recommended way of displaying the
-   * pricing info is "0.10 USD per 1000 GB"
-   * 
- * - * double display_quantity = 2; - * - * @return The displayQuantity. - */ - @java.lang.Override - public double getDisplayQuantity() { - return displayQuantity_; - } - - public static final int TIERED_RATES_FIELD_NUMBER = 3; - private java.util.List tieredRates_; - /** - * - * - *
-   * The list of tiered rates for this pricing. The total cost is computed by
-   * applying each of the tiered rates on usage. This repeated list is sorted
-   * by ascending order of start_usage_amount.
-   * 
- * - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - */ - @java.lang.Override - public java.util.List - getTieredRatesList() { - return tieredRates_; - } - /** - * - * - *
-   * The list of tiered rates for this pricing. The total cost is computed by
-   * applying each of the tiered rates on usage. This repeated list is sorted
-   * by ascending order of start_usage_amount.
-   * 
- * - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - */ - @java.lang.Override - public java.util.List - getTieredRatesOrBuilderList() { - return tieredRates_; - } - /** - * - * - *
-   * The list of tiered rates for this pricing. The total cost is computed by
-   * applying each of the tiered rates on usage. This repeated list is sorted
-   * by ascending order of start_usage_amount.
-   * 
- * - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - */ - @java.lang.Override - public int getTieredRatesCount() { - return tieredRates_.size(); - } - /** - * - * - *
-   * The list of tiered rates for this pricing. The total cost is computed by
-   * applying each of the tiered rates on usage. This repeated list is sorted
-   * by ascending order of start_usage_amount.
-   * 
- * - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - */ - @java.lang.Override - public com.google.cloud.billing.v1.PricingExpression.TierRate getTieredRates(int index) { - return tieredRates_.get(index); - } - /** - * - * - *
-   * The list of tiered rates for this pricing. The total cost is computed by
-   * applying each of the tiered rates on usage. This repeated list is sorted
-   * by ascending order of start_usage_amount.
-   * 
- * - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - */ - @java.lang.Override - public com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder getTieredRatesOrBuilder( - int index) { - return tieredRates_.get(index); - } - private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1344,14 +1344,14 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.billing.v1.PricingExpression) obj; if (!getUsageUnit().equals(other.getUsageUnit())) return false; + if (java.lang.Double.doubleToLongBits(getDisplayQuantity()) + != java.lang.Double.doubleToLongBits(other.getDisplayQuantity())) return false; + if (!getTieredRatesList().equals(other.getTieredRatesList())) return false; if (!getUsageUnitDescription().equals(other.getUsageUnitDescription())) return false; if (!getBaseUnit().equals(other.getBaseUnit())) return false; if (!getBaseUnitDescription().equals(other.getBaseUnitDescription())) return false; if (java.lang.Double.doubleToLongBits(getBaseUnitConversionFactor()) != java.lang.Double.doubleToLongBits(other.getBaseUnitConversionFactor())) return false; - if (java.lang.Double.doubleToLongBits(getDisplayQuantity()) - != java.lang.Double.doubleToLongBits(other.getDisplayQuantity())) return false; - if (!getTieredRatesList().equals(other.getTieredRatesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1365,6 +1365,15 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + USAGE_UNIT_FIELD_NUMBER; hash = (53 * hash) + getUsageUnit().hashCode(); + hash = (37 * hash) + DISPLAY_QUANTITY_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDisplayQuantity())); + if (getTieredRatesCount() > 0) { + hash = (37 * hash) + TIERED_RATES_FIELD_NUMBER; + hash = (53 * hash) + getTieredRatesList().hashCode(); + } hash = (37 * hash) + USAGE_UNIT_DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getUsageUnitDescription().hashCode(); hash = (37 * hash) + BASE_UNIT_FIELD_NUMBER; @@ -1376,15 +1385,6 @@ public int hashCode() { (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getBaseUnitConversionFactor())); - hash = (37 * hash) + DISPLAY_QUANTITY_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getDisplayQuantity())); - if (getTieredRatesCount() > 0) { - hash = (37 * hash) + TIERED_RATES_FIELD_NUMBER; - hash = (53 * hash) + getTieredRatesList().hashCode(); - } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1532,14 +1532,6 @@ public Builder clear() { super.clear(); usageUnit_ = ""; - usageUnitDescription_ = ""; - - baseUnit_ = ""; - - baseUnitDescription_ = ""; - - baseUnitConversionFactor_ = 0D; - displayQuantity_ = 0D; if (tieredRatesBuilder_ == null) { @@ -1549,6 +1541,14 @@ public Builder clear() { tieredRatesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); + usageUnitDescription_ = ""; + + baseUnit_ = ""; + + baseUnitDescription_ = ""; + + baseUnitConversionFactor_ = 0D; + return this; } @@ -1578,10 +1578,6 @@ public com.google.cloud.billing.v1.PricingExpression buildPartial() { new com.google.cloud.billing.v1.PricingExpression(this); int from_bitField0_ = bitField0_; result.usageUnit_ = usageUnit_; - result.usageUnitDescription_ = usageUnitDescription_; - result.baseUnit_ = baseUnit_; - result.baseUnitDescription_ = baseUnitDescription_; - result.baseUnitConversionFactor_ = baseUnitConversionFactor_; result.displayQuantity_ = displayQuantity_; if (tieredRatesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -1592,6 +1588,10 @@ public com.google.cloud.billing.v1.PricingExpression buildPartial() { } else { result.tieredRates_ = tieredRatesBuilder_.build(); } + result.usageUnitDescription_ = usageUnitDescription_; + result.baseUnit_ = baseUnit_; + result.baseUnitDescription_ = baseUnitDescription_; + result.baseUnitConversionFactor_ = baseUnitConversionFactor_; onBuilt(); return result; } @@ -1645,21 +1645,6 @@ public Builder mergeFrom(com.google.cloud.billing.v1.PricingExpression other) { usageUnit_ = other.usageUnit_; onChanged(); } - if (!other.getUsageUnitDescription().isEmpty()) { - usageUnitDescription_ = other.usageUnitDescription_; - onChanged(); - } - if (!other.getBaseUnit().isEmpty()) { - baseUnit_ = other.baseUnit_; - onChanged(); - } - if (!other.getBaseUnitDescription().isEmpty()) { - baseUnitDescription_ = other.baseUnitDescription_; - onChanged(); - } - if (other.getBaseUnitConversionFactor() != 0D) { - setBaseUnitConversionFactor(other.getBaseUnitConversionFactor()); - } if (other.getDisplayQuantity() != 0D) { setDisplayQuantity(other.getDisplayQuantity()); } @@ -1690,6 +1675,21 @@ public Builder mergeFrom(com.google.cloud.billing.v1.PricingExpression other) { } } } + if (!other.getUsageUnitDescription().isEmpty()) { + usageUnitDescription_ = other.usageUnitDescription_; + onChanged(); + } + if (!other.getBaseUnit().isEmpty()) { + baseUnit_ = other.baseUnit_; + onChanged(); + } + if (!other.getBaseUnitDescription().isEmpty()) { + baseUnitDescription_ = other.baseUnitDescription_; + onChanged(); + } + if (other.getBaseUnitConversionFactor() != 0D) { + setBaseUnitConversionFactor(other.getBaseUnitConversionFactor()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1896,870 +1896,870 @@ public Builder setUsageUnitBytes(com.google.protobuf.ByteString value) { return this; } - private java.lang.Object usageUnitDescription_ = ""; + private double displayQuantity_; /** * * *
-     * The unit of usage in human readable form.
-     * Example: "gibi byte".
+     * The recommended quantity of units for displaying pricing info. When
+     * displaying pricing info it is recommended to display:
+     * (unit_price * display_quantity) per display_quantity usage_unit.
+     * This field does not affect the pricing formula and is for display purposes
+     * only.
+     * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and
+     * the display_quantity is "1000" then the recommended way of displaying the
+     * pricing info is "0.10 USD per 1000 GB"
      * 
* - * string usage_unit_description = 4; + * double display_quantity = 2; * - * @return The usageUnitDescription. + * @return The displayQuantity. */ - public java.lang.String getUsageUnitDescription() { - java.lang.Object ref = usageUnitDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - usageUnitDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public double getDisplayQuantity() { + return displayQuantity_; } /** * * *
-     * The unit of usage in human readable form.
-     * Example: "gibi byte".
+     * The recommended quantity of units for displaying pricing info. When
+     * displaying pricing info it is recommended to display:
+     * (unit_price * display_quantity) per display_quantity usage_unit.
+     * This field does not affect the pricing formula and is for display purposes
+     * only.
+     * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and
+     * the display_quantity is "1000" then the recommended way of displaying the
+     * pricing info is "0.10 USD per 1000 GB"
      * 
* - * string usage_unit_description = 4; + * double display_quantity = 2; * - * @return The bytes for usageUnitDescription. + * @param value The displayQuantity to set. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getUsageUnitDescriptionBytes() { - java.lang.Object ref = usageUnitDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - usageUnitDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder setDisplayQuantity(double value) { + + displayQuantity_ = value; + onChanged(); + return this; } /** * * *
-     * The unit of usage in human readable form.
-     * Example: "gibi byte".
+     * The recommended quantity of units for displaying pricing info. When
+     * displaying pricing info it is recommended to display:
+     * (unit_price * display_quantity) per display_quantity usage_unit.
+     * This field does not affect the pricing formula and is for display purposes
+     * only.
+     * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and
+     * the display_quantity is "1000" then the recommended way of displaying the
+     * pricing info is "0.10 USD per 1000 GB"
      * 
* - * string usage_unit_description = 4; + * double display_quantity = 2; * - * @param value The usageUnitDescription to set. * @return This builder for chaining. */ - public Builder setUsageUnitDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder clearDisplayQuantity() { - usageUnitDescription_ = value; + displayQuantity_ = 0D; onChanged(); return this; } + + private java.util.List tieredRates_ = + java.util.Collections.emptyList(); + + private void ensureTieredRatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tieredRates_ = + new java.util.ArrayList( + tieredRates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.billing.v1.PricingExpression.TierRate, + com.google.cloud.billing.v1.PricingExpression.TierRate.Builder, + com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder> + tieredRatesBuilder_; + /** * * *
-     * The unit of usage in human readable form.
-     * Example: "gibi byte".
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * string usage_unit_description = 4; - * - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder clearUsageUnitDescription() { - - usageUnitDescription_ = getDefaultInstance().getUsageUnitDescription(); - onChanged(); - return this; + public java.util.List + getTieredRatesList() { + if (tieredRatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(tieredRates_); + } else { + return tieredRatesBuilder_.getMessageList(); + } } /** * * *
-     * The unit of usage in human readable form.
-     * Example: "gibi byte".
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * string usage_unit_description = 4; - * - * @param value The bytes for usageUnitDescription to set. - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder setUsageUnitDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public int getTieredRatesCount() { + if (tieredRatesBuilder_ == null) { + return tieredRates_.size(); + } else { + return tieredRatesBuilder_.getCount(); } - checkByteStringIsUtf8(value); - - usageUnitDescription_ = value; - onChanged(); - return this; } - - private java.lang.Object baseUnit_ = ""; /** * * *
-     * The base unit for the SKU which is the unit used in usage exports.
-     * Example: "By"
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * string base_unit = 5; - * - * @return The baseUnit. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public java.lang.String getBaseUnit() { - java.lang.Object ref = baseUnit_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - baseUnit_ = s; - return s; + public com.google.cloud.billing.v1.PricingExpression.TierRate getTieredRates(int index) { + if (tieredRatesBuilder_ == null) { + return tieredRates_.get(index); } else { - return (java.lang.String) ref; + return tieredRatesBuilder_.getMessage(index); } } /** * * *
-     * The base unit for the SKU which is the unit used in usage exports.
-     * Example: "By"
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * string base_unit = 5; - * - * @return The bytes for baseUnit. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public com.google.protobuf.ByteString getBaseUnitBytes() { - java.lang.Object ref = baseUnit_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - baseUnit_ = b; - return b; + public Builder setTieredRates( + int index, com.google.cloud.billing.v1.PricingExpression.TierRate value) { + if (tieredRatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTieredRatesIsMutable(); + tieredRates_.set(index, value); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + tieredRatesBuilder_.setMessage(index, value); } + return this; } /** * * *
-     * The base unit for the SKU which is the unit used in usage exports.
-     * Example: "By"
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * string base_unit = 5; - * - * @param value The baseUnit to set. - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder setBaseUnit(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setTieredRates( + int index, com.google.cloud.billing.v1.PricingExpression.TierRate.Builder builderForValue) { + if (tieredRatesBuilder_ == null) { + ensureTieredRatesIsMutable(); + tieredRates_.set(index, builderForValue.build()); + onChanged(); + } else { + tieredRatesBuilder_.setMessage(index, builderForValue.build()); } - - baseUnit_ = value; - onChanged(); return this; } /** * * *
-     * The base unit for the SKU which is the unit used in usage exports.
-     * Example: "By"
-     * 
- * - * string base_unit = 5; + * The list of tiered rates for this pricing. The total cost is computed by + * applying each of the tiered rates on usage. This repeated list is sorted + * by ascending order of start_usage_amount. + * * - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder clearBaseUnit() { - - baseUnit_ = getDefaultInstance().getBaseUnit(); - onChanged(); + public Builder addTieredRates(com.google.cloud.billing.v1.PricingExpression.TierRate value) { + if (tieredRatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTieredRatesIsMutable(); + tieredRates_.add(value); + onChanged(); + } else { + tieredRatesBuilder_.addMessage(value); + } return this; } /** * * *
-     * The base unit for the SKU which is the unit used in usage exports.
-     * Example: "By"
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * string base_unit = 5; - * - * @param value The bytes for baseUnit to set. - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder setBaseUnitBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder addTieredRates( + int index, com.google.cloud.billing.v1.PricingExpression.TierRate value) { + if (tieredRatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTieredRatesIsMutable(); + tieredRates_.add(index, value); + onChanged(); + } else { + tieredRatesBuilder_.addMessage(index, value); } - checkByteStringIsUtf8(value); - - baseUnit_ = value; - onChanged(); return this; } - - private java.lang.Object baseUnitDescription_ = ""; /** * * *
-     * The base unit in human readable form.
-     * Example: "byte".
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * string base_unit_description = 6; - * - * @return The baseUnitDescription. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public java.lang.String getBaseUnitDescription() { - java.lang.Object ref = baseUnitDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - baseUnitDescription_ = s; - return s; + public Builder addTieredRates( + com.google.cloud.billing.v1.PricingExpression.TierRate.Builder builderForValue) { + if (tieredRatesBuilder_ == null) { + ensureTieredRatesIsMutable(); + tieredRates_.add(builderForValue.build()); + onChanged(); } else { - return (java.lang.String) ref; + tieredRatesBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
-     * The base unit in human readable form.
-     * Example: "byte".
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * string base_unit_description = 6; - * - * @return The bytes for baseUnitDescription. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public com.google.protobuf.ByteString getBaseUnitDescriptionBytes() { - java.lang.Object ref = baseUnitDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - baseUnitDescription_ = b; - return b; + public Builder addTieredRates( + int index, com.google.cloud.billing.v1.PricingExpression.TierRate.Builder builderForValue) { + if (tieredRatesBuilder_ == null) { + ensureTieredRatesIsMutable(); + tieredRates_.add(index, builderForValue.build()); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + tieredRatesBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** * * *
-     * The base unit in human readable form.
-     * Example: "byte".
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * string base_unit_description = 6; - * - * @param value The baseUnitDescription to set. - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder setBaseUnitDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder addAllTieredRates( + java.lang.Iterable + values) { + if (tieredRatesBuilder_ == null) { + ensureTieredRatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tieredRates_); + onChanged(); + } else { + tieredRatesBuilder_.addAllMessages(values); } - - baseUnitDescription_ = value; - onChanged(); return this; } /** * * *
-     * The base unit in human readable form.
-     * Example: "byte".
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * string base_unit_description = 6; - * - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder clearBaseUnitDescription() { - - baseUnitDescription_ = getDefaultInstance().getBaseUnitDescription(); - onChanged(); + public Builder clearTieredRates() { + if (tieredRatesBuilder_ == null) { + tieredRates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tieredRatesBuilder_.clear(); + } return this; } /** * * *
-     * The base unit in human readable form.
-     * Example: "byte".
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * string base_unit_description = 6; - * - * @param value The bytes for baseUnitDescription to set. - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder setBaseUnitDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder removeTieredRates(int index) { + if (tieredRatesBuilder_ == null) { + ensureTieredRatesIsMutable(); + tieredRates_.remove(index); + onChanged(); + } else { + tieredRatesBuilder_.remove(index); } - checkByteStringIsUtf8(value); - - baseUnitDescription_ = value; - onChanged(); return this; } - - private double baseUnitConversionFactor_; /** * * *
-     * Conversion factor for converting from price per usage_unit to price per
-     * base_unit, and start_usage_amount to start_usage_amount in base_unit.
-     * unit_price / base_unit_conversion_factor = price per base_unit.
-     * start_usage_amount * base_unit_conversion_factor = start_usage_amount in
-     * base_unit.
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * double base_unit_conversion_factor = 7; - * - * @return The baseUnitConversionFactor. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - @java.lang.Override - public double getBaseUnitConversionFactor() { - return baseUnitConversionFactor_; + public com.google.cloud.billing.v1.PricingExpression.TierRate.Builder getTieredRatesBuilder( + int index) { + return getTieredRatesFieldBuilder().getBuilder(index); } /** * * *
-     * Conversion factor for converting from price per usage_unit to price per
-     * base_unit, and start_usage_amount to start_usage_amount in base_unit.
-     * unit_price / base_unit_conversion_factor = price per base_unit.
-     * start_usage_amount * base_unit_conversion_factor = start_usage_amount in
-     * base_unit.
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * double base_unit_conversion_factor = 7; - * - * @param value The baseUnitConversionFactor to set. - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder setBaseUnitConversionFactor(double value) { - - baseUnitConversionFactor_ = value; - onChanged(); - return this; + public com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder getTieredRatesOrBuilder( + int index) { + if (tieredRatesBuilder_ == null) { + return tieredRates_.get(index); + } else { + return tieredRatesBuilder_.getMessageOrBuilder(index); + } } /** * * *
-     * Conversion factor for converting from price per usage_unit to price per
-     * base_unit, and start_usage_amount to start_usage_amount in base_unit.
-     * unit_price / base_unit_conversion_factor = price per base_unit.
-     * start_usage_amount * base_unit_conversion_factor = start_usage_amount in
-     * base_unit.
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * double base_unit_conversion_factor = 7; - * - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder clearBaseUnitConversionFactor() { - - baseUnitConversionFactor_ = 0D; - onChanged(); - return this; + public java.util.List + getTieredRatesOrBuilderList() { + if (tieredRatesBuilder_ != null) { + return tieredRatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tieredRates_); + } } - - private double displayQuantity_; /** * * *
-     * The recommended quantity of units for displaying pricing info. When
-     * displaying pricing info it is recommended to display:
-     * (unit_price * display_quantity) per display_quantity usage_unit.
-     * This field does not affect the pricing formula and is for display purposes
-     * only.
-     * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and
-     * the display_quantity is "1000" then the recommended way of displaying the
-     * pricing info is "0.10 USD per 1000 GB"
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * double display_quantity = 2; - * - * @return The displayQuantity. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - @java.lang.Override - public double getDisplayQuantity() { - return displayQuantity_; + public com.google.cloud.billing.v1.PricingExpression.TierRate.Builder addTieredRatesBuilder() { + return getTieredRatesFieldBuilder() + .addBuilder(com.google.cloud.billing.v1.PricingExpression.TierRate.getDefaultInstance()); } /** * * *
-     * The recommended quantity of units for displaying pricing info. When
-     * displaying pricing info it is recommended to display:
-     * (unit_price * display_quantity) per display_quantity usage_unit.
-     * This field does not affect the pricing formula and is for display purposes
-     * only.
-     * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and
-     * the display_quantity is "1000" then the recommended way of displaying the
-     * pricing info is "0.10 USD per 1000 GB"
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * double display_quantity = 2; - * - * @param value The displayQuantity to set. - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder setDisplayQuantity(double value) { - - displayQuantity_ = value; - onChanged(); - return this; + public com.google.cloud.billing.v1.PricingExpression.TierRate.Builder addTieredRatesBuilder( + int index) { + return getTieredRatesFieldBuilder() + .addBuilder( + index, com.google.cloud.billing.v1.PricingExpression.TierRate.getDefaultInstance()); } /** * * *
-     * The recommended quantity of units for displaying pricing info. When
-     * displaying pricing info it is recommended to display:
-     * (unit_price * display_quantity) per display_quantity usage_unit.
-     * This field does not affect the pricing formula and is for display purposes
-     * only.
-     * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and
-     * the display_quantity is "1000" then the recommended way of displaying the
-     * pricing info is "0.10 USD per 1000 GB"
+     * The list of tiered rates for this pricing. The total cost is computed by
+     * applying each of the tiered rates on usage. This repeated list is sorted
+     * by ascending order of start_usage_amount.
      * 
* - * double display_quantity = 2; - * - * @return This builder for chaining. + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; */ - public Builder clearDisplayQuantity() { - - displayQuantity_ = 0D; - onChanged(); - return this; - } - - private java.util.List tieredRates_ = - java.util.Collections.emptyList(); - - private void ensureTieredRatesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - tieredRates_ = - new java.util.ArrayList( - tieredRates_); - bitField0_ |= 0x00000001; - } + public java.util.List + getTieredRatesBuilderList() { + return getTieredRatesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.billing.v1.PricingExpression.TierRate, com.google.cloud.billing.v1.PricingExpression.TierRate.Builder, com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder> - tieredRatesBuilder_; + getTieredRatesFieldBuilder() { + if (tieredRatesBuilder_ == null) { + tieredRatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.billing.v1.PricingExpression.TierRate, + com.google.cloud.billing.v1.PricingExpression.TierRate.Builder, + com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder>( + tieredRates_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tieredRates_ = null; + } + return tieredRatesBuilder_; + } + private java.lang.Object usageUnitDescription_ = ""; /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The unit of usage in human readable form.
+     * Example: "gibi byte".
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string usage_unit_description = 4; + * + * @return The usageUnitDescription. */ - public java.util.List - getTieredRatesList() { - if (tieredRatesBuilder_ == null) { - return java.util.Collections.unmodifiableList(tieredRates_); + public java.lang.String getUsageUnitDescription() { + java.lang.Object ref = usageUnitDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + usageUnitDescription_ = s; + return s; } else { - return tieredRatesBuilder_.getMessageList(); + return (java.lang.String) ref; } } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The unit of usage in human readable form.
+     * Example: "gibi byte".
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string usage_unit_description = 4; + * + * @return The bytes for usageUnitDescription. */ - public int getTieredRatesCount() { - if (tieredRatesBuilder_ == null) { - return tieredRates_.size(); + public com.google.protobuf.ByteString getUsageUnitDescriptionBytes() { + java.lang.Object ref = usageUnitDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + usageUnitDescription_ = b; + return b; } else { - return tieredRatesBuilder_.getCount(); + return (com.google.protobuf.ByteString) ref; } } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The unit of usage in human readable form.
+     * Example: "gibi byte".
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string usage_unit_description = 4; + * + * @param value The usageUnitDescription to set. + * @return This builder for chaining. */ - public com.google.cloud.billing.v1.PricingExpression.TierRate getTieredRates(int index) { - if (tieredRatesBuilder_ == null) { - return tieredRates_.get(index); - } else { - return tieredRatesBuilder_.getMessage(index); + public Builder setUsageUnitDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + + usageUnitDescription_ = value; + onChanged(); + return this; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The unit of usage in human readable form.
+     * Example: "gibi byte".
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string usage_unit_description = 4; + * + * @return This builder for chaining. */ - public Builder setTieredRates( - int index, com.google.cloud.billing.v1.PricingExpression.TierRate value) { - if (tieredRatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTieredRatesIsMutable(); - tieredRates_.set(index, value); - onChanged(); - } else { - tieredRatesBuilder_.setMessage(index, value); - } + public Builder clearUsageUnitDescription() { + + usageUnitDescription_ = getDefaultInstance().getUsageUnitDescription(); + onChanged(); return this; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The unit of usage in human readable form.
+     * Example: "gibi byte".
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string usage_unit_description = 4; + * + * @param value The bytes for usageUnitDescription to set. + * @return This builder for chaining. */ - public Builder setTieredRates( - int index, com.google.cloud.billing.v1.PricingExpression.TierRate.Builder builderForValue) { - if (tieredRatesBuilder_ == null) { - ensureTieredRatesIsMutable(); - tieredRates_.set(index, builderForValue.build()); - onChanged(); - } else { - tieredRatesBuilder_.setMessage(index, builderForValue.build()); + public Builder setUsageUnitDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + + usageUnitDescription_ = value; + onChanged(); return this; } + + private java.lang.Object baseUnit_ = ""; /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The base unit for the SKU which is the unit used in usage exports.
+     * Example: "By"
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string base_unit = 5; + * + * @return The baseUnit. */ - public Builder addTieredRates(com.google.cloud.billing.v1.PricingExpression.TierRate value) { - if (tieredRatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTieredRatesIsMutable(); - tieredRates_.add(value); - onChanged(); + public java.lang.String getBaseUnit() { + java.lang.Object ref = baseUnit_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseUnit_ = s; + return s; } else { - tieredRatesBuilder_.addMessage(value); + return (java.lang.String) ref; } - return this; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The base unit for the SKU which is the unit used in usage exports.
+     * Example: "By"
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string base_unit = 5; + * + * @return The bytes for baseUnit. */ - public Builder addTieredRates( - int index, com.google.cloud.billing.v1.PricingExpression.TierRate value) { - if (tieredRatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTieredRatesIsMutable(); - tieredRates_.add(index, value); - onChanged(); + public com.google.protobuf.ByteString getBaseUnitBytes() { + java.lang.Object ref = baseUnit_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUnit_ = b; + return b; } else { - tieredRatesBuilder_.addMessage(index, value); + return (com.google.protobuf.ByteString) ref; } - return this; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The base unit for the SKU which is the unit used in usage exports.
+     * Example: "By"
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string base_unit = 5; + * + * @param value The baseUnit to set. + * @return This builder for chaining. */ - public Builder addTieredRates( - com.google.cloud.billing.v1.PricingExpression.TierRate.Builder builderForValue) { - if (tieredRatesBuilder_ == null) { - ensureTieredRatesIsMutable(); - tieredRates_.add(builderForValue.build()); - onChanged(); - } else { - tieredRatesBuilder_.addMessage(builderForValue.build()); + public Builder setBaseUnit(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + + baseUnit_ = value; + onChanged(); return this; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The base unit for the SKU which is the unit used in usage exports.
+     * Example: "By"
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string base_unit = 5; + * + * @return This builder for chaining. */ - public Builder addTieredRates( - int index, com.google.cloud.billing.v1.PricingExpression.TierRate.Builder builderForValue) { - if (tieredRatesBuilder_ == null) { - ensureTieredRatesIsMutable(); - tieredRates_.add(index, builderForValue.build()); - onChanged(); - } else { - tieredRatesBuilder_.addMessage(index, builderForValue.build()); - } + public Builder clearBaseUnit() { + + baseUnit_ = getDefaultInstance().getBaseUnit(); + onChanged(); return this; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The base unit for the SKU which is the unit used in usage exports.
+     * Example: "By"
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string base_unit = 5; + * + * @param value The bytes for baseUnit to set. + * @return This builder for chaining. */ - public Builder addAllTieredRates( - java.lang.Iterable - values) { - if (tieredRatesBuilder_ == null) { - ensureTieredRatesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tieredRates_); - onChanged(); - } else { - tieredRatesBuilder_.addAllMessages(values); + public Builder setBaseUnitBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + + baseUnit_ = value; + onChanged(); return this; } + + private java.lang.Object baseUnitDescription_ = ""; /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The base unit in human readable form.
+     * Example: "byte".
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string base_unit_description = 6; + * + * @return The baseUnitDescription. */ - public Builder clearTieredRates() { - if (tieredRatesBuilder_ == null) { - tieredRates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public java.lang.String getBaseUnitDescription() { + java.lang.Object ref = baseUnitDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseUnitDescription_ = s; + return s; } else { - tieredRatesBuilder_.clear(); + return (java.lang.String) ref; } - return this; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The base unit in human readable form.
+     * Example: "byte".
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string base_unit_description = 6; + * + * @return The bytes for baseUnitDescription. */ - public Builder removeTieredRates(int index) { - if (tieredRatesBuilder_ == null) { - ensureTieredRatesIsMutable(); - tieredRates_.remove(index); - onChanged(); + public com.google.protobuf.ByteString getBaseUnitDescriptionBytes() { + java.lang.Object ref = baseUnitDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUnitDescription_ = b; + return b; } else { - tieredRatesBuilder_.remove(index); + return (com.google.protobuf.ByteString) ref; } - return this; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The base unit in human readable form.
+     * Example: "byte".
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string base_unit_description = 6; + * + * @param value The baseUnitDescription to set. + * @return This builder for chaining. */ - public com.google.cloud.billing.v1.PricingExpression.TierRate.Builder getTieredRatesBuilder( - int index) { - return getTieredRatesFieldBuilder().getBuilder(index); + public Builder setBaseUnitDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + baseUnitDescription_ = value; + onChanged(); + return this; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The base unit in human readable form.
+     * Example: "byte".
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string base_unit_description = 6; + * + * @return This builder for chaining. */ - public com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder getTieredRatesOrBuilder( - int index) { - if (tieredRatesBuilder_ == null) { - return tieredRates_.get(index); - } else { - return tieredRatesBuilder_.getMessageOrBuilder(index); - } + public Builder clearBaseUnitDescription() { + + baseUnitDescription_ = getDefaultInstance().getBaseUnitDescription(); + onChanged(); + return this; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * The base unit in human readable form.
+     * Example: "byte".
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * string base_unit_description = 6; + * + * @param value The bytes for baseUnitDescription to set. + * @return This builder for chaining. */ - public java.util.List - getTieredRatesOrBuilderList() { - if (tieredRatesBuilder_ != null) { - return tieredRatesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tieredRates_); + public Builder setBaseUnitDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + + baseUnitDescription_ = value; + onChanged(); + return this; } + + private double baseUnitConversionFactor_; /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * Conversion factor for converting from price per usage_unit to price per
+     * base_unit, and start_usage_amount to start_usage_amount in base_unit.
+     * unit_price / base_unit_conversion_factor = price per base_unit.
+     * start_usage_amount * base_unit_conversion_factor = start_usage_amount in
+     * base_unit.
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * double base_unit_conversion_factor = 7; + * + * @return The baseUnitConversionFactor. */ - public com.google.cloud.billing.v1.PricingExpression.TierRate.Builder addTieredRatesBuilder() { - return getTieredRatesFieldBuilder() - .addBuilder(com.google.cloud.billing.v1.PricingExpression.TierRate.getDefaultInstance()); + @java.lang.Override + public double getBaseUnitConversionFactor() { + return baseUnitConversionFactor_; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * Conversion factor for converting from price per usage_unit to price per
+     * base_unit, and start_usage_amount to start_usage_amount in base_unit.
+     * unit_price / base_unit_conversion_factor = price per base_unit.
+     * start_usage_amount * base_unit_conversion_factor = start_usage_amount in
+     * base_unit.
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * double base_unit_conversion_factor = 7; + * + * @param value The baseUnitConversionFactor to set. + * @return This builder for chaining. */ - public com.google.cloud.billing.v1.PricingExpression.TierRate.Builder addTieredRatesBuilder( - int index) { - return getTieredRatesFieldBuilder() - .addBuilder( - index, com.google.cloud.billing.v1.PricingExpression.TierRate.getDefaultInstance()); + public Builder setBaseUnitConversionFactor(double value) { + + baseUnitConversionFactor_ = value; + onChanged(); + return this; } /** * * *
-     * The list of tiered rates for this pricing. The total cost is computed by
-     * applying each of the tiered rates on usage. This repeated list is sorted
-     * by ascending order of start_usage_amount.
+     * Conversion factor for converting from price per usage_unit to price per
+     * base_unit, and start_usage_amount to start_usage_amount in base_unit.
+     * unit_price / base_unit_conversion_factor = price per base_unit.
+     * start_usage_amount * base_unit_conversion_factor = start_usage_amount in
+     * base_unit.
      * 
* - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + * double base_unit_conversion_factor = 7; + * + * @return This builder for chaining. */ - public java.util.List - getTieredRatesBuilderList() { - return getTieredRatesFieldBuilder().getBuilderList(); - } + public Builder clearBaseUnitConversionFactor() { - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.billing.v1.PricingExpression.TierRate, - com.google.cloud.billing.v1.PricingExpression.TierRate.Builder, - com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder> - getTieredRatesFieldBuilder() { - if (tieredRatesBuilder_ == null) { - tieredRatesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.billing.v1.PricingExpression.TierRate, - com.google.cloud.billing.v1.PricingExpression.TierRate.Builder, - com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder>( - tieredRates_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - tieredRates_ = null; - } - return tieredRatesBuilder_; + baseUnitConversionFactor_ = 0D; + onChanged(); + return this; } @java.lang.Override diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpressionOrBuilder.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpressionOrBuilder.java index 847a1caf59db..51a86a0cc988 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpressionOrBuilder.java +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpressionOrBuilder.java @@ -50,6 +50,89 @@ public interface PricingExpressionOrBuilder */ com.google.protobuf.ByteString getUsageUnitBytes(); + /** + * + * + *
+   * The recommended quantity of units for displaying pricing info. When
+   * displaying pricing info it is recommended to display:
+   * (unit_price * display_quantity) per display_quantity usage_unit.
+   * This field does not affect the pricing formula and is for display purposes
+   * only.
+   * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and
+   * the display_quantity is "1000" then the recommended way of displaying the
+   * pricing info is "0.10 USD per 1000 GB"
+   * 
+ * + * double display_quantity = 2; + * + * @return The displayQuantity. + */ + double getDisplayQuantity(); + + /** + * + * + *
+   * The list of tiered rates for this pricing. The total cost is computed by
+   * applying each of the tiered rates on usage. This repeated list is sorted
+   * by ascending order of start_usage_amount.
+   * 
+ * + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + */ + java.util.List getTieredRatesList(); + /** + * + * + *
+   * The list of tiered rates for this pricing. The total cost is computed by
+   * applying each of the tiered rates on usage. This repeated list is sorted
+   * by ascending order of start_usage_amount.
+   * 
+ * + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + */ + com.google.cloud.billing.v1.PricingExpression.TierRate getTieredRates(int index); + /** + * + * + *
+   * The list of tiered rates for this pricing. The total cost is computed by
+   * applying each of the tiered rates on usage. This repeated list is sorted
+   * by ascending order of start_usage_amount.
+   * 
+ * + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + */ + int getTieredRatesCount(); + /** + * + * + *
+   * The list of tiered rates for this pricing. The total cost is computed by
+   * applying each of the tiered rates on usage. This repeated list is sorted
+   * by ascending order of start_usage_amount.
+   * 
+ * + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + */ + java.util.List + getTieredRatesOrBuilderList(); + /** + * + * + *
+   * The list of tiered rates for this pricing. The total cost is computed by
+   * applying each of the tiered rates on usage. This repeated list is sorted
+   * by ascending order of start_usage_amount.
+   * 
+ * + * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; + */ + com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder getTieredRatesOrBuilder( + int index); + /** * * @@ -147,87 +230,4 @@ public interface PricingExpressionOrBuilder * @return The baseUnitConversionFactor. */ double getBaseUnitConversionFactor(); - - /** - * - * - *
-   * The recommended quantity of units for displaying pricing info. When
-   * displaying pricing info it is recommended to display:
-   * (unit_price * display_quantity) per display_quantity usage_unit.
-   * This field does not affect the pricing formula and is for display purposes
-   * only.
-   * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and
-   * the display_quantity is "1000" then the recommended way of displaying the
-   * pricing info is "0.10 USD per 1000 GB"
-   * 
- * - * double display_quantity = 2; - * - * @return The displayQuantity. - */ - double getDisplayQuantity(); - - /** - * - * - *
-   * The list of tiered rates for this pricing. The total cost is computed by
-   * applying each of the tiered rates on usage. This repeated list is sorted
-   * by ascending order of start_usage_amount.
-   * 
- * - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - */ - java.util.List getTieredRatesList(); - /** - * - * - *
-   * The list of tiered rates for this pricing. The total cost is computed by
-   * applying each of the tiered rates on usage. This repeated list is sorted
-   * by ascending order of start_usage_amount.
-   * 
- * - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - */ - com.google.cloud.billing.v1.PricingExpression.TierRate getTieredRates(int index); - /** - * - * - *
-   * The list of tiered rates for this pricing. The total cost is computed by
-   * applying each of the tiered rates on usage. This repeated list is sorted
-   * by ascending order of start_usage_amount.
-   * 
- * - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - */ - int getTieredRatesCount(); - /** - * - * - *
-   * The list of tiered rates for this pricing. The total cost is computed by
-   * applying each of the tiered rates on usage. This repeated list is sorted
-   * by ascending order of start_usage_amount.
-   * 
- * - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - */ - java.util.List - getTieredRatesOrBuilderList(); - /** - * - * - *
-   * The list of tiered rates for this pricing. The total cost is computed by
-   * applying each of the tiered rates on usage. This repeated list is sorted
-   * by ascending order of start_usage_amount.
-   * 
- * - * repeated .google.cloud.billing.v1.PricingExpression.TierRate tiered_rates = 3; - */ - com.google.cloud.billing.v1.PricingExpression.TierRateOrBuilder getTieredRatesOrBuilder( - int index); } diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java index 6142aab76843..5faf80969d8c 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java @@ -22,9 +22,9 @@ * * *
- * Encapsulation of billing information for a GCP Console project. A project
- * has at most one associated billing account at a time (but a billing account
- * can be assigned to multiple projects).
+ * Encapsulation of billing information for a Google Cloud Console project. A
+ * project has at most one associated billing account at a time (but a billing
+ * account can be assigned to multiple projects).
  * 
* * Protobuf type {@code google.cloud.billing.v1.ProjectBillingInfo} @@ -441,9 +441,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Encapsulation of billing information for a GCP Console project. A project
-   * has at most one associated billing account at a time (but a billing account
-   * can be assigned to multiple projects).
+   * Encapsulation of billing information for a Google Cloud Console project. A
+   * project has at most one associated billing account at a time (but a billing
+   * account can be assigned to multiple projects).
    * 
* * Protobuf type {@code google.cloud.billing.v1.ProjectBillingInfo} diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Sku.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Sku.java index 5e630ac93b17..f0903dbd8a2d 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Sku.java +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Sku.java @@ -461,6 +461,54 @@ public com.google.protobuf.ByteString getServiceProviderNameBytes() { } } + public static final int GEO_TAXONOMY_FIELD_NUMBER = 8; + private com.google.cloud.billing.v1.GeoTaxonomy geoTaxonomy_; + /** + * + * + *
+   * The geographic taxonomy for this sku.
+   * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + * + * @return Whether the geoTaxonomy field is set. + */ + @java.lang.Override + public boolean hasGeoTaxonomy() { + return geoTaxonomy_ != null; + } + /** + * + * + *
+   * The geographic taxonomy for this sku.
+   * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + * + * @return The geoTaxonomy. + */ + @java.lang.Override + public com.google.cloud.billing.v1.GeoTaxonomy getGeoTaxonomy() { + return geoTaxonomy_ == null + ? com.google.cloud.billing.v1.GeoTaxonomy.getDefaultInstance() + : geoTaxonomy_; + } + /** + * + * + *
+   * The geographic taxonomy for this sku.
+   * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + */ + @java.lang.Override + public com.google.cloud.billing.v1.GeoTaxonomyOrBuilder getGeoTaxonomyOrBuilder() { + return getGeoTaxonomy(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -496,6 +544,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceProviderName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serviceProviderName_); } + if (geoTaxonomy_ != null) { + output.writeMessage(8, getGeoTaxonomy()); + } getUnknownFields().writeTo(output); } @@ -531,6 +582,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceProviderName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serviceProviderName_); } + if (geoTaxonomy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getGeoTaxonomy()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -556,6 +610,10 @@ public boolean equals(final java.lang.Object obj) { if (!getServiceRegionsList().equals(other.getServiceRegionsList())) return false; if (!getPricingInfoList().equals(other.getPricingInfoList())) return false; if (!getServiceProviderName().equals(other.getServiceProviderName())) return false; + if (hasGeoTaxonomy() != other.hasGeoTaxonomy()) return false; + if (hasGeoTaxonomy()) { + if (!getGeoTaxonomy().equals(other.getGeoTaxonomy())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -587,6 +645,10 @@ public int hashCode() { } hash = (37 * hash) + SERVICE_PROVIDER_NAME_FIELD_NUMBER; hash = (53 * hash) + getServiceProviderName().hashCode(); + if (hasGeoTaxonomy()) { + hash = (37 * hash) + GEO_TAXONOMY_FIELD_NUMBER; + hash = (53 * hash) + getGeoTaxonomy().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -746,6 +808,12 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); serviceProviderName_ = ""; + if (geoTaxonomyBuilder_ == null) { + geoTaxonomy_ = null; + } else { + geoTaxonomy_ = null; + geoTaxonomyBuilder_ = null; + } return this; } @@ -796,6 +864,11 @@ public com.google.cloud.billing.v1.Sku buildPartial() { result.pricingInfo_ = pricingInfoBuilder_.build(); } result.serviceProviderName_ = serviceProviderName_; + if (geoTaxonomyBuilder_ == null) { + result.geoTaxonomy_ = geoTaxonomy_; + } else { + result.geoTaxonomy_ = geoTaxonomyBuilder_.build(); + } onBuilt(); return result; } @@ -901,6 +974,9 @@ public Builder mergeFrom(com.google.cloud.billing.v1.Sku other) { serviceProviderName_ = other.serviceProviderName_; onChanged(); } + if (other.hasGeoTaxonomy()) { + mergeGeoTaxonomy(other.getGeoTaxonomy()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -977,6 +1053,12 @@ public Builder mergeFrom( break; } // case 58 + case 66: + { + input.readMessage(getGeoTaxonomyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2161,6 +2243,191 @@ public Builder setServiceProviderNameBytes(com.google.protobuf.ByteString value) return this; } + private com.google.cloud.billing.v1.GeoTaxonomy geoTaxonomy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.billing.v1.GeoTaxonomy, + com.google.cloud.billing.v1.GeoTaxonomy.Builder, + com.google.cloud.billing.v1.GeoTaxonomyOrBuilder> + geoTaxonomyBuilder_; + /** + * + * + *
+     * The geographic taxonomy for this sku.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + * + * @return Whether the geoTaxonomy field is set. + */ + public boolean hasGeoTaxonomy() { + return geoTaxonomyBuilder_ != null || geoTaxonomy_ != null; + } + /** + * + * + *
+     * The geographic taxonomy for this sku.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + * + * @return The geoTaxonomy. + */ + public com.google.cloud.billing.v1.GeoTaxonomy getGeoTaxonomy() { + if (geoTaxonomyBuilder_ == null) { + return geoTaxonomy_ == null + ? com.google.cloud.billing.v1.GeoTaxonomy.getDefaultInstance() + : geoTaxonomy_; + } else { + return geoTaxonomyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The geographic taxonomy for this sku.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + */ + public Builder setGeoTaxonomy(com.google.cloud.billing.v1.GeoTaxonomy value) { + if (geoTaxonomyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + geoTaxonomy_ = value; + onChanged(); + } else { + geoTaxonomyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The geographic taxonomy for this sku.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + */ + public Builder setGeoTaxonomy(com.google.cloud.billing.v1.GeoTaxonomy.Builder builderForValue) { + if (geoTaxonomyBuilder_ == null) { + geoTaxonomy_ = builderForValue.build(); + onChanged(); + } else { + geoTaxonomyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The geographic taxonomy for this sku.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + */ + public Builder mergeGeoTaxonomy(com.google.cloud.billing.v1.GeoTaxonomy value) { + if (geoTaxonomyBuilder_ == null) { + if (geoTaxonomy_ != null) { + geoTaxonomy_ = + com.google.cloud.billing.v1.GeoTaxonomy.newBuilder(geoTaxonomy_) + .mergeFrom(value) + .buildPartial(); + } else { + geoTaxonomy_ = value; + } + onChanged(); + } else { + geoTaxonomyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The geographic taxonomy for this sku.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + */ + public Builder clearGeoTaxonomy() { + if (geoTaxonomyBuilder_ == null) { + geoTaxonomy_ = null; + onChanged(); + } else { + geoTaxonomy_ = null; + geoTaxonomyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The geographic taxonomy for this sku.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + */ + public com.google.cloud.billing.v1.GeoTaxonomy.Builder getGeoTaxonomyBuilder() { + + onChanged(); + return getGeoTaxonomyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The geographic taxonomy for this sku.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + */ + public com.google.cloud.billing.v1.GeoTaxonomyOrBuilder getGeoTaxonomyOrBuilder() { + if (geoTaxonomyBuilder_ != null) { + return geoTaxonomyBuilder_.getMessageOrBuilder(); + } else { + return geoTaxonomy_ == null + ? com.google.cloud.billing.v1.GeoTaxonomy.getDefaultInstance() + : geoTaxonomy_; + } + } + /** + * + * + *
+     * The geographic taxonomy for this sku.
+     * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.billing.v1.GeoTaxonomy, + com.google.cloud.billing.v1.GeoTaxonomy.Builder, + com.google.cloud.billing.v1.GeoTaxonomyOrBuilder> + getGeoTaxonomyFieldBuilder() { + if (geoTaxonomyBuilder_ == null) { + geoTaxonomyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.billing.v1.GeoTaxonomy, + com.google.cloud.billing.v1.GeoTaxonomy.Builder, + com.google.cloud.billing.v1.GeoTaxonomyOrBuilder>( + getGeoTaxonomy(), getParentForChildren(), isClean()); + geoTaxonomy_ = null; + } + return geoTaxonomyBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/SkuOrBuilder.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/SkuOrBuilder.java index 9b282cd8b366..04edafd397e3 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/SkuOrBuilder.java +++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/SkuOrBuilder.java @@ -276,4 +276,39 @@ public interface SkuOrBuilder * @return The bytes for serviceProviderName. */ com.google.protobuf.ByteString getServiceProviderNameBytes(); + + /** + * + * + *
+   * The geographic taxonomy for this sku.
+   * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + * + * @return Whether the geoTaxonomy field is set. + */ + boolean hasGeoTaxonomy(); + /** + * + * + *
+   * The geographic taxonomy for this sku.
+   * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + * + * @return The geoTaxonomy. + */ + com.google.cloud.billing.v1.GeoTaxonomy getGeoTaxonomy(); + /** + * + * + *
+   * The geographic taxonomy for this sku.
+   * 
+ * + * .google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8; + */ + com.google.cloud.billing.v1.GeoTaxonomyOrBuilder getGeoTaxonomyOrBuilder(); } diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_billing.proto b/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_billing.proto index f0b19d14d136..b98f0fd7c264 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_billing.proto +++ b/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_billing.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -30,10 +29,14 @@ option java_multiple_files = true; option java_outer_classname = "CloudBillingProto"; option java_package = "com.google.cloud.billing.v1"; -// Retrieves GCP Console billing accounts and associates them with projects. +// Retrieves the Google Cloud Console billing accounts and associates them with +// projects. service CloudBilling { option (google.api.default_host) = "cloudbilling.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-billing," + "https://www.googleapis.com/auth/cloud-billing.readonly," + "https://www.googleapis.com/auth/cloud-platform"; // Gets information about a billing account. The current authenticated user // must be a [viewer of the billing @@ -69,15 +72,20 @@ service CloudBilling { option (google.api.method_signature) = "name,account"; } - // Creates a billing account. - // This method can only be used to create - // [billing subaccounts](https://cloud.google.com/billing/docs/concepts) - // by GCP resellers. + // This method creates [billing + // subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). + // + // 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). + // // When creating a subaccount, the current authenticated user must have the - // `billing.accounts.update` IAM permission on the master account, which is + // `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 master account has not been + // This method will return an error if the parent account has not been // provisioned as a reseller account. rpc CreateBillingAccount(CreateBillingAccountRequest) returns (BillingAccount) { option (google.api.http) = { @@ -99,9 +107,10 @@ service CloudBilling { } // 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 - // ). + // 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. rpc GetProjectBillingInfo(GetProjectBillingInfoRequest) returns (ProjectBillingInfo) { option (google.api.http) = { get: "/v1/{name=projects/*}/billingInfo" @@ -118,7 +127,7 @@ service CloudBilling { // usage charges. // // *Note:* Incurred charges that have not yet been reported in the transaction - // history of the GCP Console might be billed to the new billing + // history 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. // @@ -184,16 +193,20 @@ service CloudBilling { } } -// A billing account in [GCP Console](https://console.cloud.google.com/). -// You can assign a billing account to one or more projects. +// A billing account in the +// [Google Cloud Console](https://console.cloud.google.com/). You can assign a +// billing account to one or more projects. message BillingAccount { - // The resource name of the billing account. The resource name has the form + // Output only. The resource name of the billing account. The resource name has the form // `billingAccounts/{billing_account_id}`. For example, // `billingAccounts/012345-567890-ABCDEF` would be the resource name for // billing account `012345-567890-ABCDEF`. - string name = 1 [(google.api.resource_reference) = { - type: "cloudbilling.googleapis.com/BillingAccount" - }]; + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbilling.googleapis.com/BillingAccount" + } + ]; // Output only. True if the billing account is open, and will therefore be charged for any // usage on associated projects. False if the billing account is closed, and @@ -201,20 +214,20 @@ message BillingAccount { bool open = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The display name given to the billing account, such as `My Billing - // Account`. This name is displayed in the GCP Console. + // Account`. This name is displayed in the Google Cloud Console. string display_name = 3; // If this account is a // [subaccount](https://cloud.google.com/billing/docs/concepts), then this - // will be the resource name of the master billing account that it is being + // will be the resource name of the parent billing account that it is being // resold through. // Otherwise this will be empty. string master_billing_account = 4; } -// Encapsulation of billing information for a GCP Console project. A project -// has at most one associated billing account at a time (but a billing account -// can be assigned to multiple projects). +// Encapsulation of billing information for a Google Cloud Console project. A +// project has at most one associated billing account at a time (but a billing +// account can be assigned to multiple projects). message ProjectBillingInfo { // The resource name for the `ProjectBillingInfo`; has the form // `projects/{project_id}/billingInfo`. For example, the resource name for the @@ -285,7 +298,7 @@ message ListBillingAccountsResponse { message CreateBillingAccountRequest { // 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 + // any created billing accounts must be under a provided parent billing // account. BillingAccount billing_account = 1 [(google.api.field_behavior) = REQUIRED]; } diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_catalog.proto b/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_catalog.proto index 7bc2f14e3b10..f3d46e627083 100644 --- a/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_catalog.proto +++ b/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_catalog.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -36,7 +35,10 @@ option objc_class_prefix = "CLDCTLG"; // and SKUs. service CloudCatalog { option (google.api.default_host) = "cloudbilling.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-billing," + "https://www.googleapis.com/auth/cloud-billing.readonly," + "https://www.googleapis.com/auth/cloud-platform"; // Lists all public cloud services. rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { @@ -111,6 +113,9 @@ message Sku { // Identifies the service provider. // This is 'Google' for first party services in Google Cloud Platform. string service_provider_name = 7; + + // The geographic taxonomy for this sku. + GeoTaxonomy geo_taxonomy = 8; } // Represents the category hierarchy of a SKU. @@ -187,6 +192,21 @@ message PricingExpression { // Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". string usage_unit = 1; + // The recommended quantity of units for displaying pricing info. When + // displaying pricing info it is recommended to display: + // (unit_price * display_quantity) per display_quantity usage_unit. + // This field does not affect the pricing formula and is for display purposes + // only. + // Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and + // the display_quantity is "1000" then the recommended way of displaying the + // pricing info is "0.10 USD per 1000 GB" + double display_quantity = 2; + + // The list of tiered rates for this pricing. The total cost is computed by + // applying each of the tiered rates on usage. This repeated list is sorted + // by ascending order of start_usage_amount. + repeated TierRate tiered_rates = 3; + // The unit of usage in human readable form. // Example: "gibi byte". string usage_unit_description = 4; @@ -205,21 +225,6 @@ message PricingExpression { // start_usage_amount * base_unit_conversion_factor = start_usage_amount in // base_unit. double base_unit_conversion_factor = 7; - - // The recommended quantity of units for displaying pricing info. When - // displaying pricing info it is recommended to display: - // (unit_price * display_quantity) per display_quantity usage_unit. - // This field does not affect the pricing formula and is for display purposes - // only. - // Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and - // the display_quantity is "1000" then the recommended way of displaying the - // pricing info is "0.10 USD per 1000 GB" - double display_quantity = 2; - - // The list of tiered rates for this pricing. The total cost is computed by - // applying each of the tiered rates on usage. This repeated list is sorted - // by ascending order of start_usage_amount. - repeated TierRate tiered_rates = 3; } // Represents the aggregation level and interval for pricing of a single SKU. @@ -256,6 +261,33 @@ message AggregationInfo { int32 aggregation_count = 3; } +// Encapsulates the geographic taxonomy data for a sku. +message GeoTaxonomy { + // The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. + enum Type { + // The type is not specified. + TYPE_UNSPECIFIED = 0; + + // The sku is global in nature, e.g. a license sku. Global skus are + // available in all regions, and so have an empty region list. + GLOBAL = 1; + + // The sku is available in a specific region, e.g. "us-west2". + REGIONAL = 2; + + // The sku is associated with multiple regions, e.g. "us-west2" and + // "us-east1". + MULTI_REGIONAL = 3; + } + + // The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. + Type type = 1; + + // The list of regions associated with a sku. Empty for Global skus, which are + // associated with all Google Cloud regions. + repeated string regions = 2; +} + // Request message for `ListServices`. message ListServicesRequest { // Requested page size. Defaults to 5000.