diff --git a/java-billing/README.md b/java-billing/README.md
index 63fee8c3e7be..bb7c6d8ff0b3 100644
--- a/java-billing/README.md
+++ b/java-billing/README.md
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudBillingClient cloudBillingClient = CloudBillingClient.create()) {
+ * String name = ProjectBillingInfoName.of("[PROJECT]").toString();
* ProjectBillingInfo response = cloudBillingClient.getProjectBillingInfo(name);
* }
* }
@@ -920,7 +953,9 @@ public final ProjectBillingInfo getProjectBillingInfo(String name) {
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudBillingClient cloudBillingClient = CloudBillingClient.create()) {
* GetProjectBillingInfoRequest request =
- * GetProjectBillingInfoRequest.newBuilder().setName("name3373707").build();
+ * GetProjectBillingInfoRequest.newBuilder()
+ * .setName(ProjectBillingInfoName.of("[PROJECT]").toString())
+ * .build();
* ProjectBillingInfo response = cloudBillingClient.getProjectBillingInfo(request);
* }
* }
@@ -949,7 +984,9 @@ public final ProjectBillingInfo getProjectBillingInfo(GetProjectBillingInfoReque
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudBillingClient cloudBillingClient = CloudBillingClient.create()) {
* GetProjectBillingInfoRequest request =
- * GetProjectBillingInfoRequest.newBuilder().setName("name3373707").build();
+ * GetProjectBillingInfoRequest.newBuilder()
+ * .setName(ProjectBillingInfoName.of("[PROJECT]").toString())
+ * .build();
* ApiFuturestring name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
*
* @return The name.
*/
@@ -98,7 +100,9 @@ public java.lang.String getName() {
* retrieved. For example, `projects/tokyo-rain-123`.
*
*
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
*
* @return The bytes for name.
*/
@@ -467,7 +471,9 @@ public Builder mergeFrom(
* retrieved. For example, `projects/tokyo-rain-123`.
*
*
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
*
* @return The name.
*/
@@ -490,7 +496,9 @@ public java.lang.String getName() {
* retrieved. For example, `projects/tokyo-rain-123`.
*
*
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
*
* @return The bytes for name.
*/
@@ -513,7 +521,9 @@ public com.google.protobuf.ByteString getNameBytes() {
* retrieved. For example, `projects/tokyo-rain-123`.
*
*
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
*
* @param value The name to set.
* @return This builder for chaining.
@@ -535,7 +545,9 @@ public Builder setName(java.lang.String value) {
* retrieved. For example, `projects/tokyo-rain-123`.
*
*
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
*
* @return This builder for chaining.
*/
@@ -553,7 +565,9 @@ public Builder clearName() {
* retrieved. For example, `projects/tokyo-rain-123`.
*
*
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
*
* @param value The bytes for name to set.
* @return This builder for chaining.
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetProjectBillingInfoRequestOrBuilder.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetProjectBillingInfoRequestOrBuilder.java
index ee24eee8f2d0..d303aa1819fa 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetProjectBillingInfoRequestOrBuilder.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetProjectBillingInfoRequestOrBuilder.java
@@ -31,7 +31,9 @@ public interface GetProjectBillingInfoRequestOrBuilder
* retrieved. For example, `projects/tokyo-rain-123`.
*
*
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
*
* @return The name.
*/
@@ -44,7 +46,9 @@ public interface GetProjectBillingInfoRequestOrBuilder
* retrieved. For example, `projects/tokyo-rain-123`.
*
*
- * string name = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
*
* @return The bytes for name.
*/
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java
index 870b26c554da..2bf0d12d8823 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java
@@ -74,13 +74,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * The resource name for the `ProjectBillingInfo`; has the form
+ * Output only. The resource name for the `ProjectBillingInfo`; has the form
* `projects/{project_id}/billingInfo`. For example, the resource name for the
* billing information for project `tokyo-rain-123` would be
* `projects/tokyo-rain-123/billingInfo`. This field is read-only.
*
*
- * string name = 1;
+ * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The name.
*/
@@ -100,13 +100,13 @@ public java.lang.String getName() {
*
*
*
- * The resource name for the `ProjectBillingInfo`; has the form
+ * Output only. The resource name for the `ProjectBillingInfo`; has the form
* `projects/{project_id}/billingInfo`. For example, the resource name for the
* billing information for project `tokyo-rain-123` would be
* `projects/tokyo-rain-123/billingInfo`. This field is read-only.
*
*
- * string name = 1;
+ * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for name.
*/
@@ -131,12 +131,13 @@ public com.google.protobuf.ByteString getNameBytes() {
*
*
*
- * The ID of the project that this `ProjectBillingInfo` represents, such as
- * `tokyo-rain-123`. This is a convenience field so that you don't need to
- * parse the `name` field to obtain a project ID. This field is read-only.
+ * Output only. The ID of the project that this `ProjectBillingInfo`
+ * represents, such as `tokyo-rain-123`. This is a convenience field so that
+ * you don't need to parse the `name` field to obtain a project ID. This field
+ * is read-only.
*
*
- * string project_id = 2;
+ * string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The projectId.
*/
@@ -156,12 +157,13 @@ public java.lang.String getProjectId() {
*
*
*
- * The ID of the project that this `ProjectBillingInfo` represents, such as
- * `tokyo-rain-123`. This is a convenience field so that you don't need to
- * parse the `name` field to obtain a project ID. This field is read-only.
+ * Output only. The ID of the project that this `ProjectBillingInfo`
+ * represents, such as `tokyo-rain-123`. This is a convenience field so that
+ * you don't need to parse the `name` field to obtain a project ID. This field
+ * is read-only.
*
*
- * string project_id = 2;
+ * string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for projectId.
*/
@@ -237,13 +239,13 @@ public com.google.protobuf.ByteString getBillingAccountNameBytes() {
*
*
*
- * True if the project is associated with an open billing account, to which
- * usage on the project is charged. False if the project is associated with a
- * closed billing account, or no billing account at all, and therefore cannot
- * use paid services. This field is read-only.
+ * Output only. True if the project is associated with an open billing
+ * account, to which usage on the project is charged. False if the project is
+ * associated with a closed billing account, or no billing account at all, and
+ * therefore cannot use paid services. This field is read-only.
*
*
- * bool billing_enabled = 4;
+ * bool billing_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The billingEnabled.
*/
@@ -670,13 +672,13 @@ public Builder mergeFrom(
*
*
*
- * The resource name for the `ProjectBillingInfo`; has the form
+ * Output only. The resource name for the `ProjectBillingInfo`; has the form
* `projects/{project_id}/billingInfo`. For example, the resource name for the
* billing information for project `tokyo-rain-123` would be
* `projects/tokyo-rain-123/billingInfo`. This field is read-only.
*
*
- * string name = 1;
+ * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The name.
*/
@@ -695,13 +697,13 @@ public java.lang.String getName() {
*
*
*
- * The resource name for the `ProjectBillingInfo`; has the form
+ * Output only. The resource name for the `ProjectBillingInfo`; has the form
* `projects/{project_id}/billingInfo`. For example, the resource name for the
* billing information for project `tokyo-rain-123` would be
* `projects/tokyo-rain-123/billingInfo`. This field is read-only.
*
*
- * string name = 1;
+ * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for name.
*/
@@ -720,13 +722,13 @@ public com.google.protobuf.ByteString getNameBytes() {
*
*
*
- * The resource name for the `ProjectBillingInfo`; has the form
+ * Output only. The resource name for the `ProjectBillingInfo`; has the form
* `projects/{project_id}/billingInfo`. For example, the resource name for the
* billing information for project `tokyo-rain-123` would be
* `projects/tokyo-rain-123/billingInfo`. This field is read-only.
*
*
- * string name = 1;
+ * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The name to set.
* @return This builder for chaining.
@@ -744,13 +746,13 @@ public Builder setName(java.lang.String value) {
*
*
*
- * The resource name for the `ProjectBillingInfo`; has the form
+ * Output only. The resource name for the `ProjectBillingInfo`; has the form
* `projects/{project_id}/billingInfo`. For example, the resource name for the
* billing information for project `tokyo-rain-123` would be
* `projects/tokyo-rain-123/billingInfo`. This field is read-only.
*
*
- * string name = 1;
+ * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
@@ -764,13 +766,13 @@ public Builder clearName() {
*
*
*
- * The resource name for the `ProjectBillingInfo`; has the form
+ * Output only. The resource name for the `ProjectBillingInfo`; has the form
* `projects/{project_id}/billingInfo`. For example, the resource name for the
* billing information for project `tokyo-rain-123` would be
* `projects/tokyo-rain-123/billingInfo`. This field is read-only.
*
*
- * string name = 1;
+ * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for name to set.
* @return This builder for chaining.
@@ -791,12 +793,13 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
*
*
*
- * The ID of the project that this `ProjectBillingInfo` represents, such as
- * `tokyo-rain-123`. This is a convenience field so that you don't need to
- * parse the `name` field to obtain a project ID. This field is read-only.
+ * Output only. The ID of the project that this `ProjectBillingInfo`
+ * represents, such as `tokyo-rain-123`. This is a convenience field so that
+ * you don't need to parse the `name` field to obtain a project ID. This field
+ * is read-only.
*
*
- * string project_id = 2;
+ * string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The projectId.
*/
@@ -815,12 +818,13 @@ public java.lang.String getProjectId() {
*
*
*
- * The ID of the project that this `ProjectBillingInfo` represents, such as
- * `tokyo-rain-123`. This is a convenience field so that you don't need to
- * parse the `name` field to obtain a project ID. This field is read-only.
+ * Output only. The ID of the project that this `ProjectBillingInfo`
+ * represents, such as `tokyo-rain-123`. This is a convenience field so that
+ * you don't need to parse the `name` field to obtain a project ID. This field
+ * is read-only.
*
*
- * string project_id = 2;
+ * string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for projectId.
*/
@@ -839,12 +843,13 @@ public com.google.protobuf.ByteString getProjectIdBytes() {
*
*
*
- * The ID of the project that this `ProjectBillingInfo` represents, such as
- * `tokyo-rain-123`. This is a convenience field so that you don't need to
- * parse the `name` field to obtain a project ID. This field is read-only.
+ * Output only. The ID of the project that this `ProjectBillingInfo`
+ * represents, such as `tokyo-rain-123`. This is a convenience field so that
+ * you don't need to parse the `name` field to obtain a project ID. This field
+ * is read-only.
*
*
- * string project_id = 2;
+ * string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The projectId to set.
* @return This builder for chaining.
@@ -862,12 +867,13 @@ public Builder setProjectId(java.lang.String value) {
*
*
*
- * The ID of the project that this `ProjectBillingInfo` represents, such as
- * `tokyo-rain-123`. This is a convenience field so that you don't need to
- * parse the `name` field to obtain a project ID. This field is read-only.
+ * Output only. The ID of the project that this `ProjectBillingInfo`
+ * represents, such as `tokyo-rain-123`. This is a convenience field so that
+ * you don't need to parse the `name` field to obtain a project ID. This field
+ * is read-only.
*
*
- * string project_id = 2;
+ * string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
@@ -881,12 +887,13 @@ public Builder clearProjectId() {
*
*
*
- * The ID of the project that this `ProjectBillingInfo` represents, such as
- * `tokyo-rain-123`. This is a convenience field so that you don't need to
- * parse the `name` field to obtain a project ID. This field is read-only.
+ * Output only. The ID of the project that this `ProjectBillingInfo`
+ * represents, such as `tokyo-rain-123`. This is a convenience field so that
+ * you don't need to parse the `name` field to obtain a project ID. This field
+ * is read-only.
*
*
- * string project_id = 2;
+ * string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for projectId to set.
* @return This builder for chaining.
@@ -1018,13 +1025,13 @@ public Builder setBillingAccountNameBytes(com.google.protobuf.ByteString value)
*
*
*
- * True if the project is associated with an open billing account, to which
- * usage on the project is charged. False if the project is associated with a
- * closed billing account, or no billing account at all, and therefore cannot
- * use paid services. This field is read-only.
+ * Output only. True if the project is associated with an open billing
+ * account, to which usage on the project is charged. False if the project is
+ * associated with a closed billing account, or no billing account at all, and
+ * therefore cannot use paid services. This field is read-only.
*
*
- * bool billing_enabled = 4;
+ * bool billing_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The billingEnabled.
*/
@@ -1036,13 +1043,13 @@ public boolean getBillingEnabled() {
*
*
*
- * True if the project is associated with an open billing account, to which
- * usage on the project is charged. False if the project is associated with a
- * closed billing account, or no billing account at all, and therefore cannot
- * use paid services. This field is read-only.
+ * Output only. True if the project is associated with an open billing
+ * account, to which usage on the project is charged. False if the project is
+ * associated with a closed billing account, or no billing account at all, and
+ * therefore cannot use paid services. This field is read-only.
*
*
- * bool billing_enabled = 4;
+ * bool billing_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The billingEnabled to set.
* @return This builder for chaining.
@@ -1058,13 +1065,13 @@ public Builder setBillingEnabled(boolean value) {
*
*
*
- * True if the project is associated with an open billing account, to which
- * usage on the project is charged. False if the project is associated with a
- * closed billing account, or no billing account at all, and therefore cannot
- * use paid services. This field is read-only.
+ * Output only. True if the project is associated with an open billing
+ * account, to which usage on the project is charged. False if the project is
+ * associated with a closed billing account, or no billing account at all, and
+ * therefore cannot use paid services. This field is read-only.
*
*
- * bool billing_enabled = 4;
+ * bool billing_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfoName.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfoName.java
new file mode 100644
index 000000000000..03e898f25676
--- /dev/null
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfoName.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.billing.v1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+@Generated("by gapic-generator-java")
+public class ProjectBillingInfoName implements ResourceName {
+ private static final PathTemplate PROJECT =
+ PathTemplate.createWithoutUrlEncoding("projects/{project}/billingInfo");
+ private volatile Map
- * The resource name for the `ProjectBillingInfo`; has the form
+ * Output only. The resource name for the `ProjectBillingInfo`; has the form
* `projects/{project_id}/billingInfo`. For example, the resource name for the
* billing information for project `tokyo-rain-123` would be
* `projects/tokyo-rain-123/billingInfo`. This field is read-only.
*
*
- * string name = 1;
+ * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The name.
*/
@@ -42,13 +42,13 @@ public interface ProjectBillingInfoOrBuilder
*
*
*
- * The resource name for the `ProjectBillingInfo`; has the form
+ * Output only. The resource name for the `ProjectBillingInfo`; has the form
* `projects/{project_id}/billingInfo`. For example, the resource name for the
* billing information for project `tokyo-rain-123` would be
* `projects/tokyo-rain-123/billingInfo`. This field is read-only.
*
*
- * string name = 1;
+ * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for name.
*/
@@ -58,12 +58,13 @@ public interface ProjectBillingInfoOrBuilder
*
*
*
- * The ID of the project that this `ProjectBillingInfo` represents, such as
- * `tokyo-rain-123`. This is a convenience field so that you don't need to
- * parse the `name` field to obtain a project ID. This field is read-only.
+ * Output only. The ID of the project that this `ProjectBillingInfo`
+ * represents, such as `tokyo-rain-123`. This is a convenience field so that
+ * you don't need to parse the `name` field to obtain a project ID. This field
+ * is read-only.
*
*
- * string project_id = 2;
+ * string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The projectId.
*/
@@ -72,12 +73,13 @@ public interface ProjectBillingInfoOrBuilder
*
*
*
- * The ID of the project that this `ProjectBillingInfo` represents, such as
- * `tokyo-rain-123`. This is a convenience field so that you don't need to
- * parse the `name` field to obtain a project ID. This field is read-only.
+ * Output only. The ID of the project that this `ProjectBillingInfo`
+ * represents, such as `tokyo-rain-123`. This is a convenience field so that
+ * you don't need to parse the `name` field to obtain a project ID. This field
+ * is read-only.
*
*
- * string project_id = 2;
+ * string project_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for projectId.
*/
@@ -114,13 +116,13 @@ public interface ProjectBillingInfoOrBuilder
*
*
*
- * True if the project is associated with an open billing account, to which
- * usage on the project is charged. False if the project is associated with a
- * closed billing account, or no billing account at all, and therefore cannot
- * use paid services. This field is read-only.
+ * Output only. True if the project is associated with an open billing
+ * account, to which usage on the project is charged. False if the project is
+ * associated with a closed billing account, or no billing account at all, and
+ * therefore cannot use paid services. This field is read-only.
*
*
- * bool billing_enabled = 4;
+ * bool billing_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The billingEnabled.
*/
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_billing.proto b/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_billing.proto
index 213967d9eee9..ae64248d637d 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_billing.proto
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/proto/google/cloud/billing/v1/cloud_billing.proto
@@ -239,26 +239,32 @@ message BillingAccount {
// project has at most one associated billing account at a time (but a billing
// account can be assigned to multiple projects).
message ProjectBillingInfo {
- // The resource name for the `ProjectBillingInfo`; has the form
+ option (google.api.resource) = {
+ type: "cloudbilling.googleapis.com/ProjectBillingInfo"
+ pattern: "projects/{project}/billingInfo"
+ };
+
+ // Output only. The resource name for the `ProjectBillingInfo`; has the form
// `projects/{project_id}/billingInfo`. For example, the resource name for the
// billing information for project `tokyo-rain-123` would be
// `projects/tokyo-rain-123/billingInfo`. This field is read-only.
- string name = 1;
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
- // The ID of the project that this `ProjectBillingInfo` represents, such as
- // `tokyo-rain-123`. This is a convenience field so that you don't need to
- // parse the `name` field to obtain a project ID. This field is read-only.
- string project_id = 2;
+ // Output only. The ID of the project that this `ProjectBillingInfo`
+ // represents, such as `tokyo-rain-123`. This is a convenience field so that
+ // you don't need to parse the `name` field to obtain a project ID. This field
+ // is read-only.
+ string project_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// The resource name of the billing account associated with the project, if
// any. For example, `billingAccounts/012345-567890-ABCDEF`.
string billing_account_name = 3;
- // True if the project is associated with an open billing account, to which
- // usage on the project is charged. False if the project is associated with a
- // closed billing account, or no billing account at all, and therefore cannot
- // use paid services. This field is read-only.
- bool billing_enabled = 4;
+ // Output only. True if the project is associated with an open billing
+ // account, to which usage on the project is charged. False if the project is
+ // associated with a closed billing account, or no billing account at all, and
+ // therefore cannot use paid services. This field is read-only.
+ bool billing_enabled = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Request message for `GetBillingAccount`.
@@ -370,7 +376,12 @@ message ListProjectBillingInfoResponse {
message GetProjectBillingInfoRequest {
// Required. The resource name of the project for which billing information is
// retrieved. For example, `projects/tokyo-rain-123`.
- string name = 1 [(google.api.field_behavior) = REQUIRED];
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "cloudbilling.googleapis.com/ProjectBillingInfo"
+ }
+ ];
}
// Request message for `UpdateProjectBillingInfo`.
diff --git a/java-billing/samples/snippets/generated/com/google/cloud/billing/v1/cloudbilling/getprojectbillinginfo/AsyncGetProjectBillingInfo.java b/java-billing/samples/snippets/generated/com/google/cloud/billing/v1/cloudbilling/getprojectbillinginfo/AsyncGetProjectBillingInfo.java
index 4a35142430ce..0d3495976d5b 100644
--- a/java-billing/samples/snippets/generated/com/google/cloud/billing/v1/cloudbilling/getprojectbillinginfo/AsyncGetProjectBillingInfo.java
+++ b/java-billing/samples/snippets/generated/com/google/cloud/billing/v1/cloudbilling/getprojectbillinginfo/AsyncGetProjectBillingInfo.java
@@ -21,6 +21,7 @@
import com.google.cloud.billing.v1.CloudBillingClient;
import com.google.cloud.billing.v1.GetProjectBillingInfoRequest;
import com.google.cloud.billing.v1.ProjectBillingInfo;
+import com.google.cloud.billing.v1.ProjectBillingInfoName;
public class AsyncGetProjectBillingInfo {
@@ -36,7 +37,9 @@ public static void asyncGetProjectBillingInfo() throws Exception {
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudBillingClient cloudBillingClient = CloudBillingClient.create()) {
GetProjectBillingInfoRequest request =
- GetProjectBillingInfoRequest.newBuilder().setName("name3373707").build();
+ GetProjectBillingInfoRequest.newBuilder()
+ .setName(ProjectBillingInfoName.of("[PROJECT]").toString())
+ .build();
ApiFuture