GeezerVison is showing github.com — feat: added Sku.geo_taxonomy · googleapis/googleapis@8995a88
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: google/cloud/billing/v1/BUILD.bazel +20-3Lines changed: 20 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | # This file was automatically generated by BuildFileGenerator | | 2 | +# https://github.com/googleapis/rules_gapic/tree/master/bazel | | 3 | + | | 4 | +# Most of the manual changes to this file will be overwritten. | | 5 | +# It's **only** allowed to change the following rule attribute values: | | 6 | +# - names of *_gapic_assembly_* rules | | 7 | +# - certain parameters of *_gapic_library rules, including but not limited to: | | 8 | +# * extra_protoc_parameters | | 9 | +# * extra_protoc_file_parameters | | 10 | +# The complete list of preserved parameters can be found in the source code. | 2 | 11 |
| 3 | 12 | # This is an API workspace, having public visibility by default makes perfect sense. | 4 | 13 | package(default_visibility = ["//visibility:public"]) | @@ -62,15 +71,18 @@ java_grpc_library( | 62 | 71 | java_gapic_library( | 63 | 72 | name = "billing_java_gapic", | 64 | 73 | srcs = [":billing_proto_with_info"], | | 74 | + gapic_yaml = None, | 65 | 75 | grpc_service_config = "cloud_billing_grpc_service_config.json", | 66 | 76 | rest_numeric_enums = False, | | 77 | + service_yaml = "cloudbilling.yaml", | 67 | 78 | test_deps = [ | 68 | 79 | ":billing_java_grpc", | 69 | 80 | "//google/iam/v1:iam_java_grpc", | 70 | 81 | ], | 71 | 82 | transport = "grpc+rest", | 72 | 83 | deps = [ | 73 | 84 | ":billing_java_proto", | | 85 | + "//google/api:api_java_proto", | 74 | 86 | "//google/iam/v1:iam_java_proto", | 75 | 87 | ], | 76 | 88 | ) | @@ -127,6 +139,7 @@ go_gapic_library( | 127 | 139 | srcs = [":billing_proto_with_info"], | 128 | 140 | grpc_service_config = "cloud_billing_grpc_service_config.json", | 129 | 141 | importpath = "cloud.google.com/go/billing/apiv1;billing", | | 142 | + metadata = True, | 130 | 143 | rest_numeric_enums = False, | 131 | 144 | service_yaml = "cloudbilling.yaml", | 132 | 145 | transport = "grpc+rest", | @@ -148,6 +161,7 @@ go_gapic_assembly_pkg( | 148 | 161 | name = "gapi-cloud-billing-v1-go", | 149 | 162 | deps = [ | 150 | 163 | ":billing_go_gapic", | | 164 | + ":billing_go_gapic_srcjar-metadata.srcjar", | 151 | 165 | ":billing_go_gapic_srcjar-test.srcjar", | 152 | 166 | ":billing_go_proto", | 153 | 167 | ], | @@ -168,6 +182,7 @@ py_gapic_library( | 168 | 182 | srcs = [":billing_proto"], | 169 | 183 | grpc_service_config = "cloud_billing_grpc_service_config.json", | 170 | 184 | rest_numeric_enums = False, | | 185 | + service_yaml = "cloudbilling.yaml", | 171 | 186 | transport = "grpc", | 172 | 187 | deps = [ | 173 | 188 | "//google/iam/v1:iam_policy_py_proto", | @@ -219,6 +234,7 @@ php_gapic_library( | 219 | 234 | srcs = [":billing_proto_with_info"], | 220 | 235 | grpc_service_config = "cloud_billing_grpc_service_config.json", | 221 | 236 | rest_numeric_enums = False, | | 237 | + service_yaml = "cloudbilling.yaml", | 222 | 238 | transport = "grpc+rest", | 223 | 239 | deps = [ | 224 | 240 | ":billing_php_grpc", | @@ -292,16 +308,17 @@ ruby_cloud_gapic_library( | 292 | 308 | name = "billing_ruby_gapic", | 293 | 309 | srcs = [":billing_proto_with_info"], | 294 | 310 | extra_protoc_parameters = [ | 295 | | - "ruby-cloud-gem-name=google-cloud-billing-v1", | 296 | | - "ruby-cloud-env-prefix=BILLING", | 297 | | - "ruby-cloud-product-url=https://cloud.google.com/billing", | 298 | 311 | "ruby-cloud-api-id=cloudbilling.googleapis.com", | 299 | 312 | "ruby-cloud-api-shortname=cloudbilling", | | 313 | + "ruby-cloud-env-prefix=BILLING", | | 314 | + "ruby-cloud-gem-name=google-cloud-billing-v1", | | 315 | + "ruby-cloud-product-url=https://cloud.google.com/billing", | 300 | 316 | ], | 301 | 317 | grpc_service_config = "cloud_billing_grpc_service_config.json", | 302 | 318 | rest_numeric_enums = False, | 303 | 319 | ruby_cloud_description = "Allows developers to manage billing for their Google Cloud Platform projects programmatically.", | 304 | 320 | ruby_cloud_title = "Billing V1", | | 321 | + service_yaml = "cloudbilling.yaml", | 305 | 322 | deps = [ | 306 | 323 | ":billing_ruby_grpc", | 307 | 324 | ":billing_ruby_proto", | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/billing/v1/cloud_billing.proto +39-26Lines changed: 39 additions & 26 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -// Copyright 2019 Google LLC. | | 1 | +// Copyright 2022 Google LLC | 2 | 2 | // | 3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); | 4 | 4 | // you may not use this file except in compliance with the License. | | 11 | 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | 12 | // See the License for the specific language governing permissions and | 13 | 13 | // limitations under the License. | 14 | | -// | 15 | 14 |
| 16 | 15 | syntax = "proto3"; | 17 | 16 |
| @@ -30,10 +29,14 @@ option java_multiple_files = true; | 30 | 29 | option java_outer_classname = "CloudBillingProto"; | 31 | 30 | option java_package = "com.google.cloud.billing.v1"; | 32 | 31 |
| 33 | | -// Retrieves GCP Console billing accounts and associates them with projects. | | 32 | +// Retrieves the Google Cloud Console billing accounts and associates them with | | 33 | +// projects. | 34 | 34 | service CloudBilling { | 35 | 35 | option (google.api.default_host) = "cloudbilling.googleapis.com"; | 36 | | - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; | | 36 | + option (google.api.oauth_scopes) = | | 37 | + "https://www.googleapis.com/auth/cloud-billing," | | 38 | + "https://www.googleapis.com/auth/cloud-billing.readonly," | | 39 | + "https://www.googleapis.com/auth/cloud-platform"; | 37 | 40 |
| 38 | 41 | // Gets information about a billing account. The current authenticated user | 39 | 42 | // must be a [viewer of the billing | @@ -69,15 +72,20 @@ service CloudBilling { | 69 | 72 | option (google.api.method_signature) = "name,account"; | 70 | 73 | } | 71 | 74 |
| 72 | | - // Creates a billing account. | 73 | | - // This method can only be used to create | 74 | | - // [billing subaccounts](https://cloud.google.com/billing/docs/concepts) | 75 | | - // by GCP resellers. | | 75 | + // This method creates [billing | | 76 | + // subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). | | 77 | + // | | 78 | + // Google Cloud resellers should use the | | 79 | + // Channel Services APIs, | | 80 | + // [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) | | 81 | + // and | | 82 | + // [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). | | 83 | + // | 76 | 84 | // When creating a subaccount, the current authenticated user must have the | 77 | | - // `billing.accounts.update` IAM permission on the master account, which is | | 85 | + // `billing.accounts.update` IAM permission on the parent account, which is | 78 | 86 | // typically given to billing account | 79 | 87 | // [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). | 80 | | - // This method will return an error if the master account has not been | | 88 | + // This method will return an error if the parent account has not been | 81 | 89 | // provisioned as a reseller account. | 82 | 90 | rpc CreateBillingAccount(CreateBillingAccountRequest) returns (BillingAccount) { | 83 | 91 | option (google.api.http) = { | @@ -99,9 +107,10 @@ service CloudBilling { | 99 | 107 | } | 100 | 108 |
| 101 | 109 | // Gets the billing information for a project. The current authenticated user | 102 | | - // must have [permission to view the | 103 | | - // project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo | 104 | | - // ). | | 110 | + // must have the `resourcemanager.projects.get` permission for the project, | | 111 | + // which can be granted by assigning the [Project | | 112 | + // Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) | | 113 | + // role. | 105 | 114 | rpc GetProjectBillingInfo(GetProjectBillingInfoRequest) returns (ProjectBillingInfo) { | 106 | 115 | option (google.api.http) = { | 107 | 116 | get: "/v1/{name=projects/*}/billingInfo" | @@ -118,7 +127,7 @@ service CloudBilling { | 118 | 127 | // usage charges. | 119 | 128 | // | 120 | 129 | // *Note:* Incurred charges that have not yet been reported in the transaction | 121 | | - // history of the GCP Console might be billed to the new billing | | 130 | + // history of the Google Cloud Console might be billed to the new billing | 122 | 131 | // account, even if the charge occurred before the new billing account was | 123 | 132 | // assigned to the project. | 124 | 133 | // | @@ -184,37 +193,41 @@ service CloudBilling { | 184 | 193 | } | 185 | 194 | } | 186 | 195 |
| 187 | | -// A billing account in [GCP Console](https://console.cloud.google.com/). | 188 | | -// You can assign a billing account to one or more projects. | | 196 | +// A billing account in the | | 197 | +// [Google Cloud Console](https://console.cloud.google.com/). You can assign a | | 198 | +// billing account to one or more projects. | 189 | 199 | message BillingAccount { | 190 | | - // The resource name of the billing account. The resource name has the form | | 200 | + // Output only. The resource name of the billing account. The resource name has the form | 191 | 201 | // `billingAccounts/{billing_account_id}`. For example, | 192 | 202 | // `billingAccounts/012345-567890-ABCDEF` would be the resource name for | 193 | 203 | // billing account `012345-567890-ABCDEF`. | 194 | | - string name = 1 [(google.api.resource_reference) = { | 195 | | - type: "cloudbilling.googleapis.com/BillingAccount" | 196 | | - }]; | | 204 | + string name = 1 [ | | 205 | + (google.api.field_behavior) = OUTPUT_ONLY, | | 206 | + (google.api.resource_reference) = { | | 207 | + type: "cloudbilling.googleapis.com/BillingAccount" | | 208 | + } | | 209 | + ]; | 197 | 210 |
| 198 | 211 | // Output only. True if the billing account is open, and will therefore be charged for any | 199 | 212 | // usage on associated projects. False if the billing account is closed, and | 200 | 213 | // therefore projects associated with it will be unable to use paid services. | 201 | 214 | bool open = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; | 202 | 215 |
| 203 | 216 | // The display name given to the billing account, such as `My Billing | 204 | | - // Account`. This name is displayed in the GCP Console. | | 217 | + // Account`. This name is displayed in the Google Cloud Console. | 205 | 218 | string display_name = 3; | 206 | 219 |
| 207 | 220 | // If this account is a | 208 | 221 | // [subaccount](https://cloud.google.com/billing/docs/concepts), then this | 209 | | - // will be the resource name of the master billing account that it is being | | 222 | + // will be the resource name of the parent billing account that it is being | 210 | 223 | // resold through. | 211 | 224 | // Otherwise this will be empty. | 212 | 225 | string master_billing_account = 4; | 213 | 226 | } | 214 | 227 |
| 215 | | -// Encapsulation of billing information for a GCP Console project. A project | 216 | | -// has at most one associated billing account at a time (but a billing account | 217 | | -// can be assigned to multiple projects). | | 228 | +// Encapsulation of billing information for a Google Cloud Console project. A | | 229 | +// project has at most one associated billing account at a time (but a billing | | 230 | +// account can be assigned to multiple projects). | 218 | 231 | message ProjectBillingInfo { | 219 | 232 | // The resource name for the `ProjectBillingInfo`; has the form | 220 | 233 | // `projects/{project_id}/billingInfo`. For example, the resource name for the | @@ -285,7 +298,7 @@ message ListBillingAccountsResponse { | 285 | 298 | message CreateBillingAccountRequest { | 286 | 299 | // Required. The billing account resource to create. | 287 | 300 | // Currently CreateBillingAccount only supports subaccount creation, so | 288 | | - // any created billing accounts must be under a provided master billing | | 301 | + // any created billing accounts must be under a provided parent billing | 289 | 302 | // account. | 290 | 303 | BillingAccount billing_account = 1 [(google.api.field_behavior) = REQUIRED]; | 291 | 304 | } | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/billing/v1/cloud_catalog.proto +50-18Lines changed: 50 additions & 18 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -// Copyright 2019 Google LLC. | | 1 | +// Copyright 2022 Google LLC | 2 | 2 | // | 3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); | 4 | 4 | // you may not use this file except in compliance with the License. | | 11 | 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | 12 | // See the License for the specific language governing permissions and | 13 | 13 | // limitations under the License. | 14 | | -// | 15 | 14 |
| 16 | 15 | syntax = "proto3"; | 17 | 16 |
| @@ -36,7 +35,10 @@ option objc_class_prefix = "CLDCTLG"; | 36 | 35 | // and SKUs. | 37 | 36 | service CloudCatalog { | 38 | 37 | option (google.api.default_host) = "cloudbilling.googleapis.com"; | 39 | | - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; | | 38 | + option (google.api.oauth_scopes) = | | 39 | + "https://www.googleapis.com/auth/cloud-billing," | | 40 | + "https://www.googleapis.com/auth/cloud-billing.readonly," | | 41 | + "https://www.googleapis.com/auth/cloud-platform"; | 40 | 42 |
| 41 | 43 | // Lists all public cloud services. | 42 | 44 | rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { | @@ -111,6 +113,9 @@ message Sku { | 111 | 113 | // Identifies the service provider. | 112 | 114 | // This is 'Google' for first party services in Google Cloud Platform. | 113 | 115 | string service_provider_name = 7; | | 116 | + | | 117 | + // The geographic taxonomy for this sku. | | 118 | + GeoTaxonomy geo_taxonomy = 8; | 114 | 119 | } | 115 | 120 |
| 116 | 121 | // Represents the category hierarchy of a SKU. | @@ -187,6 +192,21 @@ message PricingExpression { | 187 | 192 | // Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". | 188 | 193 | string usage_unit = 1; | 189 | 194 |
| | 195 | + // The recommended quantity of units for displaying pricing info. When | | 196 | + // displaying pricing info it is recommended to display: | | 197 | + // (unit_price * display_quantity) per display_quantity usage_unit. | | 198 | + // This field does not affect the pricing formula and is for display purposes | | 199 | + // only. | | 200 | + // Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and | | 201 | + // the display_quantity is "1000" then the recommended way of displaying the | | 202 | + // pricing info is "0.10 USD per 1000 GB" | | 203 | + double display_quantity = 2; | | 204 | + | | 205 | + // The list of tiered rates for this pricing. The total cost is computed by | | 206 | + // applying each of the tiered rates on usage. This repeated list is sorted | | 207 | + // by ascending order of start_usage_amount. | | 208 | + repeated TierRate tiered_rates = 3; | | 209 | + | 190 | 210 | // The unit of usage in human readable form. | 191 | 211 | // Example: "gibi byte". | 192 | 212 | string usage_unit_description = 4; | @@ -205,21 +225,6 @@ message PricingExpression { | 205 | 225 | // start_usage_amount * base_unit_conversion_factor = start_usage_amount in | 206 | 226 | // base_unit. | 207 | 227 | double base_unit_conversion_factor = 7; | 208 | | - | 209 | | - // The recommended quantity of units for displaying pricing info. When | 210 | | - // displaying pricing info it is recommended to display: | 211 | | - // (unit_price * display_quantity) per display_quantity usage_unit. | 212 | | - // This field does not affect the pricing formula and is for display purposes | 213 | | - // only. | 214 | | - // Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and | 215 | | - // the display_quantity is "1000" then the recommended way of displaying the | 216 | | - // pricing info is "0.10 USD per 1000 GB" | 217 | | - double display_quantity = 2; | 218 | | - | 219 | | - // The list of tiered rates for this pricing. The total cost is computed by | 220 | | - // applying each of the tiered rates on usage. This repeated list is sorted | 221 | | - // by ascending order of start_usage_amount. | 222 | | - repeated TierRate tiered_rates = 3; | 223 | 228 | } | 224 | 229 |
| 225 | 230 | // Represents the aggregation level and interval for pricing of a single SKU. | @@ -256,6 +261,33 @@ message AggregationInfo { | 256 | 261 | int32 aggregation_count = 3; | 257 | 262 | } | 258 | 263 |
| | 264 | +// Encapsulates the geographic taxonomy data for a sku. | | 265 | +message GeoTaxonomy { | | 266 | + // The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. | | 267 | + enum Type { | | 268 | + // The type is not specified. | | 269 | + TYPE_UNSPECIFIED = 0; | | 270 | + | | 271 | + // The sku is global in nature, e.g. a license sku. Global skus are | | 272 | + // available in all regions, and so have an empty region list. | | 273 | + GLOBAL = 1; | | 274 | + | | 275 | + // The sku is available in a specific region, e.g. "us-west2". | | 276 | + REGIONAL = 2; | | 277 | + | | 278 | + // The sku is associated with multiple regions, e.g. "us-west2" and | | 279 | + // "us-east1". | | 280 | + MULTI_REGIONAL = 3; | | 281 | + } | | 282 | + | | 283 | + // The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. | | 284 | + Type type = 1; | | 285 | + | | 286 | + // The list of regions associated with a sku. Empty for Global skus, which are | | 287 | + // associated with all Google Cloud regions. | | 288 | + repeated string regions = 2; | | 289 | +} | | 290 | + | 259 | 291 | // Request message for `ListServices`. | 260 | 292 | message ListServicesRequest { | 261 | 293 | // Requested page size. Defaults to 5000. | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/billing/v1/cloudbilling.yaml +27-1Lines changed: 27 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | type: google.api.Service | 2 | | -config_version: 1 | | 2 | +config_version: 3 | 3 | 3 | name: cloudbilling.googleapis.com | 4 | 4 | title: Cloud Billing API | 5 | 5 |
| @@ -17,12 +17,38 @@ authentication: | 17 | 17 | - selector: 'google.cloud.billing.v1.CloudBilling.*' | 18 | 18 | oauth: | 19 | 19 | canonical_scopes: |- | | 20 | + https://www.googleapis.com/auth/cloud-billing, | | 21 | + https://www.googleapis.com/auth/cloud-billing.readonly, | | 22 | + https://www.googleapis.com/auth/cloud-platform | | 23 | + - selector: google.cloud.billing.v1.CloudBilling.CreateBillingAccount | | 24 | + oauth: | | 25 | + canonical_scopes: |- | | 26 | + https://www.googleapis.com/auth/cloud-billing, | | 27 | + https://www.googleapis.com/auth/cloud-platform | | 28 | + - selector: google.cloud.billing.v1.CloudBilling.SetIamPolicy | | 29 | + oauth: | | 30 | + canonical_scopes: |- | | 31 | + https://www.googleapis.com/auth/cloud-billing, | | 32 | + https://www.googleapis.com/auth/cloud-platform | | 33 | + - selector: google.cloud.billing.v1.CloudBilling.UpdateBillingAccount | | 34 | + oauth: | | 35 | + canonical_scopes: |- | | 36 | + https://www.googleapis.com/auth/cloud-billing, | | 37 | + https://www.googleapis.com/auth/cloud-platform | | 38 | + - selector: google.cloud.billing.v1.CloudBilling.UpdateProjectBillingInfo | | 39 | + oauth: | | 40 | + canonical_scopes: |- | | 41 | + https://www.googleapis.com/auth/cloud-billing, | 20 | 42 | https://www.googleapis.com/auth/cloud-platform | 21 | 43 | - selector: google.cloud.billing.v1.CloudCatalog.ListServices | 22 | 44 | oauth: | 23 | 45 | canonical_scopes: |- | | 46 | + https://www.googleapis.com/auth/cloud-billing, | | 47 | + https://www.googleapis.com/auth/cloud-billing.readonly, | 24 | 48 | https://www.googleapis.com/auth/cloud-platform | 25 | 49 | - selector: google.cloud.billing.v1.CloudCatalog.ListSkus | 26 | 50 | oauth: | 27 | 51 | canonical_scopes: |- | | 52 | + https://www.googleapis.com/auth/cloud-billing, | | 53 | + https://www.googleapis.com/auth/cloud-billing.readonly, | 28 | 54 | https://www.googleapis.com/auth/cloud-platform |
|