From fb62c26624f4990bdfb8801fceeae52f20539a0e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 21 Sep 2020 14:59:46 -0700 Subject: [PATCH] feat: added support for field to disable default budget alerts to IAM recipients (#234) fix: Pub/Sub fields in AllUpdatesRule are now optional fix: Added cloud-billing OAuth scope. * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * feat: Added support for field to disable default budget alerts to IAM recipients. fix: Pub/Sub fields in AllUpdatesRule are now optional. fix: Added cloud-billing OAuth scope. PiperOrigin-RevId: 331675651 Source-Author: Google APIs Source-Date: Mon Sep 14 18:43:01 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 921ce41f94a74905ca753c72a4d4cc43600003d3 Source-Link: https://github.com/googleapis/googleapis/commit/921ce41f94a74905ca753c72a4d4cc43600003d3 --- .../stub/BudgetServiceStubSettings.java | 5 +- .../budgets/v1beta1/AllUpdatesRule.java | 344 ++++++++++++------ .../v1beta1/AllUpdatesRuleOrBuilder.java | 87 +++-- .../billing/budgets/v1beta1/BudgetModel.java | 42 ++- .../v1beta1/BudgetServiceOuterClass.java | 15 +- .../cloud/billing/budgets/v1beta1/Filter.java | 104 +++--- .../budgets/v1beta1/FilterOrBuilder.java | 32 +- .../budgets/v1beta1/budget_model.proto | 40 +- .../budgets/v1beta1/budget_service.proto | 7 +- synth.metadata | 4 +- 10 files changed, 425 insertions(+), 255 deletions(-) diff --git a/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/stub/BudgetServiceStubSettings.java b/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/stub/BudgetServiceStubSettings.java index f3faef6a..2fe0ec8f 100644 --- a/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/stub/BudgetServiceStubSettings.java +++ b/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/stub/BudgetServiceStubSettings.java @@ -93,7 +93,10 @@ public class BudgetServiceStubSettings 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-platform") + .build(); private final UnaryCallSettings createBudgetSettings; private final UnaryCallSettings updateBudgetSettings; diff --git a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRule.java b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRule.java index ad21a998..43308971 100644 --- a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRule.java +++ b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRule.java @@ -98,6 +98,11 @@ private AllUpdatesRule( monitoringNotificationChannels_.add(s); break; } + case 32: + { + disableDefaultIamRecipients_ = input.readBool(); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -141,8 +146,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The name of the Cloud Pub/Sub topic where budget related messages
-   * will be published, in the form `projects/{project_id}/topics/{topic_id}`.
+   * Optional. The name of the Pub/Sub topic where budget related messages will
+   * be published, in the form `projects/{project_id}/topics/{topic_id}`.
    * Updates are sent at regular intervals to the topic. The topic needs to be
    * created before the budget is created; see
    * https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
@@ -150,11 +155,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * Caller is expected to have
    * `pubsub.topics.setIamPolicy` permission on the topic when it's set for a
    * budget, otherwise, the API call will fail with PERMISSION_DENIED. See
-   * https://cloud.google.com/pubsub/docs/access-control for more details on
-   * Pub/Sub roles and permissions.
+   * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
+   * for more details on Pub/Sub roles and permissions.
    * 
* - * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pubsubTopic. */ @@ -174,8 +179,8 @@ public java.lang.String getPubsubTopic() { * * *
-   * Required. The name of the Cloud Pub/Sub topic where budget related messages
-   * will be published, in the form `projects/{project_id}/topics/{topic_id}`.
+   * Optional. The name of the Pub/Sub topic where budget related messages will
+   * be published, in the form `projects/{project_id}/topics/{topic_id}`.
    * Updates are sent at regular intervals to the topic. The topic needs to be
    * created before the budget is created; see
    * https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
@@ -183,11 +188,11 @@ public java.lang.String getPubsubTopic() {
    * Caller is expected to have
    * `pubsub.topics.setIamPolicy` permission on the topic when it's set for a
    * budget, otherwise, the API call will fail with PERMISSION_DENIED. See
-   * https://cloud.google.com/pubsub/docs/access-control for more details on
-   * Pub/Sub roles and permissions.
+   * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
+   * for more details on Pub/Sub roles and permissions.
    * 
* - * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pubsubTopic. */ @@ -210,12 +215,12 @@ public com.google.protobuf.ByteString getPubsubTopicBytes() { * * *
-   * Required. The schema version of the notification sent to `pubsub_topic`.
+   * Optional. The schema version of the notification sent to `pubsub_topic`.
    * Only "1.0" is accepted. It represents the JSON schema as defined in
-   * https://cloud.google.com/billing/docs/how-to/budgets#notification_format
+   * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
    * 
* - * string schema_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The schemaVersion. */ @@ -235,12 +240,12 @@ public java.lang.String getSchemaVersion() { * * *
-   * Required. The schema version of the notification sent to `pubsub_topic`.
+   * Optional. The schema version of the notification sent to `pubsub_topic`.
    * Only "1.0" is accepted. It represents the JSON schema as defined in
-   * https://cloud.google.com/billing/docs/how-to/budgets#notification_format
+   * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
    * 
* - * string schema_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for schemaVersion. */ @@ -264,11 +269,13 @@ public com.google.protobuf.ByteString getSchemaVersionBytes() { * *
    * Optional. Targets to send notifications to when a threshold is exceeded.
-   * This is in addition to default recipients who have billing account roles.
-   * The value is the full REST resource name of a monitoring notification
-   * channel with the form
+   * This is in addition to default recipients who have billing account IAM
+   * roles. The value is the full REST resource name of a monitoring
+   * notification channel with the form
    * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-   * channels are allowed.
+   * channels are allowed. See
+   * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+   * for more details.
    * 
* * @@ -285,11 +292,13 @@ public com.google.protobuf.ProtocolStringList getMonitoringNotificationChannelsL * *
    * Optional. Targets to send notifications to when a threshold is exceeded.
-   * This is in addition to default recipients who have billing account roles.
-   * The value is the full REST resource name of a monitoring notification
-   * channel with the form
+   * This is in addition to default recipients who have billing account IAM
+   * roles. The value is the full REST resource name of a monitoring
+   * notification channel with the form
    * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-   * channels are allowed.
+   * channels are allowed. See
+   * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+   * for more details.
    * 
* * @@ -306,11 +315,13 @@ public int getMonitoringNotificationChannelsCount() { * *
    * Optional. Targets to send notifications to when a threshold is exceeded.
-   * This is in addition to default recipients who have billing account roles.
-   * The value is the full REST resource name of a monitoring notification
-   * channel with the form
+   * This is in addition to default recipients who have billing account IAM
+   * roles. The value is the full REST resource name of a monitoring
+   * notification channel with the form
    * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-   * channels are allowed.
+   * channels are allowed. See
+   * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+   * for more details.
    * 
* * @@ -328,11 +339,13 @@ public java.lang.String getMonitoringNotificationChannels(int index) { * *
    * Optional. Targets to send notifications to when a threshold is exceeded.
-   * This is in addition to default recipients who have billing account roles.
-   * The value is the full REST resource name of a monitoring notification
-   * channel with the form
+   * This is in addition to default recipients who have billing account IAM
+   * roles. The value is the full REST resource name of a monitoring
+   * notification channel with the form
    * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-   * channels are allowed.
+   * channels are allowed. See
+   * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+   * for more details.
    * 
* * @@ -346,6 +359,26 @@ public com.google.protobuf.ByteString getMonitoringNotificationChannelsBytes(int return monitoringNotificationChannels_.getByteString(index); } + public static final int DISABLE_DEFAULT_IAM_RECIPIENTS_FIELD_NUMBER = 4; + private boolean disableDefaultIamRecipients_; + /** + * + * + *
+   * Optional. When set to true, disables default notifications sent when a
+   * threshold is exceeded. Recipients are those with Billing Account
+   * Administrators and Billing Account Users IAM roles for the target account.
+   * 
+ * + * bool disable_default_iam_recipients = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableDefaultIamRecipients. + */ + @java.lang.Override + public boolean getDisableDefaultIamRecipients() { + return disableDefaultIamRecipients_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -370,6 +403,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 3, monitoringNotificationChannels_.getRaw(i)); } + if (disableDefaultIamRecipients_ != false) { + output.writeBool(4, disableDefaultIamRecipients_); + } unknownFields.writeTo(output); } @@ -393,6 +429,10 @@ public int getSerializedSize() { size += dataSize; size += 1 * getMonitoringNotificationChannelsList().size(); } + if (disableDefaultIamRecipients_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(4, disableDefaultIamRecipients_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -413,6 +453,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSchemaVersion().equals(other.getSchemaVersion())) return false; if (!getMonitoringNotificationChannelsList() .equals(other.getMonitoringNotificationChannelsList())) return false; + if (getDisableDefaultIamRecipients() != other.getDisableDefaultIamRecipients()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -432,6 +473,8 @@ public int hashCode() { hash = (37 * hash) + MONITORING_NOTIFICATION_CHANNELS_FIELD_NUMBER; hash = (53 * hash) + getMonitoringNotificationChannelsList().hashCode(); } + hash = (37 * hash) + DISABLE_DEFAULT_IAM_RECIPIENTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableDefaultIamRecipients()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -585,6 +628,8 @@ public Builder clear() { monitoringNotificationChannels_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); + disableDefaultIamRecipients_ = false; + return this; } @@ -620,6 +665,7 @@ public com.google.cloud.billing.budgets.v1beta1.AllUpdatesRule buildPartial() { bitField0_ = (bitField0_ & ~0x00000001); } result.monitoringNotificationChannels_ = monitoringNotificationChannels_; + result.disableDefaultIamRecipients_ = disableDefaultIamRecipients_; onBuilt(); return result; } @@ -688,6 +734,9 @@ public Builder mergeFrom(com.google.cloud.billing.budgets.v1beta1.AllUpdatesRule } onChanged(); } + if (other.getDisableDefaultIamRecipients() != false) { + setDisableDefaultIamRecipients(other.getDisableDefaultIamRecipients()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -725,8 +774,8 @@ public Builder mergeFrom( * * *
-     * Required. The name of the Cloud Pub/Sub topic where budget related messages
-     * will be published, in the form `projects/{project_id}/topics/{topic_id}`.
+     * Optional. The name of the Pub/Sub topic where budget related messages will
+     * be published, in the form `projects/{project_id}/topics/{topic_id}`.
      * Updates are sent at regular intervals to the topic. The topic needs to be
      * created before the budget is created; see
      * https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
@@ -734,11 +783,11 @@ public Builder mergeFrom(
      * Caller is expected to have
      * `pubsub.topics.setIamPolicy` permission on the topic when it's set for a
      * budget, otherwise, the API call will fail with PERMISSION_DENIED. See
-     * https://cloud.google.com/pubsub/docs/access-control for more details on
-     * Pub/Sub roles and permissions.
+     * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
+     * for more details on Pub/Sub roles and permissions.
      * 
* - * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pubsubTopic. */ @@ -757,8 +806,8 @@ public java.lang.String getPubsubTopic() { * * *
-     * Required. The name of the Cloud Pub/Sub topic where budget related messages
-     * will be published, in the form `projects/{project_id}/topics/{topic_id}`.
+     * Optional. The name of the Pub/Sub topic where budget related messages will
+     * be published, in the form `projects/{project_id}/topics/{topic_id}`.
      * Updates are sent at regular intervals to the topic. The topic needs to be
      * created before the budget is created; see
      * https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
@@ -766,11 +815,11 @@ public java.lang.String getPubsubTopic() {
      * Caller is expected to have
      * `pubsub.topics.setIamPolicy` permission on the topic when it's set for a
      * budget, otherwise, the API call will fail with PERMISSION_DENIED. See
-     * https://cloud.google.com/pubsub/docs/access-control for more details on
-     * Pub/Sub roles and permissions.
+     * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
+     * for more details on Pub/Sub roles and permissions.
      * 
* - * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pubsubTopic. */ @@ -789,8 +838,8 @@ public com.google.protobuf.ByteString getPubsubTopicBytes() { * * *
-     * Required. The name of the Cloud Pub/Sub topic where budget related messages
-     * will be published, in the form `projects/{project_id}/topics/{topic_id}`.
+     * Optional. The name of the Pub/Sub topic where budget related messages will
+     * be published, in the form `projects/{project_id}/topics/{topic_id}`.
      * Updates are sent at regular intervals to the topic. The topic needs to be
      * created before the budget is created; see
      * https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
@@ -798,11 +847,11 @@ public com.google.protobuf.ByteString getPubsubTopicBytes() {
      * Caller is expected to have
      * `pubsub.topics.setIamPolicy` permission on the topic when it's set for a
      * budget, otherwise, the API call will fail with PERMISSION_DENIED. See
-     * https://cloud.google.com/pubsub/docs/access-control for more details on
-     * Pub/Sub roles and permissions.
+     * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
+     * for more details on Pub/Sub roles and permissions.
      * 
* - * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pubsubTopic to set. * @return This builder for chaining. @@ -820,8 +869,8 @@ public Builder setPubsubTopic(java.lang.String value) { * * *
-     * Required. The name of the Cloud Pub/Sub topic where budget related messages
-     * will be published, in the form `projects/{project_id}/topics/{topic_id}`.
+     * Optional. The name of the Pub/Sub topic where budget related messages will
+     * be published, in the form `projects/{project_id}/topics/{topic_id}`.
      * Updates are sent at regular intervals to the topic. The topic needs to be
      * created before the budget is created; see
      * https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
@@ -829,11 +878,11 @@ public Builder setPubsubTopic(java.lang.String value) {
      * Caller is expected to have
      * `pubsub.topics.setIamPolicy` permission on the topic when it's set for a
      * budget, otherwise, the API call will fail with PERMISSION_DENIED. See
-     * https://cloud.google.com/pubsub/docs/access-control for more details on
-     * Pub/Sub roles and permissions.
+     * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
+     * for more details on Pub/Sub roles and permissions.
      * 
* - * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -847,8 +896,8 @@ public Builder clearPubsubTopic() { * * *
-     * Required. The name of the Cloud Pub/Sub topic where budget related messages
-     * will be published, in the form `projects/{project_id}/topics/{topic_id}`.
+     * Optional. The name of the Pub/Sub topic where budget related messages will
+     * be published, in the form `projects/{project_id}/topics/{topic_id}`.
      * Updates are sent at regular intervals to the topic. The topic needs to be
      * created before the budget is created; see
      * https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
@@ -856,11 +905,11 @@ public Builder clearPubsubTopic() {
      * Caller is expected to have
      * `pubsub.topics.setIamPolicy` permission on the topic when it's set for a
      * budget, otherwise, the API call will fail with PERMISSION_DENIED. See
-     * https://cloud.google.com/pubsub/docs/access-control for more details on
-     * Pub/Sub roles and permissions.
+     * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
+     * for more details on Pub/Sub roles and permissions.
      * 
* - * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pubsubTopic to set. * @return This builder for chaining. @@ -881,12 +930,12 @@ public Builder setPubsubTopicBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. The schema version of the notification sent to `pubsub_topic`.
+     * Optional. The schema version of the notification sent to `pubsub_topic`.
      * Only "1.0" is accepted. It represents the JSON schema as defined in
-     * https://cloud.google.com/billing/docs/how-to/budgets#notification_format
+     * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
      * 
* - * string schema_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The schemaVersion. */ @@ -905,12 +954,12 @@ public java.lang.String getSchemaVersion() { * * *
-     * Required. The schema version of the notification sent to `pubsub_topic`.
+     * Optional. The schema version of the notification sent to `pubsub_topic`.
      * Only "1.0" is accepted. It represents the JSON schema as defined in
-     * https://cloud.google.com/billing/docs/how-to/budgets#notification_format
+     * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
      * 
* - * string schema_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for schemaVersion. */ @@ -929,12 +978,12 @@ public com.google.protobuf.ByteString getSchemaVersionBytes() { * * *
-     * Required. The schema version of the notification sent to `pubsub_topic`.
+     * Optional. The schema version of the notification sent to `pubsub_topic`.
      * Only "1.0" is accepted. It represents the JSON schema as defined in
-     * https://cloud.google.com/billing/docs/how-to/budgets#notification_format
+     * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
      * 
* - * string schema_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The schemaVersion to set. * @return This builder for chaining. @@ -952,12 +1001,12 @@ public Builder setSchemaVersion(java.lang.String value) { * * *
-     * Required. The schema version of the notification sent to `pubsub_topic`.
+     * Optional. The schema version of the notification sent to `pubsub_topic`.
      * Only "1.0" is accepted. It represents the JSON schema as defined in
-     * https://cloud.google.com/billing/docs/how-to/budgets#notification_format
+     * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
      * 
* - * string schema_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -971,12 +1020,12 @@ public Builder clearSchemaVersion() { * * *
-     * Required. The schema version of the notification sent to `pubsub_topic`.
+     * Optional. The schema version of the notification sent to `pubsub_topic`.
      * Only "1.0" is accepted. It represents the JSON schema as defined in
-     * https://cloud.google.com/billing/docs/how-to/budgets#notification_format
+     * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
      * 
* - * string schema_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for schemaVersion to set. * @return This builder for chaining. @@ -1007,11 +1056,13 @@ private void ensureMonitoringNotificationChannelsIsMutable() { * *
      * Optional. Targets to send notifications to when a threshold is exceeded.
-     * This is in addition to default recipients who have billing account roles.
-     * The value is the full REST resource name of a monitoring notification
-     * channel with the form
+     * This is in addition to default recipients who have billing account IAM
+     * roles. The value is the full REST resource name of a monitoring
+     * notification channel with the form
      * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-     * channels are allowed.
+     * channels are allowed. See
+     * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+     * for more details.
      * 
* * @@ -1028,11 +1079,13 @@ public com.google.protobuf.ProtocolStringList getMonitoringNotificationChannelsL * *
      * Optional. Targets to send notifications to when a threshold is exceeded.
-     * This is in addition to default recipients who have billing account roles.
-     * The value is the full REST resource name of a monitoring notification
-     * channel with the form
+     * This is in addition to default recipients who have billing account IAM
+     * roles. The value is the full REST resource name of a monitoring
+     * notification channel with the form
      * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-     * channels are allowed.
+     * channels are allowed. See
+     * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+     * for more details.
      * 
* * @@ -1049,11 +1102,13 @@ public int getMonitoringNotificationChannelsCount() { * *
      * Optional. Targets to send notifications to when a threshold is exceeded.
-     * This is in addition to default recipients who have billing account roles.
-     * The value is the full REST resource name of a monitoring notification
-     * channel with the form
+     * This is in addition to default recipients who have billing account IAM
+     * roles. The value is the full REST resource name of a monitoring
+     * notification channel with the form
      * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-     * channels are allowed.
+     * channels are allowed. See
+     * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+     * for more details.
      * 
* * @@ -1071,11 +1126,13 @@ public java.lang.String getMonitoringNotificationChannels(int index) { * *
      * Optional. Targets to send notifications to when a threshold is exceeded.
-     * This is in addition to default recipients who have billing account roles.
-     * The value is the full REST resource name of a monitoring notification
-     * channel with the form
+     * This is in addition to default recipients who have billing account IAM
+     * roles. The value is the full REST resource name of a monitoring
+     * notification channel with the form
      * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-     * channels are allowed.
+     * channels are allowed. See
+     * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+     * for more details.
      * 
* * @@ -1093,11 +1150,13 @@ public com.google.protobuf.ByteString getMonitoringNotificationChannelsBytes(int * *
      * Optional. Targets to send notifications to when a threshold is exceeded.
-     * This is in addition to default recipients who have billing account roles.
-     * The value is the full REST resource name of a monitoring notification
-     * channel with the form
+     * This is in addition to default recipients who have billing account IAM
+     * roles. The value is the full REST resource name of a monitoring
+     * notification channel with the form
      * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-     * channels are allowed.
+     * channels are allowed. See
+     * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+     * for more details.
      * 
* * @@ -1122,11 +1181,13 @@ public Builder setMonitoringNotificationChannels(int index, java.lang.String val * *
      * Optional. Targets to send notifications to when a threshold is exceeded.
-     * This is in addition to default recipients who have billing account roles.
-     * The value is the full REST resource name of a monitoring notification
-     * channel with the form
+     * This is in addition to default recipients who have billing account IAM
+     * roles. The value is the full REST resource name of a monitoring
+     * notification channel with the form
      * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-     * channels are allowed.
+     * channels are allowed. See
+     * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+     * for more details.
      * 
* * @@ -1150,11 +1211,13 @@ public Builder addMonitoringNotificationChannels(java.lang.String value) { * *
      * Optional. Targets to send notifications to when a threshold is exceeded.
-     * This is in addition to default recipients who have billing account roles.
-     * The value is the full REST resource name of a monitoring notification
-     * channel with the form
+     * This is in addition to default recipients who have billing account IAM
+     * roles. The value is the full REST resource name of a monitoring
+     * notification channel with the form
      * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-     * channels are allowed.
+     * channels are allowed. See
+     * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+     * for more details.
      * 
* * @@ -1177,11 +1240,13 @@ public Builder addAllMonitoringNotificationChannels( * *
      * Optional. Targets to send notifications to when a threshold is exceeded.
-     * This is in addition to default recipients who have billing account roles.
-     * The value is the full REST resource name of a monitoring notification
-     * channel with the form
+     * This is in addition to default recipients who have billing account IAM
+     * roles. The value is the full REST resource name of a monitoring
+     * notification channel with the form
      * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-     * channels are allowed.
+     * channels are allowed. See
+     * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+     * for more details.
      * 
* * @@ -1201,11 +1266,13 @@ public Builder clearMonitoringNotificationChannels() { * *
      * Optional. Targets to send notifications to when a threshold is exceeded.
-     * This is in addition to default recipients who have billing account roles.
-     * The value is the full REST resource name of a monitoring notification
-     * channel with the form
+     * This is in addition to default recipients who have billing account IAM
+     * roles. The value is the full REST resource name of a monitoring
+     * notification channel with the form
      * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-     * channels are allowed.
+     * channels are allowed. See
+     * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+     * for more details.
      * 
* * @@ -1226,6 +1293,67 @@ public Builder addMonitoringNotificationChannelsBytes(com.google.protobuf.ByteSt return this; } + private boolean disableDefaultIamRecipients_; + /** + * + * + *
+     * Optional. When set to true, disables default notifications sent when a
+     * threshold is exceeded. Recipients are those with Billing Account
+     * Administrators and Billing Account Users IAM roles for the target account.
+     * 
+ * + * bool disable_default_iam_recipients = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableDefaultIamRecipients. + */ + @java.lang.Override + public boolean getDisableDefaultIamRecipients() { + return disableDefaultIamRecipients_; + } + /** + * + * + *
+     * Optional. When set to true, disables default notifications sent when a
+     * threshold is exceeded. Recipients are those with Billing Account
+     * Administrators and Billing Account Users IAM roles for the target account.
+     * 
+ * + * bool disable_default_iam_recipients = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The disableDefaultIamRecipients to set. + * @return This builder for chaining. + */ + public Builder setDisableDefaultIamRecipients(boolean value) { + + disableDefaultIamRecipients_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When set to true, disables default notifications sent when a
+     * threshold is exceeded. Recipients are those with Billing Account
+     * Administrators and Billing Account Users IAM roles for the target account.
+     * 
+ * + * bool disable_default_iam_recipients = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDisableDefaultIamRecipients() { + + disableDefaultIamRecipients_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRuleOrBuilder.java b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRuleOrBuilder.java index bcd7d0fb..b53b23b0 100644 --- a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRuleOrBuilder.java +++ b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRuleOrBuilder.java @@ -27,8 +27,8 @@ public interface AllUpdatesRuleOrBuilder * * *
-   * Required. The name of the Cloud Pub/Sub topic where budget related messages
-   * will be published, in the form `projects/{project_id}/topics/{topic_id}`.
+   * Optional. The name of the Pub/Sub topic where budget related messages will
+   * be published, in the form `projects/{project_id}/topics/{topic_id}`.
    * Updates are sent at regular intervals to the topic. The topic needs to be
    * created before the budget is created; see
    * https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
@@ -36,11 +36,11 @@ public interface AllUpdatesRuleOrBuilder
    * Caller is expected to have
    * `pubsub.topics.setIamPolicy` permission on the topic when it's set for a
    * budget, otherwise, the API call will fail with PERMISSION_DENIED. See
-   * https://cloud.google.com/pubsub/docs/access-control for more details on
-   * Pub/Sub roles and permissions.
+   * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
+   * for more details on Pub/Sub roles and permissions.
    * 
* - * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pubsubTopic. */ @@ -49,8 +49,8 @@ public interface AllUpdatesRuleOrBuilder * * *
-   * Required. The name of the Cloud Pub/Sub topic where budget related messages
-   * will be published, in the form `projects/{project_id}/topics/{topic_id}`.
+   * Optional. The name of the Pub/Sub topic where budget related messages will
+   * be published, in the form `projects/{project_id}/topics/{topic_id}`.
    * Updates are sent at regular intervals to the topic. The topic needs to be
    * created before the budget is created; see
    * https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
@@ -58,11 +58,11 @@ public interface AllUpdatesRuleOrBuilder
    * Caller is expected to have
    * `pubsub.topics.setIamPolicy` permission on the topic when it's set for a
    * budget, otherwise, the API call will fail with PERMISSION_DENIED. See
-   * https://cloud.google.com/pubsub/docs/access-control for more details on
-   * Pub/Sub roles and permissions.
+   * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
+   * for more details on Pub/Sub roles and permissions.
    * 
* - * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * string pubsub_topic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pubsubTopic. */ @@ -72,12 +72,12 @@ public interface AllUpdatesRuleOrBuilder * * *
-   * Required. The schema version of the notification sent to `pubsub_topic`.
+   * Optional. The schema version of the notification sent to `pubsub_topic`.
    * Only "1.0" is accepted. It represents the JSON schema as defined in
-   * https://cloud.google.com/billing/docs/how-to/budgets#notification_format
+   * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
    * 
* - * string schema_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The schemaVersion. */ @@ -86,12 +86,12 @@ public interface AllUpdatesRuleOrBuilder * * *
-   * Required. The schema version of the notification sent to `pubsub_topic`.
+   * Optional. The schema version of the notification sent to `pubsub_topic`.
    * Only "1.0" is accepted. It represents the JSON schema as defined in
-   * https://cloud.google.com/billing/docs/how-to/budgets#notification_format
+   * https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format
    * 
* - * string schema_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * string schema_version = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for schemaVersion. */ @@ -102,11 +102,13 @@ public interface AllUpdatesRuleOrBuilder * *
    * Optional. Targets to send notifications to when a threshold is exceeded.
-   * This is in addition to default recipients who have billing account roles.
-   * The value is the full REST resource name of a monitoring notification
-   * channel with the form
+   * This is in addition to default recipients who have billing account IAM
+   * roles. The value is the full REST resource name of a monitoring
+   * notification channel with the form
    * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-   * channels are allowed.
+   * channels are allowed. See
+   * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+   * for more details.
    * 
* * @@ -121,11 +123,13 @@ public interface AllUpdatesRuleOrBuilder * *
    * Optional. Targets to send notifications to when a threshold is exceeded.
-   * This is in addition to default recipients who have billing account roles.
-   * The value is the full REST resource name of a monitoring notification
-   * channel with the form
+   * This is in addition to default recipients who have billing account IAM
+   * roles. The value is the full REST resource name of a monitoring
+   * notification channel with the form
    * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-   * channels are allowed.
+   * channels are allowed. See
+   * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+   * for more details.
    * 
* * @@ -140,11 +144,13 @@ public interface AllUpdatesRuleOrBuilder * *
    * Optional. Targets to send notifications to when a threshold is exceeded.
-   * This is in addition to default recipients who have billing account roles.
-   * The value is the full REST resource name of a monitoring notification
-   * channel with the form
+   * This is in addition to default recipients who have billing account IAM
+   * roles. The value is the full REST resource name of a monitoring
+   * notification channel with the form
    * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-   * channels are allowed.
+   * channels are allowed. See
+   * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+   * for more details.
    * 
* * @@ -160,11 +166,13 @@ public interface AllUpdatesRuleOrBuilder * *
    * Optional. Targets to send notifications to when a threshold is exceeded.
-   * This is in addition to default recipients who have billing account roles.
-   * The value is the full REST resource name of a monitoring notification
-   * channel with the form
+   * This is in addition to default recipients who have billing account IAM
+   * roles. The value is the full REST resource name of a monitoring
+   * notification channel with the form
    * `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
-   * channels are allowed.
+   * channels are allowed. See
+   * https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
+   * for more details.
    * 
* * @@ -175,4 +183,19 @@ public interface AllUpdatesRuleOrBuilder * @return The bytes of the monitoringNotificationChannels at the given index. */ com.google.protobuf.ByteString getMonitoringNotificationChannelsBytes(int index); + + /** + * + * + *
+   * Optional. When set to true, disables default notifications sent when a
+   * threshold is exceeded. Recipients are those with Billing Account
+   * Administrators and Billing Account Users IAM roles for the target account.
+   * 
+ * + * bool disable_default_iam_recipients = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableDefaultIamRecipients. + */ + boolean getDisableDefaultIamRecipients(); } diff --git a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetModel.java b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetModel.java index 1e84b59f..fa528a5b 100644 --- a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetModel.java +++ b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetModel.java @@ -91,24 +91,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "cloud.billing.budgets.v1beta1.ThresholdR" + "ule.BasisB\003\340A\001\"G\n\005Basis\022\025\n\021BASIS_UNSPECI" + "FIED\020\000\022\021\n\rCURRENT_SPEND\020\001\022\024\n\020FORECASTED_" - + "SPEND\020\002\"w\n\016AllUpdatesRule\022\031\n\014pubsub_topi" - + "c\030\001 \001(\tB\003\340A\002\022\033\n\016schema_version\030\002 \001(\tB\003\340A" - + "\002\022-\n monitoring_notification_channels\030\003 " - + "\003(\tB\003\340A\001\"\304\003\n\006Filter\022\025\n\010projects\030\001 \003(\tB\003\340" - + "A\001\022f\n\026credit_types_treatment\030\004 \001(\0162A.goo" - + "gle.cloud.billing.budgets.v1beta1.Filter" - + ".CreditTypesTreatmentB\003\340A\001\022\025\n\010services\030\003" - + " \003(\tB\003\340A\001\022\030\n\013subaccounts\030\005 \003(\tB\003\340A\001\022M\n\006l" - + "abels\030\006 \003(\01328.google.cloud.billing.budge" - + "ts.v1beta1.Filter.LabelsEntryB\003\340A\001\032I\n\013La" - + "belsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032." - + "google.protobuf.ListValue:\0028\001\"p\n\024CreditT" - + "ypesTreatment\022&\n\"CREDIT_TYPES_TREATMENT_" - + "UNSPECIFIED\020\000\022\027\n\023INCLUDE_ALL_CREDITS\020\001\022\027" - + "\n\023EXCLUDE_ALL_CREDITS\020\002By\n(com.google.cl" - + "oud.billing.budgets.v1beta1P\001ZKgoogle.go" - + "lang.org/genproto/googleapis/cloud/billi" - + "ng/budgets/v1beta1;budgetsb\006proto3" + + "SPEND\020\002\"\244\001\n\016AllUpdatesRule\022\031\n\014pubsub_top" + + "ic\030\001 \001(\tB\003\340A\001\022\033\n\016schema_version\030\002 \001(\tB\003\340" + + "A\001\022-\n monitoring_notification_channels\030\003" + + " \003(\tB\003\340A\001\022+\n\036disable_default_iam_recipie" + + "nts\030\004 \001(\010B\003\340A\001\"\304\003\n\006Filter\022\025\n\010projects\030\001 " + + "\003(\tB\003\340A\001\022f\n\026credit_types_treatment\030\004 \001(\016" + + "2A.google.cloud.billing.budgets.v1beta1." + + "Filter.CreditTypesTreatmentB\003\340A\001\022\025\n\010serv" + + "ices\030\003 \003(\tB\003\340A\001\022\030\n\013subaccounts\030\005 \003(\tB\003\340A" + + "\001\022M\n\006labels\030\006 \003(\01328.google.cloud.billing" + + ".budgets.v1beta1.Filter.LabelsEntryB\003\340A\001" + + "\032I\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 " + + "\001(\0132\032.google.protobuf.ListValue:\0028\001\"p\n\024C" + + "reditTypesTreatment\022&\n\"CREDIT_TYPES_TREA" + + "TMENT_UNSPECIFIED\020\000\022\027\n\023INCLUDE_ALL_CREDI" + + "TS\020\001\022\027\n\023EXCLUDE_ALL_CREDITS\020\002By\n(com.goo" + + "gle.cloud.billing.budgets.v1beta1P\001ZKgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/billing/budgets/v1beta1;budgetsb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -161,7 +162,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_billing_budgets_v1beta1_AllUpdatesRule_descriptor, new java.lang.String[] { - "PubsubTopic", "SchemaVersion", "MonitoringNotificationChannels", + "PubsubTopic", + "SchemaVersion", + "MonitoringNotificationChannels", + "DisableDefaultIamRecipients", }); internal_static_google_cloud_billing_budgets_v1beta1_Filter_descriptor = getDescriptor().getMessageTypes().get(5); diff --git a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceOuterClass.java b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceOuterClass.java index f615b327..480a191f 100644 --- a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceOuterClass.java +++ b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceOuterClass.java @@ -85,7 +85,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \003(\0132,.google.cloud.billing.budgets.v1be" + "ta1.Budget\022\027\n\017next_page_token\030\002 \001(\t\"Q\n\023D" + "eleteBudgetRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&" - + "\n$billingbudgets.googleapis.com/Budget2\311" + + "\n$billingbudgets.googleapis.com/Budget2\367" + "\007\n\rBudgetService\022\257\001\n\014CreateBudget\0229.goog" + "le.cloud.billing.budgets.v1beta1.CreateB" + "udgetRequest\032,.google.cloud.billing.budg" @@ -108,12 +108,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".cloud.billing.budgets.v1beta1.DeleteBud" + "getRequest\032\026.google.protobuf.Empty\"3\202\323\344\223" + "\002-*+/v1beta1/{name=billingAccounts/*/bud" - + "gets/*}\032Q\312A\035billingbudgets.googleapis.co" - + "m\322A.https://www.googleapis.com/auth/clou" - + "d-platformBy\n(com.google.cloud.billing.b" - + "udgets.v1beta1P\001ZKgoogle.golang.org/genp" - + "roto/googleapis/cloud/billing/budgets/v1" - + "beta1;budgetsb\006proto3" + + "gets/*}\032\177\312A\035billingbudgets.googleapis.co" + + "m\322A\\https://www.googleapis.com/auth/clou" + + "d-billing,https://www.googleapis.com/aut" + + "h/cloud-platformBy\n(com.google.cloud.bil" + + "ling.budgets.v1beta1P\001ZKgoogle.golang.or" + + "g/genproto/googleapis/cloud/billing/budg" + + "ets/v1beta1;budgetsb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/Filter.java b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/Filter.java index 226df963..997f2901 100644 --- a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/Filter.java +++ b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/Filter.java @@ -539,10 +539,10 @@ public com.google.protobuf.ByteString getServicesBytes(int index) { *
    * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
    * specifying that usage from only this set of subaccounts should be included
-   * in the budget. If a subaccount is set to the name of the reseller account,
-   * usage from the reseller account will be included. If omitted, the report
-   * will include usage from the reseller account and all subaccounts, if they
-   * exist.
+   * in the budget. If a subaccount is set to the name of the parent account,
+   * usage from the parent account will be included. If omitted, the
+   * report will include usage from the parent account and all
+   * subaccounts, if they exist.
    * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -558,10 +558,10 @@ public com.google.protobuf.ProtocolStringList getSubaccountsList() { *
    * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
    * specifying that usage from only this set of subaccounts should be included
-   * in the budget. If a subaccount is set to the name of the reseller account,
-   * usage from the reseller account will be included. If omitted, the report
-   * will include usage from the reseller account and all subaccounts, if they
-   * exist.
+   * in the budget. If a subaccount is set to the name of the parent account,
+   * usage from the parent account will be included. If omitted, the
+   * report will include usage from the parent account and all
+   * subaccounts, if they exist.
    * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -577,10 +577,10 @@ public int getSubaccountsCount() { *
    * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
    * specifying that usage from only this set of subaccounts should be included
-   * in the budget. If a subaccount is set to the name of the reseller account,
-   * usage from the reseller account will be included. If omitted, the report
-   * will include usage from the reseller account and all subaccounts, if they
-   * exist.
+   * in the budget. If a subaccount is set to the name of the parent account,
+   * usage from the parent account will be included. If omitted, the
+   * report will include usage from the parent account and all
+   * subaccounts, if they exist.
    * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -597,10 +597,10 @@ public java.lang.String getSubaccounts(int index) { *
    * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
    * specifying that usage from only this set of subaccounts should be included
-   * in the budget. If a subaccount is set to the name of the reseller account,
-   * usage from the reseller account will be included. If omitted, the report
-   * will include usage from the reseller account and all subaccounts, if they
-   * exist.
+   * in the budget. If a subaccount is set to the name of the parent account,
+   * usage from the parent account will be included. If omitted, the
+   * report will include usage from the parent account and all
+   * subaccounts, if they exist.
    * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1739,10 +1739,10 @@ private void ensureSubaccountsIsMutable() { *
      * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
      * specifying that usage from only this set of subaccounts should be included
-     * in the budget. If a subaccount is set to the name of the reseller account,
-     * usage from the reseller account will be included. If omitted, the report
-     * will include usage from the reseller account and all subaccounts, if they
-     * exist.
+     * in the budget. If a subaccount is set to the name of the parent account,
+     * usage from the parent account will be included. If omitted, the
+     * report will include usage from the parent account and all
+     * subaccounts, if they exist.
      * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1758,10 +1758,10 @@ public com.google.protobuf.ProtocolStringList getSubaccountsList() { *
      * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
      * specifying that usage from only this set of subaccounts should be included
-     * in the budget. If a subaccount is set to the name of the reseller account,
-     * usage from the reseller account will be included. If omitted, the report
-     * will include usage from the reseller account and all subaccounts, if they
-     * exist.
+     * in the budget. If a subaccount is set to the name of the parent account,
+     * usage from the parent account will be included. If omitted, the
+     * report will include usage from the parent account and all
+     * subaccounts, if they exist.
      * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1777,10 +1777,10 @@ public int getSubaccountsCount() { *
      * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
      * specifying that usage from only this set of subaccounts should be included
-     * in the budget. If a subaccount is set to the name of the reseller account,
-     * usage from the reseller account will be included. If omitted, the report
-     * will include usage from the reseller account and all subaccounts, if they
-     * exist.
+     * in the budget. If a subaccount is set to the name of the parent account,
+     * usage from the parent account will be included. If omitted, the
+     * report will include usage from the parent account and all
+     * subaccounts, if they exist.
      * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1797,10 +1797,10 @@ public java.lang.String getSubaccounts(int index) { *
      * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
      * specifying that usage from only this set of subaccounts should be included
-     * in the budget. If a subaccount is set to the name of the reseller account,
-     * usage from the reseller account will be included. If omitted, the report
-     * will include usage from the reseller account and all subaccounts, if they
-     * exist.
+     * in the budget. If a subaccount is set to the name of the parent account,
+     * usage from the parent account will be included. If omitted, the
+     * report will include usage from the parent account and all
+     * subaccounts, if they exist.
      * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1817,10 +1817,10 @@ public com.google.protobuf.ByteString getSubaccountsBytes(int index) { *
      * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
      * specifying that usage from only this set of subaccounts should be included
-     * in the budget. If a subaccount is set to the name of the reseller account,
-     * usage from the reseller account will be included. If omitted, the report
-     * will include usage from the reseller account and all subaccounts, if they
-     * exist.
+     * in the budget. If a subaccount is set to the name of the parent account,
+     * usage from the parent account will be included. If omitted, the
+     * report will include usage from the parent account and all
+     * subaccounts, if they exist.
      * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1844,10 +1844,10 @@ public Builder setSubaccounts(int index, java.lang.String value) { *
      * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
      * specifying that usage from only this set of subaccounts should be included
-     * in the budget. If a subaccount is set to the name of the reseller account,
-     * usage from the reseller account will be included. If omitted, the report
-     * will include usage from the reseller account and all subaccounts, if they
-     * exist.
+     * in the budget. If a subaccount is set to the name of the parent account,
+     * usage from the parent account will be included. If omitted, the
+     * report will include usage from the parent account and all
+     * subaccounts, if they exist.
      * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1870,10 +1870,10 @@ public Builder addSubaccounts(java.lang.String value) { *
      * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
      * specifying that usage from only this set of subaccounts should be included
-     * in the budget. If a subaccount is set to the name of the reseller account,
-     * usage from the reseller account will be included. If omitted, the report
-     * will include usage from the reseller account and all subaccounts, if they
-     * exist.
+     * in the budget. If a subaccount is set to the name of the parent account,
+     * usage from the parent account will be included. If omitted, the
+     * report will include usage from the parent account and all
+     * subaccounts, if they exist.
      * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1893,10 +1893,10 @@ public Builder addAllSubaccounts(java.lang.Iterable values) { *
      * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
      * specifying that usage from only this set of subaccounts should be included
-     * in the budget. If a subaccount is set to the name of the reseller account,
-     * usage from the reseller account will be included. If omitted, the report
-     * will include usage from the reseller account and all subaccounts, if they
-     * exist.
+     * in the budget. If a subaccount is set to the name of the parent account,
+     * usage from the parent account will be included. If omitted, the
+     * report will include usage from the parent account and all
+     * subaccounts, if they exist.
      * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1915,10 +1915,10 @@ public Builder clearSubaccounts() { *
      * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
      * specifying that usage from only this set of subaccounts should be included
-     * in the budget. If a subaccount is set to the name of the reseller account,
-     * usage from the reseller account will be included. If omitted, the report
-     * will include usage from the reseller account and all subaccounts, if they
-     * exist.
+     * in the budget. If a subaccount is set to the name of the parent account,
+     * usage from the parent account will be included. If omitted, the
+     * report will include usage from the parent account and all
+     * subaccounts, if they exist.
      * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/FilterOrBuilder.java b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/FilterOrBuilder.java index 09edf706..13cb159d 100644 --- a/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/FilterOrBuilder.java +++ b/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/FilterOrBuilder.java @@ -196,10 +196,10 @@ public interface FilterOrBuilder *
    * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
    * specifying that usage from only this set of subaccounts should be included
-   * in the budget. If a subaccount is set to the name of the reseller account,
-   * usage from the reseller account will be included. If omitted, the report
-   * will include usage from the reseller account and all subaccounts, if they
-   * exist.
+   * in the budget. If a subaccount is set to the name of the parent account,
+   * usage from the parent account will be included. If omitted, the
+   * report will include usage from the parent account and all
+   * subaccounts, if they exist.
    * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -213,10 +213,10 @@ public interface FilterOrBuilder *
    * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
    * specifying that usage from only this set of subaccounts should be included
-   * in the budget. If a subaccount is set to the name of the reseller account,
-   * usage from the reseller account will be included. If omitted, the report
-   * will include usage from the reseller account and all subaccounts, if they
-   * exist.
+   * in the budget. If a subaccount is set to the name of the parent account,
+   * usage from the parent account will be included. If omitted, the
+   * report will include usage from the parent account and all
+   * subaccounts, if they exist.
    * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -230,10 +230,10 @@ public interface FilterOrBuilder *
    * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
    * specifying that usage from only this set of subaccounts should be included
-   * in the budget. If a subaccount is set to the name of the reseller account,
-   * usage from the reseller account will be included. If omitted, the report
-   * will include usage from the reseller account and all subaccounts, if they
-   * exist.
+   * in the budget. If a subaccount is set to the name of the parent account,
+   * usage from the parent account will be included. If omitted, the
+   * report will include usage from the parent account and all
+   * subaccounts, if they exist.
    * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -248,10 +248,10 @@ public interface FilterOrBuilder *
    * Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
    * specifying that usage from only this set of subaccounts should be included
-   * in the budget. If a subaccount is set to the name of the reseller account,
-   * usage from the reseller account will be included. If omitted, the report
-   * will include usage from the reseller account and all subaccounts, if they
-   * exist.
+   * in the budget. If a subaccount is set to the name of the parent account,
+   * usage from the parent account will be included. If omitted, the
+   * report will include usage from the parent account and all
+   * subaccounts, if they exist.
    * 
* * repeated string subaccounts = 5 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_model.proto b/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_model.proto index 9b563718..327069b6 100644 --- a/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_model.proto +++ b/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_model.proto @@ -123,8 +123,8 @@ message ThresholdRule { // AllUpdatesRule defines notifications that are sent based on budget spend // and thresholds. message AllUpdatesRule { - // Required. The name of the Cloud Pub/Sub topic where budget related messages - // will be published, in the form `projects/{project_id}/topics/{topic_id}`. + // Optional. The name of the Pub/Sub topic where budget related messages will + // be published, in the form `projects/{project_id}/topics/{topic_id}`. // Updates are sent at regular intervals to the topic. The topic needs to be // created before the budget is created; see // https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications @@ -132,23 +132,31 @@ message AllUpdatesRule { // Caller is expected to have // `pubsub.topics.setIamPolicy` permission on the topic when it's set for a // budget, otherwise, the API call will fail with PERMISSION_DENIED. See - // https://cloud.google.com/pubsub/docs/access-control for more details on - // Pub/Sub roles and permissions. - string pubsub_topic = 1 [(google.api.field_behavior) = REQUIRED]; + // https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications + // for more details on Pub/Sub roles and permissions. + string pubsub_topic = 1 [(google.api.field_behavior) = OPTIONAL]; - // Required. The schema version of the notification sent to `pubsub_topic`. + // Optional. The schema version of the notification sent to `pubsub_topic`. // Only "1.0" is accepted. It represents the JSON schema as defined in - // https://cloud.google.com/billing/docs/how-to/budgets#notification_format - string schema_version = 2 [(google.api.field_behavior) = REQUIRED]; + // https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format + string schema_version = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Targets to send notifications to when a threshold is exceeded. - // This is in addition to default recipients who have billing account roles. - // The value is the full REST resource name of a monitoring notification - // channel with the form + // This is in addition to default recipients who have billing account IAM + // roles. The value is the full REST resource name of a monitoring + // notification channel with the form // `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 - // channels are allowed. + // channels are allowed. See + // https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients + // for more details. repeated string monitoring_notification_channels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When set to true, disables default notifications sent when a + // threshold is exceeded. Recipients are those with Billing Account + // Administrators and Billing Account Users IAM roles for the target account. + bool disable_default_iam_recipients = 4 + [(google.api.field_behavior) = OPTIONAL]; } // A filter for a budget, limiting the scope of the cost to calculate. @@ -188,10 +196,10 @@ message Filter { // Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, // specifying that usage from only this set of subaccounts should be included - // in the budget. If a subaccount is set to the name of the reseller account, - // usage from the reseller account will be included. If omitted, the report - // will include usage from the reseller account and all subaccounts, if they - // exist. + // in the budget. If a subaccount is set to the name of the parent account, + // usage from the parent account will be included. If omitted, the + // report will include usage from the parent account and all + // subaccounts, if they exist. repeated string subaccounts = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. A single label and value pair specifying that usage from only diff --git a/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_service.proto b/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_service.proto index e15ecf5c..fa523959 100644 --- a/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_service.proto +++ b/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_service.proto @@ -32,7 +32,9 @@ option java_package = "com.google.cloud.billing.budgets.v1beta1"; // budget plan and rules to execute as we track spend against that plan. service BudgetService { option (google.api.default_host) = "billingbudgets.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-platform"; // Creates a new budget. See // Quotas and limits @@ -115,7 +117,8 @@ message UpdateBudgetRequest { // updated. See // https://developers.google.com/protocol-buffers/docs/proto3#default for more // details about default values. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Request for GetBudget diff --git a/synth.metadata b/synth.metadata index 1bb2eec2..c6715ad3 100644 --- a/synth.metadata +++ b/synth.metadata @@ -18,8 +18,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "50ae1c72fd94a3ae4269394b09e4b7fbb9251146", - "internalRef": "320484049" + "sha": "921ce41f94a74905ca753c72a4d4cc43600003d3", + "internalRef": "331675651" } }, {