Skip to content
This repository was archived by the owner on Sep 18, 2023. It is now read-only.

Commit 15cd344

Browse files
docs: Update rules for currency_code in budget_amount (#387)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/924801fb-c499-4aac-bc33-f378bfa8d491/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 357051517 Source-Link: googleapis/googleapis@f3a60f6 PiperOrigin-RevId: 356991675 Source-Link: googleapis/googleapis@dd89b0c
1 parent 77ca837 commit 15cd344

File tree

13 files changed

+239
-146
lines changed

13 files changed

+239
-146
lines changed

proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/BudgetAmount.java

Lines changed: 48 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,10 @@ public BudgetAmountCase getBudgetAmountCase() {
189189
*
190190
* <pre>
191191
* A specified amount to use as the budget.
192-
* `currency_code` is optional. If specified, it must match the
193-
* currency of the billing account. The `currency_code` is provided on
194-
* output.
192+
* `currency_code` is optional. If specified when creating a budget, it must
193+
* match the currency of the billing account. If specified when updating a
194+
* budget, it must match the currency_code of the existing budget.
195+
* The `currency_code` is provided on output.
195196
* </pre>
196197
*
197198
* <code>.google.type.Money specified_amount = 1;</code>
@@ -207,9 +208,10 @@ public boolean hasSpecifiedAmount() {
207208
*
208209
* <pre>
209210
* A specified amount to use as the budget.
210-
* `currency_code` is optional. If specified, it must match the
211-
* currency of the billing account. The `currency_code` is provided on
212-
* output.
211+
* `currency_code` is optional. If specified when creating a budget, it must
212+
* match the currency of the billing account. If specified when updating a
213+
* budget, it must match the currency_code of the existing budget.
214+
* The `currency_code` is provided on output.
213215
* </pre>
214216
*
215217
* <code>.google.type.Money specified_amount = 1;</code>
@@ -228,9 +230,10 @@ public com.google.type.Money getSpecifiedAmount() {
228230
*
229231
* <pre>
230232
* A specified amount to use as the budget.
231-
* `currency_code` is optional. If specified, it must match the
232-
* currency of the billing account. The `currency_code` is provided on
233-
* output.
233+
* `currency_code` is optional. If specified when creating a budget, it must
234+
* match the currency of the billing account. If specified when updating a
235+
* budget, it must match the currency_code of the existing budget.
236+
* The `currency_code` is provided on output.
234237
* </pre>
235238
*
236239
* <code>.google.type.Money specified_amount = 1;</code>
@@ -690,9 +693,10 @@ public Builder clearBudgetAmount() {
690693
*
691694
* <pre>
692695
* A specified amount to use as the budget.
693-
* `currency_code` is optional. If specified, it must match the
694-
* currency of the billing account. The `currency_code` is provided on
695-
* output.
696+
* `currency_code` is optional. If specified when creating a budget, it must
697+
* match the currency of the billing account. If specified when updating a
698+
* budget, it must match the currency_code of the existing budget.
699+
* The `currency_code` is provided on output.
696700
* </pre>
697701
*
698702
* <code>.google.type.Money specified_amount = 1;</code>
@@ -708,9 +712,10 @@ public boolean hasSpecifiedAmount() {
708712
*
709713
* <pre>
710714
* A specified amount to use as the budget.
711-
* `currency_code` is optional. If specified, it must match the
712-
* currency of the billing account. The `currency_code` is provided on
713-
* output.
715+
* `currency_code` is optional. If specified when creating a budget, it must
716+
* match the currency of the billing account. If specified when updating a
717+
* budget, it must match the currency_code of the existing budget.
718+
* The `currency_code` is provided on output.
714719
* </pre>
715720
*
716721
* <code>.google.type.Money specified_amount = 1;</code>
@@ -736,9 +741,10 @@ public com.google.type.Money getSpecifiedAmount() {
736741
*
737742
* <pre>
738743
* A specified amount to use as the budget.
739-
* `currency_code` is optional. If specified, it must match the
740-
* currency of the billing account. The `currency_code` is provided on
741-
* output.
744+
* `currency_code` is optional. If specified when creating a budget, it must
745+
* match the currency of the billing account. If specified when updating a
746+
* budget, it must match the currency_code of the existing budget.
747+
* The `currency_code` is provided on output.
742748
* </pre>
743749
*
744750
* <code>.google.type.Money specified_amount = 1;</code>
@@ -761,9 +767,10 @@ public Builder setSpecifiedAmount(com.google.type.Money value) {
761767
*
762768
* <pre>
763769
* A specified amount to use as the budget.
764-
* `currency_code` is optional. If specified, it must match the
765-
* currency of the billing account. The `currency_code` is provided on
766-
* output.
770+
* `currency_code` is optional. If specified when creating a budget, it must
771+
* match the currency of the billing account. If specified when updating a
772+
* budget, it must match the currency_code of the existing budget.
773+
* The `currency_code` is provided on output.
767774
* </pre>
768775
*
769776
* <code>.google.type.Money specified_amount = 1;</code>
@@ -783,9 +790,10 @@ public Builder setSpecifiedAmount(com.google.type.Money.Builder builderForValue)
783790
*
784791
* <pre>
785792
* A specified amount to use as the budget.
786-
* `currency_code` is optional. If specified, it must match the
787-
* currency of the billing account. The `currency_code` is provided on
788-
* output.
793+
* `currency_code` is optional. If specified when creating a budget, it must
794+
* match the currency of the billing account. If specified when updating a
795+
* budget, it must match the currency_code of the existing budget.
796+
* The `currency_code` is provided on output.
789797
* </pre>
790798
*
791799
* <code>.google.type.Money specified_amount = 1;</code>
@@ -815,9 +823,10 @@ public Builder mergeSpecifiedAmount(com.google.type.Money value) {
815823
*
816824
* <pre>
817825
* A specified amount to use as the budget.
818-
* `currency_code` is optional. If specified, it must match the
819-
* currency of the billing account. The `currency_code` is provided on
820-
* output.
826+
* `currency_code` is optional. If specified when creating a budget, it must
827+
* match the currency of the billing account. If specified when updating a
828+
* budget, it must match the currency_code of the existing budget.
829+
* The `currency_code` is provided on output.
821830
* </pre>
822831
*
823832
* <code>.google.type.Money specified_amount = 1;</code>
@@ -843,9 +852,10 @@ public Builder clearSpecifiedAmount() {
843852
*
844853
* <pre>
845854
* A specified amount to use as the budget.
846-
* `currency_code` is optional. If specified, it must match the
847-
* currency of the billing account. The `currency_code` is provided on
848-
* output.
855+
* `currency_code` is optional. If specified when creating a budget, it must
856+
* match the currency of the billing account. If specified when updating a
857+
* budget, it must match the currency_code of the existing budget.
858+
* The `currency_code` is provided on output.
849859
* </pre>
850860
*
851861
* <code>.google.type.Money specified_amount = 1;</code>
@@ -858,9 +868,10 @@ public com.google.type.Money.Builder getSpecifiedAmountBuilder() {
858868
*
859869
* <pre>
860870
* A specified amount to use as the budget.
861-
* `currency_code` is optional. If specified, it must match the
862-
* currency of the billing account. The `currency_code` is provided on
863-
* output.
871+
* `currency_code` is optional. If specified when creating a budget, it must
872+
* match the currency of the billing account. If specified when updating a
873+
* budget, it must match the currency_code of the existing budget.
874+
* The `currency_code` is provided on output.
864875
* </pre>
865876
*
866877
* <code>.google.type.Money specified_amount = 1;</code>
@@ -881,9 +892,10 @@ public com.google.type.MoneyOrBuilder getSpecifiedAmountOrBuilder() {
881892
*
882893
* <pre>
883894
* A specified amount to use as the budget.
884-
* `currency_code` is optional. If specified, it must match the
885-
* currency of the billing account. The `currency_code` is provided on
886-
* output.
895+
* `currency_code` is optional. If specified when creating a budget, it must
896+
* match the currency of the billing account. If specified when updating a
897+
* budget, it must match the currency_code of the existing budget.
898+
* The `currency_code` is provided on output.
887899
* </pre>
888900
*
889901
* <code>.google.type.Money specified_amount = 1;</code>

proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/BudgetAmountOrBuilder.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ public interface BudgetAmountOrBuilder
2828
*
2929
* <pre>
3030
* A specified amount to use as the budget.
31-
* `currency_code` is optional. If specified, it must match the
32-
* currency of the billing account. The `currency_code` is provided on
33-
* output.
31+
* `currency_code` is optional. If specified when creating a budget, it must
32+
* match the currency of the billing account. If specified when updating a
33+
* budget, it must match the currency_code of the existing budget.
34+
* The `currency_code` is provided on output.
3435
* </pre>
3536
*
3637
* <code>.google.type.Money specified_amount = 1;</code>
@@ -43,9 +44,10 @@ public interface BudgetAmountOrBuilder
4344
*
4445
* <pre>
4546
* A specified amount to use as the budget.
46-
* `currency_code` is optional. If specified, it must match the
47-
* currency of the billing account. The `currency_code` is provided on
48-
* output.
47+
* `currency_code` is optional. If specified when creating a budget, it must
48+
* match the currency of the billing account. If specified when updating a
49+
* budget, it must match the currency_code of the existing budget.
50+
* The `currency_code` is provided on output.
4951
* </pre>
5052
*
5153
* <code>.google.type.Money specified_amount = 1;</code>
@@ -58,9 +60,10 @@ public interface BudgetAmountOrBuilder
5860
*
5961
* <pre>
6062
* A specified amount to use as the budget.
61-
* `currency_code` is optional. If specified, it must match the
62-
* currency of the billing account. The `currency_code` is provided on
63-
* output.
63+
* `currency_code` is optional. If specified when creating a budget, it must
64+
* match the currency of the billing account. If specified when updating a
65+
* budget, it must match the currency_code of the existing budget.
66+
* The `currency_code` is provided on output.
6467
* </pre>
6568
*
6669
* <code>.google.type.Money specified_amount = 1;</code>

proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/NotificationsRule.java

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,12 @@ public com.google.protobuf.ByteString getPubsubTopicBytes() {
215215
*
216216
*
217217
* <pre>
218-
* Optional. The schema version of the notification sent to `pubsub_topic`.
218+
* Optional. Required when
219+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]
220+
* is set. The schema version of the notification sent to
221+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic].
219222
* Only "1.0" is accepted. It represents the JSON schema as defined in
220-
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
223+
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
221224
* </pre>
222225
*
223226
* <code>string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
@@ -240,9 +243,12 @@ public java.lang.String getSchemaVersion() {
240243
*
241244
*
242245
* <pre>
243-
* Optional. The schema version of the notification sent to `pubsub_topic`.
246+
* Optional. Required when
247+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]
248+
* is set. The schema version of the notification sent to
249+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic].
244250
* Only "1.0" is accepted. It represents the JSON schema as defined in
245-
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
251+
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
246252
* </pre>
247253
*
248254
* <code>string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
@@ -931,9 +937,12 @@ public Builder setPubsubTopicBytes(com.google.protobuf.ByteString value) {
931937
*
932938
*
933939
* <pre>
934-
* Optional. The schema version of the notification sent to `pubsub_topic`.
940+
* Optional. Required when
941+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]
942+
* is set. The schema version of the notification sent to
943+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic].
935944
* Only "1.0" is accepted. It represents the JSON schema as defined in
936-
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
945+
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
937946
* </pre>
938947
*
939948
* <code>string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
@@ -955,9 +964,12 @@ public java.lang.String getSchemaVersion() {
955964
*
956965
*
957966
* <pre>
958-
* Optional. The schema version of the notification sent to `pubsub_topic`.
967+
* Optional. Required when
968+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]
969+
* is set. The schema version of the notification sent to
970+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic].
959971
* Only "1.0" is accepted. It represents the JSON schema as defined in
960-
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
972+
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
961973
* </pre>
962974
*
963975
* <code>string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
@@ -979,9 +991,12 @@ public com.google.protobuf.ByteString getSchemaVersionBytes() {
979991
*
980992
*
981993
* <pre>
982-
* Optional. The schema version of the notification sent to `pubsub_topic`.
994+
* Optional. Required when
995+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]
996+
* is set. The schema version of the notification sent to
997+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic].
983998
* Only "1.0" is accepted. It represents the JSON schema as defined in
984-
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
999+
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
9851000
* </pre>
9861001
*
9871002
* <code>string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
@@ -1002,9 +1017,12 @@ public Builder setSchemaVersion(java.lang.String value) {
10021017
*
10031018
*
10041019
* <pre>
1005-
* Optional. The schema version of the notification sent to `pubsub_topic`.
1020+
* Optional. Required when
1021+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]
1022+
* is set. The schema version of the notification sent to
1023+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic].
10061024
* Only "1.0" is accepted. It represents the JSON schema as defined in
1007-
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
1025+
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
10081026
* </pre>
10091027
*
10101028
* <code>string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
@@ -1021,9 +1039,12 @@ public Builder clearSchemaVersion() {
10211039
*
10221040
*
10231041
* <pre>
1024-
* Optional. The schema version of the notification sent to `pubsub_topic`.
1042+
* Optional. Required when
1043+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]
1044+
* is set. The schema version of the notification sent to
1045+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic].
10251046
* Only "1.0" is accepted. It represents the JSON schema as defined in
1026-
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
1047+
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
10271048
* </pre>
10281049
*
10291050
* <code>string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>

proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/NotificationsRuleOrBuilder.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,12 @@ public interface NotificationsRuleOrBuilder
7272
*
7373
*
7474
* <pre>
75-
* Optional. The schema version of the notification sent to `pubsub_topic`.
75+
* Optional. Required when
76+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]
77+
* is set. The schema version of the notification sent to
78+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic].
7679
* Only "1.0" is accepted. It represents the JSON schema as defined in
77-
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
80+
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
7881
* </pre>
7982
*
8083
* <code>string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
@@ -86,9 +89,12 @@ public interface NotificationsRuleOrBuilder
8689
*
8790
*
8891
* <pre>
89-
* Optional. The schema version of the notification sent to `pubsub_topic`.
92+
* Optional. Required when
93+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic]
94+
* is set. The schema version of the notification sent to
95+
* [NotificationsRule.pubsub_topic][google.cloud.billing.budgets.v1.NotificationsRule.pubsub_topic].
9096
* Only "1.0" is accepted. It represents the JSON schema as defined in
91-
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
97+
* https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
9298
* </pre>
9399
*
94100
* <code>string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL];</code>

proto-google-cloud-billingbudgets-v1/src/main/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.

0 commit comments

Comments
 (0)