Skip to content

Commit f3a60f6

Browse files
Google APIscopybara-github
authored andcommitted
docs: Update rules for currency_code in budget_amount.
PiperOrigin-RevId: 357051517
1 parent 3f914b8 commit f3a60f6

3 files changed

Lines changed: 45 additions & 87 deletions

File tree

google/cloud/billing/budgets/v1/BUILD.bazel

Lines changed: 32 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,42 @@
99
# * extra_protoc_file_parameters
1010
# The complete list of preserved parameters can be found in the source code.
1111

12-
# This is an API workspace, having public visibility by default makes perfect sense.
13-
package(default_visibility = ["//visibility:public"])
14-
1512
##############################################################################
1613
# Common
1714
##############################################################################
1815
load("@rules_proto//proto:defs.bzl", "proto_library")
19-
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
16+
load(
17+
"@com_google_googleapis_imports//:imports.bzl",
18+
"csharp_gapic_assembly_pkg",
19+
"csharp_gapic_library",
20+
"csharp_grpc_library",
21+
"csharp_proto_library",
22+
"go_gapic_assembly_pkg",
23+
"go_gapic_library",
24+
"go_proto_library",
25+
"go_test",
26+
"java_gapic_assembly_gradle_pkg",
27+
"java_gapic_library",
28+
"java_gapic_test",
29+
"java_grpc_library",
30+
"java_proto_library",
31+
"nodejs_gapic_assembly_pkg",
32+
"nodejs_gapic_library",
33+
"php_gapic_assembly_pkg",
34+
"php_gapic_library",
35+
"php_grpc_library",
36+
"php_proto_library",
37+
"proto_library_with_info",
38+
"py_gapic_assembly_pkg",
39+
"py_gapic_library",
40+
"ruby_gapic_assembly_pkg",
41+
"ruby_gapic_library",
42+
"ruby_grpc_library",
43+
"ruby_proto_library",
44+
)
45+
46+
# This is an API workspace, having public visibility by default makes perfect sense.
47+
package(default_visibility = ["//visibility:public"])
2048

2149
proto_library(
2250
name = "budgets_proto",
@@ -44,18 +72,6 @@ proto_library_with_info(
4472
],
4573
)
4674

47-
##############################################################################
48-
# Java
49-
##############################################################################
50-
load(
51-
"@com_google_googleapis_imports//:imports.bzl",
52-
"java_gapic_assembly_gradle_pkg",
53-
"java_gapic_library",
54-
"java_gapic_test",
55-
"java_grpc_library",
56-
"java_proto_library",
57-
)
58-
5975
java_proto_library(
6076
name = "budgets_java_proto",
6177
deps = [":budgets_proto"],
@@ -82,7 +98,6 @@ java_gapic_library(
8298
java_gapic_test(
8399
name = "budgets_java_gapic_test_suite",
84100
test_classes = [
85-
"com.google.cloud.billing.budgets.v1.BudgetServiceClientTest",
86101
],
87102
runtime_deps = [":budgets_java_gapic_test"],
88103
)
@@ -98,17 +113,6 @@ java_gapic_assembly_gradle_pkg(
98113
],
99114
)
100115

101-
##############################################################################
102-
# Go
103-
##############################################################################
104-
load(
105-
"@com_google_googleapis_imports//:imports.bzl",
106-
"go_gapic_assembly_pkg",
107-
"go_gapic_library",
108-
"go_proto_library",
109-
"go_test",
110-
)
111-
112116
go_proto_library(
113117
name = "budgets_go_proto",
114118
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
@@ -148,15 +152,6 @@ go_gapic_assembly_pkg(
148152
],
149153
)
150154

151-
##############################################################################
152-
# Python
153-
##############################################################################
154-
load(
155-
"@com_google_googleapis_imports//:imports.bzl",
156-
"py_gapic_assembly_pkg",
157-
"py_gapic_library",
158-
)
159-
160155
py_gapic_library(
161156
name = "budgets_py_gapic",
162157
srcs = [":budgets_proto"],
@@ -171,17 +166,6 @@ py_gapic_assembly_pkg(
171166
],
172167
)
173168

174-
##############################################################################
175-
# PHP
176-
##############################################################################
177-
load(
178-
"@com_google_googleapis_imports//:imports.bzl",
179-
"php_gapic_assembly_pkg",
180-
"php_gapic_library",
181-
"php_grpc_library",
182-
"php_proto_library",
183-
)
184-
185169
php_proto_library(
186170
name = "budgets_php_proto",
187171
deps = [":budgets_proto"],
@@ -216,15 +200,6 @@ php_gapic_assembly_pkg(
216200
],
217201
)
218202

219-
##############################################################################
220-
# Node.js
221-
##############################################################################
222-
load(
223-
"@com_google_googleapis_imports//:imports.bzl",
224-
"nodejs_gapic_assembly_pkg",
225-
"nodejs_gapic_library",
226-
)
227-
228203
nodejs_gapic_library(
229204
name = "budgets_nodejs_gapic",
230205
package_name = "@google-cloud/billing-budgets",
@@ -244,17 +219,6 @@ nodejs_gapic_assembly_pkg(
244219
],
245220
)
246221

247-
##############################################################################
248-
# Ruby
249-
##############################################################################
250-
load(
251-
"@com_google_googleapis_imports//:imports.bzl",
252-
"ruby_gapic_assembly_pkg",
253-
"ruby_gapic_library",
254-
"ruby_grpc_library",
255-
"ruby_proto_library",
256-
)
257-
258222
ruby_proto_library(
259223
name = "budgets_ruby_proto",
260224
deps = [":budgets_proto"],
@@ -289,17 +253,6 @@ ruby_gapic_assembly_pkg(
289253
],
290254
)
291255

292-
##############################################################################
293-
# C#
294-
##############################################################################
295-
load(
296-
"@com_google_googleapis_imports//:imports.bzl",
297-
"csharp_gapic_assembly_pkg",
298-
"csharp_gapic_library",
299-
"csharp_grpc_library",
300-
"csharp_proto_library",
301-
)
302-
303256
csharp_proto_library(
304257
name = "budgets_csharp_proto",
305258
deps = [":budgets_proto"],

google/cloud/billing/budgets/v1/budget_model.proto

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -74,9 +74,10 @@ message BudgetAmount {
7474
// Specification for what amount to use as the budget.
7575
oneof budget_amount {
7676
// A specified amount to use as the budget.
77-
// `currency_code` is optional. If specified, it must match the
78-
// currency of the billing account. The `currency_code` is provided on
79-
// output.
77+
// `currency_code` is optional. If specified when creating a budget, it must
78+
// match the currency of the billing account. If specified when updating a
79+
// budget, it must match the currency_code of the existing budget.
80+
// The `currency_code` is provided on output.
8081
google.type.Money specified_amount = 1;
8182

8283
// Use the last period's actual spend as the budget for the present period.
@@ -138,9 +139,12 @@ message NotificationsRule {
138139
// for more details on Pub/Sub roles and permissions.
139140
string pubsub_topic = 1 [(google.api.field_behavior) = OPTIONAL];
140141

141-
// Optional. The schema version of the notification sent to `pubsub_topic`.
142+
// Optional. Required when
143+
// [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]
144+
// is set. The schema version of the notification sent to
145+
// [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic].
142146
// Only "1.0" is accepted. It represents the JSON schema as defined in
143-
// https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
147+
// https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
144148
string schema_version = 2 [(google.api.field_behavior) = OPTIONAL];
145149

146150
// Optional. Targets to send notifications to when a threshold is exceeded.

google/cloud/billing/budgets/v1/budget_service.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -123,7 +123,8 @@ message UpdateBudgetRequest {
123123
// updated. See
124124
// https://developers.google.com/protocol-buffers/docs/proto3#default for more
125125
// details about default values.
126-
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL];
126+
google.protobuf.FieldMask update_mask = 2
127+
[(google.api.field_behavior) = OPTIONAL];
127128
}
128129

129130
// Request for GetBudget

0 commit comments

Comments
 (0)