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

Commit 7b4c0a7

Browse files
feat(v1beta1): added monitoring_notification_channels field to allow configuration of additional budget alert recipients (#203)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/e9c50d75-a1ba-4ad3-a81e-eb3c5e7845ef/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 320484049 Source-Link: googleapis/googleapis@50ae1c7
1 parent 3fb1ec0 commit 7b4c0a7

File tree

9 files changed

+756
-275
lines changed

9 files changed

+756
-275
lines changed

proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRule.java

Lines changed: 415 additions & 41 deletions
Large diffs are not rendered by default.

proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRuleOrBuilder.java

Lines changed: 89 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public interface AllUpdatesRuleOrBuilder
2727
*
2828
*
2929
* <pre>
30-
* Required. The name of the Cloud Pub/Sub topic where budget related messages will be
31-
* published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
32-
* are sent at regular intervals to the topic.
33-
* The topic needs to be created before the budget is created; see
30+
* Required. The name of the Cloud Pub/Sub topic where budget related messages
31+
* will be published, in the form `projects/{project_id}/topics/{topic_id}`.
32+
* Updates are sent at regular intervals to the topic. The topic needs to be
33+
* created before the budget is created; see
3434
* https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
3535
* for more details.
3636
* Caller is expected to have
@@ -49,10 +49,10 @@ public interface AllUpdatesRuleOrBuilder
4949
*
5050
*
5151
* <pre>
52-
* Required. The name of the Cloud Pub/Sub topic where budget related messages will be
53-
* published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
54-
* are sent at regular intervals to the topic.
55-
* The topic needs to be created before the budget is created; see
52+
* Required. The name of the Cloud Pub/Sub topic where budget related messages
53+
* will be published, in the form `projects/{project_id}/topics/{topic_id}`.
54+
* Updates are sent at regular intervals to the topic. The topic needs to be
55+
* created before the budget is created; see
5656
* https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
5757
* for more details.
5858
* Caller is expected to have
@@ -72,7 +72,7 @@ public interface AllUpdatesRuleOrBuilder
7272
*
7373
*
7474
* <pre>
75-
* Required. The schema version of the notification.
75+
* Required. The schema version of the notification sent to `pubsub_topic`.
7676
* Only "1.0" is accepted. It represents the JSON schema as defined in
7777
* https://cloud.google.com/billing/docs/how-to/budgets#notification_format
7878
* </pre>
@@ -86,7 +86,7 @@ public interface AllUpdatesRuleOrBuilder
8686
*
8787
*
8888
* <pre>
89-
* Required. The schema version of the notification.
89+
* Required. The schema version of the notification sent to `pubsub_topic`.
9090
* Only "1.0" is accepted. It represents the JSON schema as defined in
9191
* https://cloud.google.com/billing/docs/how-to/budgets#notification_format
9292
* </pre>
@@ -96,4 +96,83 @@ public interface AllUpdatesRuleOrBuilder
9696
* @return The bytes for schemaVersion.
9797
*/
9898
com.google.protobuf.ByteString getSchemaVersionBytes();
99+
100+
/**
101+
*
102+
*
103+
* <pre>
104+
* Optional. Targets to send notifications to when a threshold is exceeded.
105+
* This is in addition to default recipients who have billing account roles.
106+
* The value is the full REST resource name of a monitoring notification
107+
* channel with the form
108+
* `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
109+
* channels are allowed.
110+
* </pre>
111+
*
112+
* <code>
113+
* repeated string monitoring_notification_channels = 3 [(.google.api.field_behavior) = OPTIONAL];
114+
* </code>
115+
*
116+
* @return A list containing the monitoringNotificationChannels.
117+
*/
118+
java.util.List<java.lang.String> getMonitoringNotificationChannelsList();
119+
/**
120+
*
121+
*
122+
* <pre>
123+
* Optional. Targets to send notifications to when a threshold is exceeded.
124+
* This is in addition to default recipients who have billing account roles.
125+
* The value is the full REST resource name of a monitoring notification
126+
* channel with the form
127+
* `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
128+
* channels are allowed.
129+
* </pre>
130+
*
131+
* <code>
132+
* repeated string monitoring_notification_channels = 3 [(.google.api.field_behavior) = OPTIONAL];
133+
* </code>
134+
*
135+
* @return The count of monitoringNotificationChannels.
136+
*/
137+
int getMonitoringNotificationChannelsCount();
138+
/**
139+
*
140+
*
141+
* <pre>
142+
* Optional. Targets to send notifications to when a threshold is exceeded.
143+
* This is in addition to default recipients who have billing account roles.
144+
* The value is the full REST resource name of a monitoring notification
145+
* channel with the form
146+
* `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
147+
* channels are allowed.
148+
* </pre>
149+
*
150+
* <code>
151+
* repeated string monitoring_notification_channels = 3 [(.google.api.field_behavior) = OPTIONAL];
152+
* </code>
153+
*
154+
* @param index The index of the element to return.
155+
* @return The monitoringNotificationChannels at the given index.
156+
*/
157+
java.lang.String getMonitoringNotificationChannels(int index);
158+
/**
159+
*
160+
*
161+
* <pre>
162+
* Optional. Targets to send notifications to when a threshold is exceeded.
163+
* This is in addition to default recipients who have billing account roles.
164+
* The value is the full REST resource name of a monitoring notification
165+
* channel with the form
166+
* `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
167+
* channels are allowed.
168+
* </pre>
169+
*
170+
* <code>
171+
* repeated string monitoring_notification_channels = 3 [(.google.api.field_behavior) = OPTIONAL];
172+
* </code>
173+
*
174+
* @param index The index of the value to return.
175+
* @return The bytes of the monitoringNotificationChannels at the given index.
176+
*/
177+
com.google.protobuf.ByteString getMonitoringNotificationChannelsBytes(int index);
99178
}

proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/Budget.java

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ public com.google.cloud.billing.budgets.v1beta1.ThresholdRuleOrBuilder getThresh
507507
*
508508
*
509509
* <pre>
510-
* Optional. Rules to apply to all updates to the actual spend, regardless
511-
* of the thresholds set in `threshold_rules`.
510+
* Optional. Rules to apply to notifications sent based on budget spend and
511+
* thresholds.
512512
* </pre>
513513
*
514514
* <code>
@@ -525,8 +525,8 @@ public boolean hasAllUpdatesRule() {
525525
*
526526
*
527527
* <pre>
528-
* Optional. Rules to apply to all updates to the actual spend, regardless
529-
* of the thresholds set in `threshold_rules`.
528+
* Optional. Rules to apply to notifications sent based on budget spend and
529+
* thresholds.
530530
* </pre>
531531
*
532532
* <code>
@@ -545,8 +545,8 @@ public com.google.cloud.billing.budgets.v1beta1.AllUpdatesRule getAllUpdatesRule
545545
*
546546
*
547547
* <pre>
548-
* Optional. Rules to apply to all updates to the actual spend, regardless
549-
* of the thresholds set in `threshold_rules`.
548+
* Optional. Rules to apply to notifications sent based on budget spend and
549+
* thresholds.
550550
* </pre>
551551
*
552552
* <code>
@@ -2179,8 +2179,8 @@ public com.google.cloud.billing.budgets.v1beta1.ThresholdRule.Builder addThresho
21792179
*
21802180
*
21812181
* <pre>
2182-
* Optional. Rules to apply to all updates to the actual spend, regardless
2183-
* of the thresholds set in `threshold_rules`.
2182+
* Optional. Rules to apply to notifications sent based on budget spend and
2183+
* thresholds.
21842184
* </pre>
21852185
*
21862186
* <code>
@@ -2196,8 +2196,8 @@ public boolean hasAllUpdatesRule() {
21962196
*
21972197
*
21982198
* <pre>
2199-
* Optional. Rules to apply to all updates to the actual spend, regardless
2200-
* of the thresholds set in `threshold_rules`.
2199+
* Optional. Rules to apply to notifications sent based on budget spend and
2200+
* thresholds.
22012201
* </pre>
22022202
*
22032203
* <code>
@@ -2219,8 +2219,8 @@ public com.google.cloud.billing.budgets.v1beta1.AllUpdatesRule getAllUpdatesRule
22192219
*
22202220
*
22212221
* <pre>
2222-
* Optional. Rules to apply to all updates to the actual spend, regardless
2223-
* of the thresholds set in `threshold_rules`.
2222+
* Optional. Rules to apply to notifications sent based on budget spend and
2223+
* thresholds.
22242224
* </pre>
22252225
*
22262226
* <code>
@@ -2245,8 +2245,8 @@ public Builder setAllUpdatesRule(
22452245
*
22462246
*
22472247
* <pre>
2248-
* Optional. Rules to apply to all updates to the actual spend, regardless
2249-
* of the thresholds set in `threshold_rules`.
2248+
* Optional. Rules to apply to notifications sent based on budget spend and
2249+
* thresholds.
22502250
* </pre>
22512251
*
22522252
* <code>
@@ -2268,8 +2268,8 @@ public Builder setAllUpdatesRule(
22682268
*
22692269
*
22702270
* <pre>
2271-
* Optional. Rules to apply to all updates to the actual spend, regardless
2272-
* of the thresholds set in `threshold_rules`.
2271+
* Optional. Rules to apply to notifications sent based on budget spend and
2272+
* thresholds.
22732273
* </pre>
22742274
*
22752275
* <code>
@@ -2298,8 +2298,8 @@ public Builder mergeAllUpdatesRule(
22982298
*
22992299
*
23002300
* <pre>
2301-
* Optional. Rules to apply to all updates to the actual spend, regardless
2302-
* of the thresholds set in `threshold_rules`.
2301+
* Optional. Rules to apply to notifications sent based on budget spend and
2302+
* thresholds.
23032303
* </pre>
23042304
*
23052305
* <code>
@@ -2321,8 +2321,8 @@ public Builder clearAllUpdatesRule() {
23212321
*
23222322
*
23232323
* <pre>
2324-
* Optional. Rules to apply to all updates to the actual spend, regardless
2325-
* of the thresholds set in `threshold_rules`.
2324+
* Optional. Rules to apply to notifications sent based on budget spend and
2325+
* thresholds.
23262326
* </pre>
23272327
*
23282328
* <code>
@@ -2339,8 +2339,8 @@ public Builder clearAllUpdatesRule() {
23392339
*
23402340
*
23412341
* <pre>
2342-
* Optional. Rules to apply to all updates to the actual spend, regardless
2343-
* of the thresholds set in `threshold_rules`.
2342+
* Optional. Rules to apply to notifications sent based on budget spend and
2343+
* thresholds.
23442344
* </pre>
23452345
*
23462346
* <code>
@@ -2361,8 +2361,8 @@ public Builder clearAllUpdatesRule() {
23612361
*
23622362
*
23632363
* <pre>
2364-
* Optional. Rules to apply to all updates to the actual spend, regardless
2365-
* of the thresholds set in `threshold_rules`.
2364+
* Optional. Rules to apply to notifications sent based on budget spend and
2365+
* thresholds.
23662366
* </pre>
23672367
*
23682368
* <code>

proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetModel.java

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
9191
+ "cloud.billing.budgets.v1beta1.ThresholdR"
9292
+ "ule.BasisB\003\340A\001\"G\n\005Basis\022\025\n\021BASIS_UNSPECI"
9393
+ "FIED\020\000\022\021\n\rCURRENT_SPEND\020\001\022\024\n\020FORECASTED_"
94-
+ "SPEND\020\002\"H\n\016AllUpdatesRule\022\031\n\014pubsub_topi"
94+
+ "SPEND\020\002\"w\n\016AllUpdatesRule\022\031\n\014pubsub_topi"
9595
+ "c\030\001 \001(\tB\003\340A\002\022\033\n\016schema_version\030\002 \001(\tB\003\340A"
96-
+ "\002\"\304\003\n\006Filter\022\025\n\010projects\030\001 \003(\tB\003\340A\001\022f\n\026c"
97-
+ "redit_types_treatment\030\004 \001(\0162A.google.clo"
98-
+ "ud.billing.budgets.v1beta1.Filter.Credit"
99-
+ "TypesTreatmentB\003\340A\001\022\025\n\010services\030\003 \003(\tB\003\340"
100-
+ "A\001\022\030\n\013subaccounts\030\005 \003(\tB\003\340A\001\022M\n\006labels\030\006"
101-
+ " \003(\01328.google.cloud.billing.budgets.v1be"
102-
+ "ta1.Filter.LabelsEntryB\003\340A\001\032I\n\013LabelsEnt"
103-
+ "ry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.google."
104-
+ "protobuf.ListValue:\0028\001\"p\n\024CreditTypesTre"
105-
+ "atment\022&\n\"CREDIT_TYPES_TREATMENT_UNSPECI"
106-
+ "FIED\020\000\022\027\n\023INCLUDE_ALL_CREDITS\020\001\022\027\n\023EXCLU"
107-
+ "DE_ALL_CREDITS\020\002By\n(com.google.cloud.bil"
108-
+ "ling.budgets.v1beta1P\001ZKgoogle.golang.or"
109-
+ "g/genproto/googleapis/cloud/billing/budg"
110-
+ "ets/v1beta1;budgetsb\006proto3"
96+
+ "\002\022-\n monitoring_notification_channels\030\003 "
97+
+ "\003(\tB\003\340A\001\"\304\003\n\006Filter\022\025\n\010projects\030\001 \003(\tB\003\340"
98+
+ "A\001\022f\n\026credit_types_treatment\030\004 \001(\0162A.goo"
99+
+ "gle.cloud.billing.budgets.v1beta1.Filter"
100+
+ ".CreditTypesTreatmentB\003\340A\001\022\025\n\010services\030\003"
101+
+ " \003(\tB\003\340A\001\022\030\n\013subaccounts\030\005 \003(\tB\003\340A\001\022M\n\006l"
102+
+ "abels\030\006 \003(\01328.google.cloud.billing.budge"
103+
+ "ts.v1beta1.Filter.LabelsEntryB\003\340A\001\032I\n\013La"
104+
+ "belsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032."
105+
+ "google.protobuf.ListValue:\0028\001\"p\n\024CreditT"
106+
+ "ypesTreatment\022&\n\"CREDIT_TYPES_TREATMENT_"
107+
+ "UNSPECIFIED\020\000\022\027\n\023INCLUDE_ALL_CREDITS\020\001\022\027"
108+
+ "\n\023EXCLUDE_ALL_CREDITS\020\002By\n(com.google.cl"
109+
+ "oud.billing.budgets.v1beta1P\001ZKgoogle.go"
110+
+ "lang.org/genproto/googleapis/cloud/billi"
111+
+ "ng/budgets/v1beta1;budgetsb\006proto3"
111112
};
112113
descriptor =
113114
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -160,7 +161,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
160161
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
161162
internal_static_google_cloud_billing_budgets_v1beta1_AllUpdatesRule_descriptor,
162163
new java.lang.String[] {
163-
"PubsubTopic", "SchemaVersion",
164+
"PubsubTopic", "SchemaVersion", "MonitoringNotificationChannels",
164165
});
165166
internal_static_google_cloud_billing_budgets_v1beta1_Filter_descriptor =
166167
getDescriptor().getMessageTypes().get(5);

proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetOrBuilder.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ com.google.cloud.billing.budgets.v1beta1.ThresholdRuleOrBuilder getThresholdRule
236236
*
237237
*
238238
* <pre>
239-
* Optional. Rules to apply to all updates to the actual spend, regardless
240-
* of the thresholds set in `threshold_rules`.
239+
* Optional. Rules to apply to notifications sent based on budget spend and
240+
* thresholds.
241241
* </pre>
242242
*
243243
* <code>
@@ -251,8 +251,8 @@ com.google.cloud.billing.budgets.v1beta1.ThresholdRuleOrBuilder getThresholdRule
251251
*
252252
*
253253
* <pre>
254-
* Optional. Rules to apply to all updates to the actual spend, regardless
255-
* of the thresholds set in `threshold_rules`.
254+
* Optional. Rules to apply to notifications sent based on budget spend and
255+
* thresholds.
256256
* </pre>
257257
*
258258
* <code>
@@ -266,8 +266,8 @@ com.google.cloud.billing.budgets.v1beta1.ThresholdRuleOrBuilder getThresholdRule
266266
*
267267
*
268268
* <pre>
269-
* Optional. Rules to apply to all updates to the actual spend, regardless
270-
* of the thresholds set in `threshold_rules`.
269+
* Optional. Rules to apply to notifications sent based on budget spend and
270+
* thresholds.
271271
* </pre>
272272
*
273273
* <code>

0 commit comments

Comments
 (0)