diff --git a/java-billingbudgets/README.md b/java-billingbudgets/README.md index 879c5d34c796..356b16074191 100644 --- a/java-billingbudgets/README.md +++ b/java-billingbudgets/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.19.0 + 26.22.0 pom import @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-billingbudgets.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-billingbudgets/2.21.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-billingbudgets/2.23.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1/BudgetServiceClient.java b/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1/BudgetServiceClient.java index d51bf6be245d..85075d965760 100644 --- a/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1/BudgetServiceClient.java +++ b/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1/BudgetServiceClient.java @@ -614,6 +614,7 @@ public final ListBudgetsPagedResponse listBudgets(String parent) { * ListBudgetsRequest request = * ListBudgetsRequest.newBuilder() * .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString()) + * .setScope("scope109264468") * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); @@ -650,6 +651,7 @@ public final ListBudgetsPagedResponse listBudgets(ListBudgetsRequest request) { * ListBudgetsRequest request = * ListBudgetsRequest.newBuilder() * .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString()) + * .setScope("scope109264468") * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); @@ -686,6 +688,7 @@ public final ListBudgetsPagedResponse listBudgets(ListBudgetsRequest request) { * ListBudgetsRequest request = * ListBudgetsRequest.newBuilder() * .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString()) + * .setScope("scope109264468") * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); diff --git a/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1/stub/HttpJsonBudgetServiceStub.java b/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1/stub/HttpJsonBudgetServiceStub.java index 23c5d024521d..742ae7fc0ff6 100644 --- a/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1/stub/HttpJsonBudgetServiceStub.java +++ b/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1/stub/HttpJsonBudgetServiceStub.java @@ -192,6 +192,7 @@ public class HttpJsonBudgetServiceStub extends BudgetServiceStub { ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "scope", request.getScope()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) diff --git a/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceClient.java b/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceClient.java index b99f4ece8fb9..7b15cfcc1592 100644 --- a/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceClient.java +++ b/java-billingbudgets/google-cloud-billingbudgets/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceClient.java @@ -370,6 +370,7 @@ public final UnaryCallable getBudgetCallable() { * ListBudgetsRequest request = * ListBudgetsRequest.newBuilder() * .setParent(BudgetName.of("[BILLING_ACCOUNT]", "[BUDGET]").toString()) + * .setScope("scope109264468") * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); @@ -406,6 +407,7 @@ public final ListBudgetsPagedResponse listBudgets(ListBudgetsRequest request) { * ListBudgetsRequest request = * ListBudgetsRequest.newBuilder() * .setParent(BudgetName.of("[BILLING_ACCOUNT]", "[BUDGET]").toString()) + * .setScope("scope109264468") * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); @@ -442,6 +444,7 @@ public final ListBudgetsPagedResponse listBudgets(ListBudgetsRequest request) { * ListBudgetsRequest request = * ListBudgetsRequest.newBuilder() * .setParent(BudgetName.of("[BILLING_ACCOUNT]", "[BUDGET]").toString()) + * .setScope("scope109264468") * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .build(); diff --git a/java-billingbudgets/google-cloud-billingbudgets/src/test/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceClientTest.java b/java-billingbudgets/google-cloud-billingbudgets/src/test/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceClientTest.java index 173ee5ff85b7..76604772ed37 100644 --- a/java-billingbudgets/google-cloud-billingbudgets/src/test/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceClientTest.java +++ b/java-billingbudgets/google-cloud-billingbudgets/src/test/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceClientTest.java @@ -250,6 +250,7 @@ public void listBudgetsTest() throws Exception { ListBudgetsRequest request = ListBudgetsRequest.newBuilder() .setParent(BudgetName.of("[BILLING_ACCOUNT]", "[BUDGET]").toString()) + .setScope("scope109264468") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); @@ -266,6 +267,7 @@ public void listBudgetsTest() throws Exception { ListBudgetsRequest actualRequest = ((ListBudgetsRequest) actualRequests.get(0)); Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getScope(), actualRequest.getScope()); Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); Assert.assertTrue( @@ -283,6 +285,7 @@ public void listBudgetsExceptionTest() throws Exception { ListBudgetsRequest request = ListBudgetsRequest.newBuilder() .setParent(BudgetName.of("[BILLING_ACCOUNT]", "[BUDGET]").toString()) + .setScope("scope109264468") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/BudgetModelProto.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/BudgetModelProto.java index 029f1cb39e74..7550c7e44a40 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/BudgetModelProto.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/BudgetModelProto.java @@ -95,37 +95,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".cloud.billing.budgets.v1.ThresholdRule." + "BasisB\004\342A\001\001\"G\n\005Basis\022\025\n\021BASIS_UNSPECIFIE" + "D\020\000\022\021\n\rCURRENT_SPEND\020\001\022\024\n\020FORECASTED_SPE" - + "ND\020\002\"\253\001\n\021NotificationsRule\022\032\n\014pubsub_top" + + "ND\020\002\"\332\001\n\021NotificationsRule\022\032\n\014pubsub_top" + "ic\030\001 \001(\tB\004\342A\001\001\022\034\n\016schema_version\030\002 \001(\tB\004" + "\342A\001\001\022.\n monitoring_notification_channels" + "\030\003 \003(\tB\004\342A\001\001\022,\n\036disable_default_iam_reci" - + "pients\030\004 \001(\010B\004\342A\001\001\"\315\005\n\006Filter\022\026\n\010project" - + "s\030\001 \003(\tB\004\342A\001\001\022 \n\022resource_ancestors\030\002 \003(" - + "\tB\004\342A\001\001\022\032\n\014credit_types\030\007 \003(\tB\004\342A\001\001\022b\n\026c" - + "redit_types_treatment\030\004 \001(\0162<.google.clo" - + "ud.billing.budgets.v1.Filter.CreditTypes" - + "TreatmentB\004\342A\001\001\022\026\n\010services\030\003 \003(\tB\004\342A\001\001\022" - + "\031\n\013subaccounts\030\005 \003(\tB\004\342A\001\001\022I\n\006labels\030\006 \003" - + "(\01323.google.cloud.billing.budgets.v1.Fil" - + "ter.LabelsEntryB\004\342A\001\001\022P\n\017calendar_period" - + "\030\010 \001(\0162/.google.cloud.billing.budgets.v1" - + ".CalendarPeriodB\004\342A\001\001H\000\022L\n\rcustom_period" - + "\030\t \001(\0132-.google.cloud.billing.budgets.v1" - + ".CustomPeriodB\004\342A\001\001H\000\032I\n\013LabelsEntry\022\013\n\003" - + "key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.google.protob" - + "uf.ListValue:\0028\001\"\217\001\n\024CreditTypesTreatmen" - + "t\022&\n\"CREDIT_TYPES_TREATMENT_UNSPECIFIED\020" - + "\000\022\027\n\023INCLUDE_ALL_CREDITS\020\001\022\027\n\023EXCLUDE_AL" - + "L_CREDITS\020\002\022\035\n\031INCLUDE_SPECIFIED_CREDITS" - + "\020\003B\016\n\014usage_period\"f\n\014CustomPeriod\022+\n\nst" - + "art_date\030\001 \001(\0132\021.google.type.DateB\004\342A\001\002\022" - + ")\n\010end_date\030\002 \001(\0132\021.google.type.DateB\004\342A" - + "\001\001*S\n\016CalendarPeriod\022\037\n\033CALENDAR_PERIOD_" - + "UNSPECIFIED\020\000\022\t\n\005MONTH\020\001\022\013\n\007QUARTER\020\002\022\010\n" - + "\004YEAR\020\003Bx\n#com.google.cloud.billing.budg" - + "ets.v1B\020BudgetModelProtoP\001Z=cloud.google" - + ".com/go/billing/budgets/apiv1/budgetspb;" - + "budgetspbb\006proto3" + + "pients\030\004 \001(\010B\004\342A\001\001\022-\n\037enable_project_lev" + + "el_recipients\030\005 \001(\010B\004\342A\001\001\"\315\005\n\006Filter\022\026\n\010" + + "projects\030\001 \003(\tB\004\342A\001\001\022 \n\022resource_ancesto" + + "rs\030\002 \003(\tB\004\342A\001\001\022\032\n\014credit_types\030\007 \003(\tB\004\342A" + + "\001\001\022b\n\026credit_types_treatment\030\004 \001(\0162<.goo" + + "gle.cloud.billing.budgets.v1.Filter.Cred" + + "itTypesTreatmentB\004\342A\001\001\022\026\n\010services\030\003 \003(\t" + + "B\004\342A\001\001\022\031\n\013subaccounts\030\005 \003(\tB\004\342A\001\001\022I\n\006lab" + + "els\030\006 \003(\01323.google.cloud.billing.budgets" + + ".v1.Filter.LabelsEntryB\004\342A\001\001\022P\n\017calendar" + + "_period\030\010 \001(\0162/.google.cloud.billing.bud" + + "gets.v1.CalendarPeriodB\004\342A\001\001H\000\022L\n\rcustom" + + "_period\030\t \001(\0132-.google.cloud.billing.bud" + + "gets.v1.CustomPeriodB\004\342A\001\001H\000\032I\n\013LabelsEn" + + "try\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.google" + + ".protobuf.ListValue:\0028\001\"\217\001\n\024CreditTypesT" + + "reatment\022&\n\"CREDIT_TYPES_TREATMENT_UNSPE" + + "CIFIED\020\000\022\027\n\023INCLUDE_ALL_CREDITS\020\001\022\027\n\023EXC" + + "LUDE_ALL_CREDITS\020\002\022\035\n\031INCLUDE_SPECIFIED_" + + "CREDITS\020\003B\016\n\014usage_period\"f\n\014CustomPerio" + + "d\022+\n\nstart_date\030\001 \001(\0132\021.google.type.Date" + + "B\004\342A\001\002\022)\n\010end_date\030\002 \001(\0132\021.google.type.D" + + "ateB\004\342A\001\001*S\n\016CalendarPeriod\022\037\n\033CALENDAR_" + + "PERIOD_UNSPECIFIED\020\000\022\t\n\005MONTH\020\001\022\013\n\007QUART" + + "ER\020\002\022\010\n\004YEAR\020\003Bx\n#com.google.cloud.billi" + + "ng.budgets.v1B\020BudgetModelProtoP\001Z=cloud" + + ".google.com/go/billing/budgets/apiv1/bud" + + "getspb;budgetspbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -183,6 +184,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SchemaVersion", "MonitoringNotificationChannels", "DisableDefaultIamRecipients", + "EnableProjectLevelRecipients", }); internal_static_google_cloud_billing_budgets_v1_Filter_descriptor = getDescriptor().getMessageTypes().get(5); diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/BudgetServiceProto.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/BudgetServiceProto.java index 8e2f0bfff4e7..0c7ea46b8fbe 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/BudgetServiceProto.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/BudgetServiceProto.java @@ -77,44 +77,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" + "askB\004\342A\001\001\"O\n\020GetBudgetRequest\022;\n\004name\030\001 " + "\001(\tB-\342A\001\002\372A&\n$billingbudgets.googleapis." - + "com/Budget\"\206\001\n\022ListBudgetsRequest\022=\n\006par" + + "com/Budget\"\233\001\n\022ListBudgetsRequest\022=\n\006par" + "ent\030\001 \001(\tB-\342A\001\002\372A&\022$billingbudgets.googl" - + "eapis.com/Budget\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001" - + "\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\"h\n\023ListBudge" - + "tsResponse\0228\n\007budgets\030\001 \003(\0132\'.google.clo" - + "ud.billing.budgets.v1.Budget\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\"R\n\023DeleteBudgetRequest\022;\n\004" - + "name\030\001 \001(\tB-\342A\001\002\372A&\n$billingbudgets.goog" - + "leapis.com/Budget2\367\007\n\rBudgetService\022\265\001\n\014" - + "CreateBudget\0224.google.cloud.billing.budg" - + "ets.v1.CreateBudgetRequest\032\'.google.clou" - + "d.billing.budgets.v1.Budget\"F\332A\rparent,b" - + "udget\202\323\344\223\0020\"&/v1/{parent=billingAccounts" - + "/*}/budgets:\006budget\022\301\001\n\014UpdateBudget\0224.g" - + "oogle.cloud.billing.budgets.v1.UpdateBud" - + "getRequest\032\'.google.cloud.billing.budget" - + "s.v1.Budget\"R\332A\022budget,update_mask\202\323\344\223\0027" - + "2-/v1/{budget.name=billingAccounts/*/bud" - + "gets/*}:\006budget\022\236\001\n\tGetBudget\0221.google.c" - + "loud.billing.budgets.v1.GetBudgetRequest" - + "\032\'.google.cloud.billing.budgets.v1.Budge" - + "t\"5\332A\004name\202\323\344\223\002(\022&/v1/{name=billingAccou" - + "nts/*/budgets/*}\022\261\001\n\013ListBudgets\0223.googl" - + "e.cloud.billing.budgets.v1.ListBudgetsRe" - + "quest\0324.google.cloud.billing.budgets.v1." - + "ListBudgetsResponse\"7\332A\006parent\202\323\344\223\002(\022&/v" - + "1/{parent=billingAccounts/*}/budgets\022\223\001\n" - + "\014DeleteBudget\0224.google.cloud.billing.bud" - + "gets.v1.DeleteBudgetRequest\032\026.google.pro" - + "tobuf.Empty\"5\332A\004name\202\323\344\223\002(*&/v1/{name=bi" - + "llingAccounts/*/budgets/*}\032\177\312A\035billingbu" - + "dgets.googleapis.com\322A\\https://www.googl" - + "eapis.com/auth/cloud-billing,https://www" - + ".googleapis.com/auth/cloud-platformBz\n#c" - + "om.google.cloud.billing.budgets.v1B\022Budg" - + "etServiceProtoP\001Z=cloud.google.com/go/bi" - + "lling/budgets/apiv1/budgetspb;budgetspbb" - + "\006proto3" + + "eapis.com/Budget\022\023\n\005scope\030\004 \001(\tB\004\342A\001\001\022\027\n" + + "\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001" + + "(\tB\004\342A\001\001\"h\n\023ListBudgetsResponse\0228\n\007budge" + + "ts\030\001 \003(\0132\'.google.cloud.billing.budgets." + + "v1.Budget\022\027\n\017next_page_token\030\002 \001(\t\"R\n\023De" + + "leteBudgetRequest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&" + + "\n$billingbudgets.googleapis.com/Budget2\367" + + "\007\n\rBudgetService\022\265\001\n\014CreateBudget\0224.goog" + + "le.cloud.billing.budgets.v1.CreateBudget" + + "Request\032\'.google.cloud.billing.budgets.v" + + "1.Budget\"F\332A\rparent,budget\202\323\344\223\0020\"&/v1/{p" + + "arent=billingAccounts/*}/budgets:\006budget" + + "\022\301\001\n\014UpdateBudget\0224.google.cloud.billing" + + ".budgets.v1.UpdateBudgetRequest\032\'.google" + + ".cloud.billing.budgets.v1.Budget\"R\332A\022bud" + + "get,update_mask\202\323\344\223\00272-/v1/{budget.name=" + + "billingAccounts/*/budgets/*}:\006budget\022\236\001\n" + + "\tGetBudget\0221.google.cloud.billing.budget" + + "s.v1.GetBudgetRequest\032\'.google.cloud.bil" + + "ling.budgets.v1.Budget\"5\332A\004name\202\323\344\223\002(\022&/" + + "v1/{name=billingAccounts/*/budgets/*}\022\261\001" + + "\n\013ListBudgets\0223.google.cloud.billing.bud" + + "gets.v1.ListBudgetsRequest\0324.google.clou" + + "d.billing.budgets.v1.ListBudgetsResponse" + + "\"7\332A\006parent\202\323\344\223\002(\022&/v1/{parent=billingAc" + + "counts/*}/budgets\022\223\001\n\014DeleteBudget\0224.goo" + + "gle.cloud.billing.budgets.v1.DeleteBudge" + + "tRequest\032\026.google.protobuf.Empty\"5\332A\004nam" + + "e\202\323\344\223\002(*&/v1/{name=billingAccounts/*/bud" + + "gets/*}\032\177\312A\035billingbudgets.googleapis.co" + + "m\322A\\https://www.googleapis.com/auth/clou" + + "d-billing,https://www.googleapis.com/aut" + + "h/cloud-platformBz\n#com.google.cloud.bil" + + "ling.budgets.v1B\022BudgetServiceProtoP\001Z=c" + + "loud.google.com/go/billing/budgets/apiv1" + + "/budgetspb;budgetspbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -158,7 +158,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_billing_budgets_v1_ListBudgetsRequest_descriptor, new java.lang.String[] { - "Parent", "PageSize", "PageToken", + "Parent", "Scope", "PageSize", "PageToken", }); internal_static_google_cloud_billing_budgets_v1_ListBudgetsResponse_descriptor = getDescriptor().getMessageTypes().get(4); diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/Filter.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/Filter.java index 60534e20378a..5b37759ff5ff 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/Filter.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/Filter.java @@ -395,8 +395,10 @@ public com.google.protobuf.ByteString getProjectsBytes(int index) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -413,8 +415,10 @@ public com.google.protobuf.ProtocolStringList getResourceAncestorsList() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -431,8 +435,10 @@ public int getResourceAncestorsCount() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -450,8 +456,10 @@ public java.lang.String getResourceAncestors(int index) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1961,8 +1969,10 @@ private void ensureResourceAncestorsIsMutable() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1981,8 +1991,10 @@ public com.google.protobuf.ProtocolStringList getResourceAncestorsList() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2000,8 +2012,10 @@ public int getResourceAncestorsCount() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2020,8 +2034,10 @@ public java.lang.String getResourceAncestors(int index) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2040,8 +2056,10 @@ public com.google.protobuf.ByteString getResourceAncestorsBytes(int index) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2068,8 +2086,10 @@ public Builder setResourceAncestors(int index, java.lang.String value) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2095,8 +2115,10 @@ public Builder addResourceAncestors(java.lang.String value) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2119,8 +2141,10 @@ public Builder addAllResourceAncestors(java.lang.Iterable valu * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2142,8 +2166,10 @@ public Builder clearResourceAncestors() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/FilterOrBuilder.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/FilterOrBuilder.java index 4ce92d816a6f..9f85f1cfca45 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/FilterOrBuilder.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/FilterOrBuilder.java @@ -93,8 +93,10 @@ public interface FilterOrBuilder * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -109,8 +111,10 @@ public interface FilterOrBuilder * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -125,8 +129,10 @@ public interface FilterOrBuilder * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -142,8 +148,10 @@ public interface FilterOrBuilder * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/ListBudgetsRequest.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/ListBudgetsRequest.java index ff2831c668fc..6f3aee1080a7 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/ListBudgetsRequest.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/ListBudgetsRequest.java @@ -39,6 +39,7 @@ private ListBudgetsRequest(com.google.protobuf.GeneratedMessageV3.Builder bui private ListBudgetsRequest() { parent_ = ""; + scope_ = ""; pageToken_ = ""; } @@ -120,6 +121,67 @@ public com.google.protobuf.ByteString getParentBytes() { } } + public static final int SCOPE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object scope_ = ""; + /** + * + * + *
+   * Optional. Set the scope of the budgets to be returned, in the format of the
+   * resource name. The scope of a budget is the cost that it tracks, such as
+   * costs for a single project, or the costs for all projects in a folder. Only
+   * project scope (in the format of "projects/project-id" or "projects/123") is
+   * supported in this field. When this field is set to a project's resource
+   * name, the budgets returned are tracking the costs for that project.
+   * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Set the scope of the budgets to be returned, in the format of the
+   * resource name. The scope of a budget is the cost that it tracks, such as
+   * costs for a single project, or the costs for all projects in a folder. Only
+   * project scope (in the format of "projects/project-id" or "projects/123") is
+   * supported in this field. When this field is set to a project's resource
+   * name, the budgets returned are tracking the costs for that project.
+   * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; /** @@ -217,6 +279,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, scope_); + } getUnknownFields().writeTo(output); } @@ -235,6 +300,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, scope_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -252,6 +320,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.billing.budgets.v1.ListBudgetsRequest) obj; if (!getParent().equals(other.getParent())) return false; + if (!getScope().equals(other.getScope())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -267,6 +336,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; @@ -412,6 +483,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; parent_ = ""; + scope_ = ""; pageSize_ = 0; pageToken_ = ""; return this; @@ -454,9 +526,12 @@ private void buildPartial0(com.google.cloud.billing.budgets.v1.ListBudgetsReques result.parent_ = parent_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; + result.scope_ = scope_; } if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { result.pageToken_ = pageToken_; } } @@ -512,12 +587,17 @@ public Builder mergeFrom(com.google.cloud.billing.budgets.v1.ListBudgetsRequest bitField0_ |= 0x00000001; onChanged(); } + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + bitField0_ |= 0x00000002; + onChanged(); + } if (other.getPageSize() != 0) { setPageSize(other.getPageSize()); } if (!other.getPageToken().isEmpty()) { pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -555,15 +635,21 @@ public Builder mergeFrom( case 16: { pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 16 case 26: { pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 26 + case 34: + { + scope_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -704,6 +790,137 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object scope_ = ""; + /** + * + * + *
+     * Optional. Set the scope of the budgets to be returned, in the format of the
+     * resource name. The scope of a budget is the cost that it tracks, such as
+     * costs for a single project, or the costs for all projects in a folder. Only
+     * project scope (in the format of "projects/project-id" or "projects/123") is
+     * supported in this field. When this field is set to a project's resource
+     * name, the budgets returned are tracking the costs for that project.
+     * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Set the scope of the budgets to be returned, in the format of the
+     * resource name. The scope of a budget is the cost that it tracks, such as
+     * costs for a single project, or the costs for all projects in a folder. Only
+     * project scope (in the format of "projects/project-id" or "projects/123") is
+     * supported in this field. When this field is set to a project's resource
+     * name, the budgets returned are tracking the costs for that project.
+     * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Set the scope of the budgets to be returned, in the format of the
+     * resource name. The scope of a budget is the cost that it tracks, such as
+     * costs for a single project, or the costs for all projects in a folder. Only
+     * project scope (in the format of "projects/project-id" or "projects/123") is
+     * supported in this field. When this field is set to a project's resource
+     * name, the budgets returned are tracking the costs for that project.
+     * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + scope_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Set the scope of the budgets to be returned, in the format of the
+     * resource name. The scope of a budget is the cost that it tracks, such as
+     * costs for a single project, or the costs for all projects in a folder. Only
+     * project scope (in the format of "projects/project-id" or "projects/123") is
+     * supported in this field. When this field is set to a project's resource
+     * name, the budgets returned are tracking the costs for that project.
+     * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearScope() { + scope_ = getDefaultInstance().getScope(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Set the scope of the budgets to be returned, in the format of the
+     * resource name. The scope of a budget is the cost that it tracks, such as
+     * costs for a single project, or the costs for all projects in a folder. Only
+     * project scope (in the format of "projects/project-id" or "projects/123") is
+     * supported in this field. When this field is set to a project's resource
+     * name, the budgets returned are tracking the costs for that project.
+     * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + scope_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + private int pageSize_; /** * @@ -737,7 +954,7 @@ public int getPageSize() { public Builder setPageSize(int value) { pageSize_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -754,7 +971,7 @@ public Builder setPageSize(int value) { * @return This builder for chaining. */ public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); pageSize_ = 0; onChanged(); return this; @@ -828,7 +1045,7 @@ public Builder setPageToken(java.lang.String value) { throw new NullPointerException(); } pageToken_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -847,7 +1064,7 @@ public Builder setPageToken(java.lang.String value) { */ public Builder clearPageToken() { pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -871,7 +1088,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); pageToken_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/ListBudgetsRequestOrBuilder.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/ListBudgetsRequestOrBuilder.java index 4eb473317be1..e03a918d78d7 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/ListBudgetsRequestOrBuilder.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/ListBudgetsRequestOrBuilder.java @@ -54,6 +54,41 @@ public interface ListBudgetsRequestOrBuilder */ com.google.protobuf.ByteString getParentBytes(); + /** + * + * + *
+   * Optional. Set the scope of the budgets to be returned, in the format of the
+   * resource name. The scope of a budget is the cost that it tracks, such as
+   * costs for a single project, or the costs for all projects in a folder. Only
+   * project scope (in the format of "projects/project-id" or "projects/123") is
+   * supported in this field. When this field is set to a project's resource
+   * name, the budgets returned are tracking the costs for that project.
+   * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The scope. + */ + java.lang.String getScope(); + /** + * + * + *
+   * Optional. Set the scope of the budgets to be returned, in the format of the
+   * resource name. The scope of a budget is the cost that it tracks, such as
+   * costs for a single project, or the costs for all projects in a folder. Only
+   * project scope (in the format of "projects/project-id" or "projects/123") is
+   * supported in this field. When this field is set to a project's resource
+   * name, the budgets returned are tracking the costs for that project.
+   * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for scope. + */ + com.google.protobuf.ByteString getScopeBytes(); + /** * * diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/NotificationsRule.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/NotificationsRule.java index 615997bdd8b8..b554a7393528 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/NotificationsRule.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/NotificationsRule.java @@ -404,6 +404,31 @@ public boolean getDisableDefaultIamRecipients() { return disableDefaultIamRecipients_; } + public static final int ENABLE_PROJECT_LEVEL_RECIPIENTS_FIELD_NUMBER = 5; + private boolean enableProjectLevelRecipients_ = false; + /** + * + * + *
+   * Optional. When set to true, and when the budget has a single project
+   * configured, notifications will be sent to project level recipients of that
+   * project. This field will be ignored if the budget has multiple or no
+   * project configured.
+   *
+   * Currently, project level recipients are the users with `Owner` role on a
+   * cloud project.
+   * 
+ * + * bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableProjectLevelRecipients. + */ + @java.lang.Override + public boolean getEnableProjectLevelRecipients() { + return enableProjectLevelRecipients_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -431,6 +456,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disableDefaultIamRecipients_ != false) { output.writeBool(4, disableDefaultIamRecipients_); } + if (enableProjectLevelRecipients_ != false) { + output.writeBool(5, enableProjectLevelRecipients_); + } getUnknownFields().writeTo(output); } @@ -458,6 +486,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, disableDefaultIamRecipients_); } + if (enableProjectLevelRecipients_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(5, enableProjectLevelRecipients_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -479,6 +511,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMonitoringNotificationChannelsList() .equals(other.getMonitoringNotificationChannelsList())) return false; if (getDisableDefaultIamRecipients() != other.getDisableDefaultIamRecipients()) return false; + if (getEnableProjectLevelRecipients() != other.getEnableProjectLevelRecipients()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -500,6 +533,9 @@ public int hashCode() { } hash = (37 * hash) + DISABLE_DEFAULT_IAM_RECIPIENTS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableDefaultIamRecipients()); + hash = (37 * hash) + ENABLE_PROJECT_LEVEL_RECIPIENTS_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableProjectLevelRecipients()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -645,6 +681,7 @@ public Builder clear() { schemaVersion_ = ""; monitoringNotificationChannels_ = com.google.protobuf.LazyStringArrayList.emptyList(); disableDefaultIamRecipients_ = false; + enableProjectLevelRecipients_ = false; return this; } @@ -694,6 +731,9 @@ private void buildPartial0(com.google.cloud.billing.budgets.v1.NotificationsRule if (((from_bitField0_ & 0x00000008) != 0)) { result.disableDefaultIamRecipients_ = disableDefaultIamRecipients_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.enableProjectLevelRecipients_ = enableProjectLevelRecipients_; + } } @java.lang.Override @@ -765,6 +805,9 @@ public Builder mergeFrom(com.google.cloud.billing.budgets.v1.NotificationsRule o if (other.getDisableDefaultIamRecipients() != false) { setDisableDefaultIamRecipients(other.getDisableDefaultIamRecipients()); } + if (other.getEnableProjectLevelRecipients() != false) { + setEnableProjectLevelRecipients(other.getEnableProjectLevelRecipients()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -816,6 +859,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 32 + case 40: + { + enableProjectLevelRecipients_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1646,6 +1695,80 @@ public Builder clearDisableDefaultIamRecipients() { return this; } + private boolean enableProjectLevelRecipients_; + /** + * + * + *
+     * Optional. When set to true, and when the budget has a single project
+     * configured, notifications will be sent to project level recipients of that
+     * project. This field will be ignored if the budget has multiple or no
+     * project configured.
+     *
+     * Currently, project level recipients are the users with `Owner` role on a
+     * cloud project.
+     * 
+ * + * bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableProjectLevelRecipients. + */ + @java.lang.Override + public boolean getEnableProjectLevelRecipients() { + return enableProjectLevelRecipients_; + } + /** + * + * + *
+     * Optional. When set to true, and when the budget has a single project
+     * configured, notifications will be sent to project level recipients of that
+     * project. This field will be ignored if the budget has multiple or no
+     * project configured.
+     *
+     * Currently, project level recipients are the users with `Owner` role on a
+     * cloud project.
+     * 
+ * + * bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableProjectLevelRecipients to set. + * @return This builder for chaining. + */ + public Builder setEnableProjectLevelRecipients(boolean value) { + + enableProjectLevelRecipients_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When set to true, and when the budget has a single project
+     * configured, notifications will be sent to project level recipients of that
+     * project. This field will be ignored if the budget has multiple or no
+     * project configured.
+     *
+     * Currently, project level recipients are the users with `Owner` role on a
+     * cloud project.
+     * 
+ * + * bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableProjectLevelRecipients() { + bitField0_ = (bitField0_ & ~0x00000010); + enableProjectLevelRecipients_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/NotificationsRuleOrBuilder.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/NotificationsRuleOrBuilder.java index 438aced5f877..966c367caa13 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/NotificationsRuleOrBuilder.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/java/com/google/cloud/billing/budgets/v1/NotificationsRuleOrBuilder.java @@ -291,4 +291,24 @@ public interface NotificationsRuleOrBuilder * @return The disableDefaultIamRecipients. */ boolean getDisableDefaultIamRecipients(); + + /** + * + * + *
+   * Optional. When set to true, and when the budget has a single project
+   * configured, notifications will be sent to project level recipients of that
+   * project. This field will be ignored if the budget has multiple or no
+   * project configured.
+   *
+   * Currently, project level recipients are the users with `Owner` role on a
+   * cloud project.
+   * 
+ * + * bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableProjectLevelRecipients. + */ + boolean getEnableProjectLevelRecipients(); } diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/proto/google/cloud/billing/budgets/v1/budget_model.proto b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/proto/google/cloud/billing/budgets/v1/budget_model.proto index 8c2bbcaa4cde..559f0e4f4104 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/proto/google/cloud/billing/budgets/v1/budget_model.proto +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/proto/google/cloud/billing/budgets/v1/budget_model.proto @@ -224,6 +224,16 @@ message NotificationsRule { // account. bool disable_default_iam_recipients = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When set to true, and when the budget has a single project + // configured, notifications will be sent to project level recipients of that + // project. This field will be ignored if the budget has multiple or no + // project configured. + // + // Currently, project level recipients are the users with `Owner` role on a + // cloud project. + bool enable_project_level_recipients = 5 + [(google.api.field_behavior) = OPTIONAL]; } // A filter for a budget, limiting the scope of the cost to calculate. @@ -260,8 +270,10 @@ message Filter { // Optional. A set of folder and organization names of the form // `folders/{folderId}` or `organizations/{organizationId}`, specifying that // usage from only this set of folders and organizations should be included in - // the budget. If omitted, the report includes all usage for all - // organizations, regardless of which organization the usage occurred on. + // the budget. If omitted, the budget includes all usage that the billing + // account pays for. If the folder or organization contains projects that are + // paid for by a different Cloud Billing account, the budget *doesn't* apply + // to those projects. repeated string resource_ancestors = 2 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/proto/google/cloud/billing/budgets/v1/budget_service.proto b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/proto/google/cloud/billing/budgets/v1/budget_service.proto index b9d6e3df36a1..b892dc255d02 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/proto/google/cloud/billing/budgets/v1/budget_service.proto +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1/src/main/proto/google/cloud/billing/budgets/v1/budget_service.proto @@ -150,6 +150,14 @@ message ListBudgetsRequest { } ]; + // Optional. Set the scope of the budgets to be returned, in the format of the + // resource name. The scope of a budget is the cost that it tracks, such as + // costs for a single project, or the costs for all projects in a folder. Only + // project scope (in the format of "projects/project-id" or "projects/123") is + // supported in this field. When this field is set to a project's resource + // name, the budgets returned are tracking the costs for that project. + string scope = 4 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The maximum number of budgets to return per page. // The default and maximum value are 100. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRule.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRule.java index 562f78417bed..2364c0f35a21 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRule.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRule.java @@ -318,6 +318,31 @@ public boolean getDisableDefaultIamRecipients() { return disableDefaultIamRecipients_; } + public static final int ENABLE_PROJECT_LEVEL_RECIPIENTS_FIELD_NUMBER = 5; + private boolean enableProjectLevelRecipients_ = false; + /** + * + * + *
+   * Optional. When set to true, and when the budget has a single project
+   * configured, notifications will be sent to project level recipients of that
+   * project. This field will be ignored if the budget has multiple or no
+   * project configured.
+   *
+   * Currently, project level recipients are the users with `Owner` role on a
+   * cloud project.
+   * 
+ * + * bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableProjectLevelRecipients. + */ + @java.lang.Override + public boolean getEnableProjectLevelRecipients() { + return enableProjectLevelRecipients_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -345,6 +370,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disableDefaultIamRecipients_ != false) { output.writeBool(4, disableDefaultIamRecipients_); } + if (enableProjectLevelRecipients_ != false) { + output.writeBool(5, enableProjectLevelRecipients_); + } getUnknownFields().writeTo(output); } @@ -372,6 +400,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, disableDefaultIamRecipients_); } + if (enableProjectLevelRecipients_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(5, enableProjectLevelRecipients_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -393,6 +425,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMonitoringNotificationChannelsList() .equals(other.getMonitoringNotificationChannelsList())) return false; if (getDisableDefaultIamRecipients() != other.getDisableDefaultIamRecipients()) return false; + if (getEnableProjectLevelRecipients() != other.getEnableProjectLevelRecipients()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,6 +447,9 @@ public int hashCode() { } hash = (37 * hash) + DISABLE_DEFAULT_IAM_RECIPIENTS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableDefaultIamRecipients()); + hash = (37 * hash) + ENABLE_PROJECT_LEVEL_RECIPIENTS_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableProjectLevelRecipients()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -559,6 +595,7 @@ public Builder clear() { schemaVersion_ = ""; monitoringNotificationChannels_ = com.google.protobuf.LazyStringArrayList.emptyList(); disableDefaultIamRecipients_ = false; + enableProjectLevelRecipients_ = false; return this; } @@ -608,6 +645,9 @@ private void buildPartial0(com.google.cloud.billing.budgets.v1beta1.AllUpdatesRu if (((from_bitField0_ & 0x00000008) != 0)) { result.disableDefaultIamRecipients_ = disableDefaultIamRecipients_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.enableProjectLevelRecipients_ = enableProjectLevelRecipients_; + } } @java.lang.Override @@ -679,6 +719,9 @@ public Builder mergeFrom(com.google.cloud.billing.budgets.v1beta1.AllUpdatesRule if (other.getDisableDefaultIamRecipients() != false) { setDisableDefaultIamRecipients(other.getDisableDefaultIamRecipients()); } + if (other.getEnableProjectLevelRecipients() != false) { + setEnableProjectLevelRecipients(other.getEnableProjectLevelRecipients()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -730,6 +773,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 32 + case 40: + { + enableProjectLevelRecipients_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1359,6 +1408,80 @@ public Builder clearDisableDefaultIamRecipients() { return this; } + private boolean enableProjectLevelRecipients_; + /** + * + * + *
+     * Optional. When set to true, and when the budget has a single project
+     * configured, notifications will be sent to project level recipients of that
+     * project. This field will be ignored if the budget has multiple or no
+     * project configured.
+     *
+     * Currently, project level recipients are the users with `Owner` role on a
+     * cloud project.
+     * 
+ * + * bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableProjectLevelRecipients. + */ + @java.lang.Override + public boolean getEnableProjectLevelRecipients() { + return enableProjectLevelRecipients_; + } + /** + * + * + *
+     * Optional. When set to true, and when the budget has a single project
+     * configured, notifications will be sent to project level recipients of that
+     * project. This field will be ignored if the budget has multiple or no
+     * project configured.
+     *
+     * Currently, project level recipients are the users with `Owner` role on a
+     * cloud project.
+     * 
+ * + * bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableProjectLevelRecipients to set. + * @return This builder for chaining. + */ + public Builder setEnableProjectLevelRecipients(boolean value) { + + enableProjectLevelRecipients_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When set to true, and when the budget has a single project
+     * configured, notifications will be sent to project level recipients of that
+     * project. This field will be ignored if the budget has multiple or no
+     * project configured.
+     *
+     * Currently, project level recipients are the users with `Owner` role on a
+     * cloud project.
+     * 
+ * + * bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableProjectLevelRecipients() { + bitField0_ = (bitField0_ & ~0x00000010); + enableProjectLevelRecipients_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRuleOrBuilder.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRuleOrBuilder.java index b94803a1b3a4..7ec52a9a10f0 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRuleOrBuilder.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/AllUpdatesRuleOrBuilder.java @@ -205,4 +205,24 @@ public interface AllUpdatesRuleOrBuilder * @return The disableDefaultIamRecipients. */ boolean getDisableDefaultIamRecipients(); + + /** + * + * + *
+   * Optional. When set to true, and when the budget has a single project
+   * configured, notifications will be sent to project level recipients of that
+   * project. This field will be ignored if the budget has multiple or no
+   * project configured.
+   *
+   * Currently, project level recipients are the users with `Owner` role on a
+   * cloud project.
+   * 
+ * + * bool enable_project_level_recipients = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableProjectLevelRecipients. + */ + boolean getEnableProjectLevelRecipients(); } diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetModel.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetModel.java index 4c1e1c0e415e..0296683b9357 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetModel.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetModel.java @@ -96,37 +96,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ling.budgets.v1beta1.ThresholdRule.Basis" + "B\004\342A\001\001\"G\n\005Basis\022\025\n\021BASIS_UNSPECIFIED\020\000\022\021" + "\n\rCURRENT_SPEND\020\001\022\024\n\020FORECASTED_SPEND\020\002\"" - + "\250\001\n\016AllUpdatesRule\022\032\n\014pubsub_topic\030\001 \001(\t" + + "\327\001\n\016AllUpdatesRule\022\032\n\014pubsub_topic\030\001 \001(\t" + "B\004\342A\001\001\022\034\n\016schema_version\030\002 \001(\tB\004\342A\001\001\022.\n " + "monitoring_notification_channels\030\003 \003(\tB\004" + "\342A\001\001\022,\n\036disable_default_iam_recipients\030\004" - + " \001(\010B\004\342A\001\001\"\341\005\n\006Filter\022\026\n\010projects\030\001 \003(\tB" - + "\004\342A\001\001\022 \n\022resource_ancestors\030\002 \003(\tB\004\342A\001\001\022" - + "\032\n\014credit_types\030\007 \003(\tB\004\342A\001\001\022g\n\026credit_ty" - + "pes_treatment\030\004 \001(\0162A.google.cloud.billi" - + "ng.budgets.v1beta1.Filter.CreditTypesTre" - + "atmentB\004\342A\001\001\022\026\n\010services\030\003 \003(\tB\004\342A\001\001\022\031\n\013" - + "subaccounts\030\005 \003(\tB\004\342A\001\001\022N\n\006labels\030\006 \003(\0132" - + "8.google.cloud.billing.budgets.v1beta1.F" - + "ilter.LabelsEntryB\004\342A\001\001\022U\n\017calendar_peri" - + "od\030\010 \001(\01624.google.cloud.billing.budgets." - + "v1beta1.CalendarPeriodB\004\342A\001\001H\000\022Q\n\rcustom" - + "_period\030\t \001(\01322.google.cloud.billing.bud" - + "gets.v1beta1.CustomPeriodB\004\342A\001\001H\000\032I\n\013Lab" - + "elsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.g" - + "oogle.protobuf.ListValue:\0028\001\"\217\001\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\002\022\035\n\031INCLUDE_SPECI" - + "FIED_CREDITS\020\003B\016\n\014usage_period\"f\n\014Custom" - + "Period\022+\n\nstart_date\030\001 \001(\0132\021.google.type" - + ".DateB\004\342A\001\002\022)\n\010end_date\030\002 \001(\0132\021.google.t" - + "ype.DateB\004\342A\001\001*S\n\016CalendarPeriod\022\037\n\033CALE" - + "NDAR_PERIOD_UNSPECIFIED\020\000\022\t\n\005MONTH\020\001\022\013\n\007" - + "QUARTER\020\002\022\010\n\004YEAR\020\003Bp\n(com.google.cloud." - + "billing.budgets.v1beta1P\001ZBcloud.google." - + "com/go/billing/budgets/apiv1beta1/budget" - + "spb;budgetspbb\006proto3" + + " \001(\010B\004\342A\001\001\022-\n\037enable_project_level_recip" + + "ients\030\005 \001(\010B\004\342A\001\001\"\341\005\n\006Filter\022\026\n\010projects" + + "\030\001 \003(\tB\004\342A\001\001\022 \n\022resource_ancestors\030\002 \003(\t" + + "B\004\342A\001\001\022\032\n\014credit_types\030\007 \003(\tB\004\342A\001\001\022g\n\026cr" + + "edit_types_treatment\030\004 \001(\0162A.google.clou" + + "d.billing.budgets.v1beta1.Filter.CreditT" + + "ypesTreatmentB\004\342A\001\001\022\026\n\010services\030\003 \003(\tB\004\342" + + "A\001\001\022\031\n\013subaccounts\030\005 \003(\tB\004\342A\001\001\022N\n\006labels" + + "\030\006 \003(\01328.google.cloud.billing.budgets.v1" + + "beta1.Filter.LabelsEntryB\004\342A\001\001\022U\n\017calend" + + "ar_period\030\010 \001(\01624.google.cloud.billing.b" + + "udgets.v1beta1.CalendarPeriodB\004\342A\001\001H\000\022Q\n" + + "\rcustom_period\030\t \001(\01322.google.cloud.bill" + + "ing.budgets.v1beta1.CustomPeriodB\004\342A\001\001H\000" + + "\032I\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 " + + "\001(\0132\032.google.protobuf.ListValue:\0028\001\"\217\001\n\024" + + "CreditTypesTreatment\022&\n\"CREDIT_TYPES_TRE" + + "ATMENT_UNSPECIFIED\020\000\022\027\n\023INCLUDE_ALL_CRED" + + "ITS\020\001\022\027\n\023EXCLUDE_ALL_CREDITS\020\002\022\035\n\031INCLUD" + + "E_SPECIFIED_CREDITS\020\003B\016\n\014usage_period\"f\n" + + "\014CustomPeriod\022+\n\nstart_date\030\001 \001(\0132\021.goog" + + "le.type.DateB\004\342A\001\002\022)\n\010end_date\030\002 \001(\0132\021.g" + + "oogle.type.DateB\004\342A\001\001*S\n\016CalendarPeriod\022" + + "\037\n\033CALENDAR_PERIOD_UNSPECIFIED\020\000\022\t\n\005MONT" + + "H\020\001\022\013\n\007QUARTER\020\002\022\010\n\004YEAR\020\003Bp\n(com.google" + + ".cloud.billing.budgets.v1beta1P\001ZBcloud." + + "google.com/go/billing/budgets/apiv1beta1" + + "/budgetspb;budgetspbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -184,6 +185,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SchemaVersion", "MonitoringNotificationChannels", "DisableDefaultIamRecipients", + "EnableProjectLevelRecipients", }); internal_static_google_cloud_billing_budgets_v1beta1_Filter_descriptor = getDescriptor().getMessageTypes().get(5); diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceOuterClass.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceOuterClass.java index 8bd2751ca5fb..22f43ca0ff4a 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceOuterClass.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/BudgetServiceOuterClass.java @@ -77,44 +77,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "1beta1.BudgetB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\013" + "2\032.google.protobuf.FieldMaskB\004\342A\001\001\"O\n\020Ge" + "tBudgetRequest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&\n$b" - + "illingbudgets.googleapis.com/Budget\"\206\001\n\022" + + "illingbudgets.googleapis.com/Budget\"\233\001\n\022" + "ListBudgetsRequest\022=\n\006parent\030\001 \001(\tB-\342A\001\002" + "\372A&\022$billingbudgets.googleapis.com/Budge" - + "t\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token" - + "\030\003 \001(\tB\004\342A\001\001\"m\n\023ListBudgetsResponse\022=\n\007b" - + "udgets\030\001 \003(\0132,.google.cloud.billing.budg" - + "ets.v1beta1.Budget\022\027\n\017next_page_token\030\002 " - + "\001(\t\"R\n\023DeleteBudgetRequest\022;\n\004name\030\001 \001(\t" - + "B-\342A\001\002\372A&\n$billingbudgets.googleapis.com" - + "/Budget2\367\007\n\rBudgetService\022\257\001\n\014CreateBudg" - + "et\0229.google.cloud.billing.budgets.v1beta" - + "1.CreateBudgetRequest\032,.google.cloud.bil" - + "ling.budgets.v1beta1.Budget\"6\202\323\344\223\0020\"+/v1" - + "beta1/{parent=billingAccounts/*}/budgets" - + ":\001*\022\266\001\n\014UpdateBudget\0229.google.cloud.bill" - + "ing.budgets.v1beta1.UpdateBudgetRequest\032" + + "t\022\023\n\005scope\030\004 \001(\tB\004\342A\001\001\022\027\n\tpage_size\030\002 \001(" + + "\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\"m\n\023Lis" + + "tBudgetsResponse\022=\n\007budgets\030\001 \003(\0132,.goog" + + "le.cloud.billing.budgets.v1beta1.Budget\022" + + "\027\n\017next_page_token\030\002 \001(\t\"R\n\023DeleteBudget" + + "Request\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&\n$billingb" + + "udgets.googleapis.com/Budget2\367\007\n\rBudgetS" + + "ervice\022\257\001\n\014CreateBudget\0229.google.cloud.b" + + "illing.budgets.v1beta1.CreateBudgetReque" + + "st\032,.google.cloud.billing.budgets.v1beta" + + "1.Budget\"6\202\323\344\223\0020\"+/v1beta1/{parent=billi" + + "ngAccounts/*}/budgets:\001*\022\266\001\n\014UpdateBudge" + + "t\0229.google.cloud.billing.budgets.v1beta1" + + ".UpdateBudgetRequest\032,.google.cloud.bill" + + "ing.budgets.v1beta1.Budget\"=\202\323\344\223\002722/v1b" + + "eta1/{budget.name=billingAccounts/*/budg" + + "ets/*}:\001*\022\246\001\n\tGetBudget\0226.google.cloud.b" + + "illing.budgets.v1beta1.GetBudgetRequest\032" + ",.google.cloud.billing.budgets.v1beta1.B" - + "udget\"=\202\323\344\223\002722/v1beta1/{budget.name=bil" - + "lingAccounts/*/budgets/*}:\001*\022\246\001\n\tGetBudg" - + "et\0226.google.cloud.billing.budgets.v1beta" - + "1.GetBudgetRequest\032,.google.cloud.billin" - + "g.budgets.v1beta1.Budget\"3\202\323\344\223\002-\022+/v1bet" - + "a1/{name=billingAccounts/*/budgets/*}\022\267\001" - + "\n\013ListBudgets\0228.google.cloud.billing.bud" - + "gets.v1beta1.ListBudgetsRequest\0329.google" - + ".cloud.billing.budgets.v1beta1.ListBudge" - + "tsResponse\"3\202\323\344\223\002-\022+/v1beta1/{parent=bil" - + "lingAccounts/*}/budgets\022\226\001\n\014DeleteBudget" - + "\0229.google.cloud.billing.budgets.v1beta1." - + "DeleteBudgetRequest\032\026.google.protobuf.Em" - + "pty\"3\202\323\344\223\002-*+/v1beta1/{name=billingAccou" - + "nts/*/budgets/*}\032\177\312A\035billingbudgets.goog" - + "leapis.com\322A\\https://www.googleapis.com/" - + "auth/cloud-billing,https://www.googleapi" - + "s.com/auth/cloud-platformBp\n(com.google." - + "cloud.billing.budgets.v1beta1P\001ZBcloud.g" - + "oogle.com/go/billing/budgets/apiv1beta1/" - + "budgetspb;budgetspbb\006proto3" + + "udget\"3\202\323\344\223\002-\022+/v1beta1/{name=billingAcc" + + "ounts/*/budgets/*}\022\267\001\n\013ListBudgets\0228.goo" + + "gle.cloud.billing.budgets.v1beta1.ListBu" + + "dgetsRequest\0329.google.cloud.billing.budg" + + "ets.v1beta1.ListBudgetsResponse\"3\202\323\344\223\002-\022" + + "+/v1beta1/{parent=billingAccounts/*}/bud" + + "gets\022\226\001\n\014DeleteBudget\0229.google.cloud.bil" + + "ling.budgets.v1beta1.DeleteBudgetRequest" + + "\032\026.google.protobuf.Empty\"3\202\323\344\223\002-*+/v1bet" + + "a1/{name=billingAccounts/*/budgets/*}\032\177\312" + + "A\035billingbudgets.googleapis.com\322A\\https:" + + "//www.googleapis.com/auth/cloud-billing," + + "https://www.googleapis.com/auth/cloud-pl" + + "atformBp\n(com.google.cloud.billing.budge" + + "ts.v1beta1P\001ZBcloud.google.com/go/billin" + + "g/budgets/apiv1beta1/budgetspb;budgetspb" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -158,7 +159,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_billing_budgets_v1beta1_ListBudgetsRequest_descriptor, new java.lang.String[] { - "Parent", "PageSize", "PageToken", + "Parent", "Scope", "PageSize", "PageToken", }); internal_static_google_cloud_billing_budgets_v1beta1_ListBudgetsResponse_descriptor = getDescriptor().getMessageTypes().get(4); diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/Filter.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/Filter.java index ba6f8cc49daa..f2991d9b060e 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/Filter.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/Filter.java @@ -395,8 +395,10 @@ public com.google.protobuf.ByteString getProjectsBytes(int index) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -413,8 +415,10 @@ public com.google.protobuf.ProtocolStringList getResourceAncestorsList() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -431,8 +435,10 @@ public int getResourceAncestorsCount() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -450,8 +456,10 @@ public java.lang.String getResourceAncestors(int index) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1963,8 +1971,10 @@ private void ensureResourceAncestorsIsMutable() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1983,8 +1993,10 @@ public com.google.protobuf.ProtocolStringList getResourceAncestorsList() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2002,8 +2014,10 @@ public int getResourceAncestorsCount() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2022,8 +2036,10 @@ public java.lang.String getResourceAncestors(int index) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2042,8 +2058,10 @@ public com.google.protobuf.ByteString getResourceAncestorsBytes(int index) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2070,8 +2088,10 @@ public Builder setResourceAncestors(int index, java.lang.String value) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2097,8 +2117,10 @@ public Builder addResourceAncestors(java.lang.String value) { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2121,8 +2143,10 @@ public Builder addAllResourceAncestors(java.lang.Iterable valu * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2144,8 +2168,10 @@ public Builder clearResourceAncestors() { * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/FilterOrBuilder.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/FilterOrBuilder.java index d9f2d35ee21a..88f716939663 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/FilterOrBuilder.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/FilterOrBuilder.java @@ -93,8 +93,10 @@ public interface FilterOrBuilder * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -109,8 +111,10 @@ public interface FilterOrBuilder * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -125,8 +129,10 @@ public interface FilterOrBuilder * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -142,8 +148,10 @@ public interface FilterOrBuilder * Optional. A set of folder and organization names of the form * `folders/{folderId}` or `organizations/{organizationId}`, specifying that * usage from only this set of folders and organizations should be included in - * the budget. If omitted, the report includes all usage for all - * organizations, regardless of which organization the usage occurred on. + * the budget. If omitted, the budget includes all usage that the billing + * account pays for. If the folder or organization contains projects that are + * paid for by a different Cloud Billing account, the budget *doesn't* apply + * to those projects. * * * repeated string resource_ancestors = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsRequest.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsRequest.java index a91fc2d0e975..3435d17fd6d4 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsRequest.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsRequest.java @@ -39,6 +39,7 @@ private ListBudgetsRequest(com.google.protobuf.GeneratedMessageV3.Builder bui private ListBudgetsRequest() { parent_ = ""; + scope_ = ""; pageToken_ = ""; } @@ -120,6 +121,67 @@ public com.google.protobuf.ByteString getParentBytes() { } } + public static final int SCOPE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object scope_ = ""; + /** + * + * + *
+   * Optional. Set the scope of the budgets to be returned, in the format of the
+   * resource name. The scope of a budget is the cost that it tracks, such as
+   * costs for a single project, or the costs for all projects in a folder. Only
+   * project scope (in the format of "projects/project-id" or "projects/123") is
+   * supported in this field. When this field is set to a project's resource
+   * name, the budgets returned are tracking the costs for that project.
+   * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Set the scope of the budgets to be returned, in the format of the
+   * resource name. The scope of a budget is the cost that it tracks, such as
+   * costs for a single project, or the costs for all projects in a folder. Only
+   * project scope (in the format of "projects/project-id" or "projects/123") is
+   * supported in this field. When this field is set to a project's resource
+   * name, the budgets returned are tracking the costs for that project.
+   * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; /** @@ -217,6 +279,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, scope_); + } getUnknownFields().writeTo(output); } @@ -235,6 +300,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, scope_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -252,6 +320,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.billing.budgets.v1beta1.ListBudgetsRequest) obj; if (!getParent().equals(other.getParent())) return false; + if (!getScope().equals(other.getScope())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -267,6 +336,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; @@ -412,6 +483,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; parent_ = ""; + scope_ = ""; pageSize_ = 0; pageToken_ = ""; return this; @@ -454,9 +526,12 @@ private void buildPartial0(com.google.cloud.billing.budgets.v1beta1.ListBudgetsR result.parent_ = parent_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; + result.scope_ = scope_; } if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { result.pageToken_ = pageToken_; } } @@ -512,12 +587,17 @@ public Builder mergeFrom(com.google.cloud.billing.budgets.v1beta1.ListBudgetsReq bitField0_ |= 0x00000001; onChanged(); } + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + bitField0_ |= 0x00000002; + onChanged(); + } if (other.getPageSize() != 0) { setPageSize(other.getPageSize()); } if (!other.getPageToken().isEmpty()) { pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -555,15 +635,21 @@ public Builder mergeFrom( case 16: { pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 16 case 26: { pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 26 + case 34: + { + scope_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -704,6 +790,137 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object scope_ = ""; + /** + * + * + *
+     * Optional. Set the scope of the budgets to be returned, in the format of the
+     * resource name. The scope of a budget is the cost that it tracks, such as
+     * costs for a single project, or the costs for all projects in a folder. Only
+     * project scope (in the format of "projects/project-id" or "projects/123") is
+     * supported in this field. When this field is set to a project's resource
+     * name, the budgets returned are tracking the costs for that project.
+     * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Set the scope of the budgets to be returned, in the format of the
+     * resource name. The scope of a budget is the cost that it tracks, such as
+     * costs for a single project, or the costs for all projects in a folder. Only
+     * project scope (in the format of "projects/project-id" or "projects/123") is
+     * supported in this field. When this field is set to a project's resource
+     * name, the budgets returned are tracking the costs for that project.
+     * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Set the scope of the budgets to be returned, in the format of the
+     * resource name. The scope of a budget is the cost that it tracks, such as
+     * costs for a single project, or the costs for all projects in a folder. Only
+     * project scope (in the format of "projects/project-id" or "projects/123") is
+     * supported in this field. When this field is set to a project's resource
+     * name, the budgets returned are tracking the costs for that project.
+     * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + scope_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Set the scope of the budgets to be returned, in the format of the
+     * resource name. The scope of a budget is the cost that it tracks, such as
+     * costs for a single project, or the costs for all projects in a folder. Only
+     * project scope (in the format of "projects/project-id" or "projects/123") is
+     * supported in this field. When this field is set to a project's resource
+     * name, the budgets returned are tracking the costs for that project.
+     * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearScope() { + scope_ = getDefaultInstance().getScope(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Set the scope of the budgets to be returned, in the format of the
+     * resource name. The scope of a budget is the cost that it tracks, such as
+     * costs for a single project, or the costs for all projects in a folder. Only
+     * project scope (in the format of "projects/project-id" or "projects/123") is
+     * supported in this field. When this field is set to a project's resource
+     * name, the budgets returned are tracking the costs for that project.
+     * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + scope_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + private int pageSize_; /** * @@ -737,7 +954,7 @@ public int getPageSize() { public Builder setPageSize(int value) { pageSize_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -754,7 +971,7 @@ public Builder setPageSize(int value) { * @return This builder for chaining. */ public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); pageSize_ = 0; onChanged(); return this; @@ -828,7 +1045,7 @@ public Builder setPageToken(java.lang.String value) { throw new NullPointerException(); } pageToken_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -847,7 +1064,7 @@ public Builder setPageToken(java.lang.String value) { */ public Builder clearPageToken() { pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -871,7 +1088,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); pageToken_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsRequestOrBuilder.java b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsRequestOrBuilder.java index f26a9d356978..26135769502b 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsRequestOrBuilder.java +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/java/com/google/cloud/billing/budgets/v1beta1/ListBudgetsRequestOrBuilder.java @@ -54,6 +54,41 @@ public interface ListBudgetsRequestOrBuilder */ com.google.protobuf.ByteString getParentBytes(); + /** + * + * + *
+   * Optional. Set the scope of the budgets to be returned, in the format of the
+   * resource name. The scope of a budget is the cost that it tracks, such as
+   * costs for a single project, or the costs for all projects in a folder. Only
+   * project scope (in the format of "projects/project-id" or "projects/123") is
+   * supported in this field. When this field is set to a project's resource
+   * name, the budgets returned are tracking the costs for that project.
+   * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The scope. + */ + java.lang.String getScope(); + /** + * + * + *
+   * Optional. Set the scope of the budgets to be returned, in the format of the
+   * resource name. The scope of a budget is the cost that it tracks, such as
+   * costs for a single project, or the costs for all projects in a folder. Only
+   * project scope (in the format of "projects/project-id" or "projects/123") is
+   * supported in this field. When this field is set to a project's resource
+   * name, the budgets returned are tracking the costs for that project.
+   * 
+ * + * string scope = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for scope. + */ + com.google.protobuf.ByteString getScopeBytes(); + /** * * diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_model.proto b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_model.proto index d9f2d595654c..3eb3f7844275 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_model.proto +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_model.proto @@ -195,6 +195,16 @@ message AllUpdatesRule { // account. bool disable_default_iam_recipients = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When set to true, and when the budget has a single project + // configured, notifications will be sent to project level recipients of that + // project. This field will be ignored if the budget has multiple or no + // project configured. + // + // Currently, project level recipients are the users with `Owner` role on a + // cloud project. + bool enable_project_level_recipients = 5 + [(google.api.field_behavior) = OPTIONAL]; } // A filter for a budget, limiting the scope of the cost to calculate. @@ -231,8 +241,10 @@ message Filter { // Optional. A set of folder and organization names of the form // `folders/{folderId}` or `organizations/{organizationId}`, specifying that // usage from only this set of folders and organizations should be included in - // the budget. If omitted, the report includes all usage for all - // organizations, regardless of which organization the usage occurred on. + // the budget. If omitted, the budget includes all usage that the billing + // account pays for. If the folder or organization contains projects that are + // paid for by a different Cloud Billing account, the budget *doesn't* apply + // to those projects. repeated string resource_ancestors = 2 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_service.proto b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_service.proto index fd376185da4c..7884c64ffd2e 100644 --- a/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_service.proto +++ b/java-billingbudgets/proto-google-cloud-billingbudgets-v1beta1/src/main/proto/google/cloud/billing/budgets/v1beta1/budget_service.proto @@ -144,6 +144,14 @@ message ListBudgetsRequest { } ]; + // Optional. Set the scope of the budgets to be returned, in the format of the + // resource name. The scope of a budget is the cost that it tracks, such as + // costs for a single project, or the costs for all projects in a folder. Only + // project scope (in the format of "projects/project-id" or "projects/123") is + // supported in this field. When this field is set to a project's resource + // name, the budgets returned are tracking the costs for that project. + string scope = 4 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The maximum number of budgets to return per page. // The default and maximum value are 100. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/AsyncListBudgets.java b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/AsyncListBudgets.java index d6132f9d1355..093f11ce2fff 100644 --- a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/AsyncListBudgets.java +++ b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/AsyncListBudgets.java @@ -39,6 +39,7 @@ public static void asyncListBudgets() throws Exception { ListBudgetsRequest request = ListBudgetsRequest.newBuilder() .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString()) + .setScope("scope109264468") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/AsyncListBudgetsPaged.java b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/AsyncListBudgetsPaged.java index 5070ad2a79c6..56d84f22fd42 100644 --- a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/AsyncListBudgetsPaged.java +++ b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/AsyncListBudgetsPaged.java @@ -40,6 +40,7 @@ public static void asyncListBudgetsPaged() throws Exception { ListBudgetsRequest request = ListBudgetsRequest.newBuilder() .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString()) + .setScope("scope109264468") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/SyncListBudgets.java b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/SyncListBudgets.java index a79da694bfe9..962559d24113 100644 --- a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/SyncListBudgets.java +++ b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1/budgetservice/listbudgets/SyncListBudgets.java @@ -38,6 +38,7 @@ public static void syncListBudgets() throws Exception { ListBudgetsRequest request = ListBudgetsRequest.newBuilder() .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString()) + .setScope("scope109264468") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/AsyncListBudgets.java b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/AsyncListBudgets.java index 264e84102cd0..668520591607 100644 --- a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/AsyncListBudgets.java +++ b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/AsyncListBudgets.java @@ -39,6 +39,7 @@ public static void asyncListBudgets() throws Exception { ListBudgetsRequest request = ListBudgetsRequest.newBuilder() .setParent(BudgetName.of("[BILLING_ACCOUNT]", "[BUDGET]").toString()) + .setScope("scope109264468") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/AsyncListBudgetsPaged.java b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/AsyncListBudgetsPaged.java index b503e68a5a07..ac00d62f9672 100644 --- a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/AsyncListBudgetsPaged.java +++ b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/AsyncListBudgetsPaged.java @@ -40,6 +40,7 @@ public static void asyncListBudgetsPaged() throws Exception { ListBudgetsRequest request = ListBudgetsRequest.newBuilder() .setParent(BudgetName.of("[BILLING_ACCOUNT]", "[BUDGET]").toString()) + .setScope("scope109264468") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); diff --git a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/SyncListBudgets.java b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/SyncListBudgets.java index de01bb742cb1..1e4f1c783fef 100644 --- a/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/SyncListBudgets.java +++ b/java-billingbudgets/samples/snippets/generated/com/google/cloud/billing/budgets/v1beta1/budgetservice/listbudgets/SyncListBudgets.java @@ -38,6 +38,7 @@ public static void syncListBudgets() throws Exception { ListBudgetsRequest request = ListBudgetsRequest.newBuilder() .setParent(BudgetName.of("[BILLING_ACCOUNT]", "[BUDGET]").toString()) + .setScope("scope109264468") .setPageSize(883849137) .setPageToken("pageToken873572522") .build();